Cataclysm-BN icon indicating copy to clipboard operation
Cataclysm-BN copied to clipboard

Seatbelts do not drop seat belt item when uninstalled, but range of synthetic fabric

Open Relgar opened this issue 1 year ago • 8 comments

Describe the bug

Some recipes call for seatbelt items - however, these have stopped being uninstalled as seatbelt 'items'. If you disassemble a seat belt from a vehicle it will turn straight into it's disassembly components. Compare this with mufflers which disassemble correctly and drop a muffler.

Steps To Reproduce

  1. Spawn a vehicle
  2. Remove seatbelts
  3. Notice you get 0-3 synfab instead of a seatbelt item

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.3803 (22H2)
  • Game Version: 36a2fd9 [64-bit]
  • Graphics Version: Tiles
  • LAPI Version: 1
  • Game Language: []
  • Mods loaded: [ Bright Nights [bn], Disable NPC Needs [no_npc_food], Simplified Nutrition [novitamins], No Rail Stations [No_Rail_Stations], Prevent Zombie Revivication [no_reviving_zombies], Limit Fungal Growth [limit_fungal_growth], Aftershock [aftershock], Mythical Martial Arts [MMA], No Filthy Clothing [no_filthy_clothing], No Lifting Reqs [disable_lifting], SpeedyDex [speedydex], Stats Through Kills [stats_through_kills], Stats Through Skills [StatsThroughSkills] ]

Additional context

May be related to #3489 as JSON code has not changed in months.

Relgar avatar Dec 29 '23 10:12 Relgar

I am convinced it is related to #3489 because I found a version before 0.5 stable where I get seatbelts. Game report is below.

image

  • OS: Windows
    • OS Version: 10.0.19045.3448 (22H2)
  • Game Version: 7e70561 [64-bit]
  • Graphics Version: Tiles
  • LAPI Version: 1
  • Game Language: English [en_US]
  • Mods loaded: [ Bright Nights [bn], Elevated bridges [elevated_bridges], Craftable Gun Pack [craftgp], Alternative Map Key [alt_map_key], Fuji's Military Profession Pack [fuji_mpp], Arcana and Magic Items [Arcana], Craftable Bullet Casings [CasingCrafting], MST Extra [MST_Extra], Tankmod: Revived [Tankmod_Revived], Essence 2200 BN [Essence2200_BN], Essence 2200 Tweaks [FoxTweaks], Nonperishable Overhaul [Nonperishable_Overhaul], No Addictions [No_Addictions], Limit Fungal Growth [limit_fungal_growth], Disable NPC Needs [no_npc_food] ]

RoyalFox2140 avatar Dec 29 '23 10:12 RoyalFox2140

Tested on 0.5 Stable. You remove the broken I I seatbelt, I gained no items on removing the seatbelt.

image

  • OS: Windows
    • OS Version: 10.0.19045.3448 (22H2)
  • Game Version: 0.5 [64-bit]
  • Graphics Version: Tiles
  • LAPI Version: 1
  • Game Language: English [en_US]
  • Mods loaded: [ Bright Nights [bn], Craftable Gun Pack [craftgp], Alternative Map Key [alt_map_key], Craftable Bullet Casings [CasingCrafting], MST Extra [MST_Extra], Essence 2200 BN [Essence2200_BN], Essence 2200 Tweaks [FoxTweaks], Nonperishable Overhaul [Nonperishable_Overhaul], No Addictions [No_Addictions], Limit Fungal Growth [limit_fungal_growth], Disable NPC Needs [no_npc_food], Simplified Nutrition [novitamins], Mining Mod [Mining_Mod], Rural-Only Mapgen [ruralbiome], No Monsters [Only_Wildlife] ]

RoyalFox2140 avatar Dec 29 '23 11:12 RoyalFox2140

Almantuxas outlined the mechanism of the bug on the Discord here.

Relgar avatar Dec 29 '23 12:12 Relgar

to re-iterate from discord:

https://github.com/cataclysmbnteam/Cataclysm-BN/blob/d05c6a912698919172679af74c1a7ec65053e181/src/veh_interact.cpp#L3267-L3292

https://github.com/cataclysmbnteam/Cataclysm-BN/blob/578117ae7b3051bb2be8dd8a9c127eab1ecddbbe/src/itype.cpp#L52-L55

for some reason damage_max for count-by-charge items is always 0.

scarf005 avatar Dec 31 '23 14:12 scarf005

This may be because damage is no longer tracked per item. Which becomes awkward if you're tracking say damage to 50 bullets. The problem also becomes that you can't just make something damage a stack like XX Rope (6) either.

Relgar avatar Dec 31 '23 23:12 Relgar

i guess we'd need to implement proper damage sharing logic for stackables. this gonna be big...

scarf005 avatar Jan 01 '24 04:01 scarf005

Depends - how does damage currently track for 'normal' stackables like coins or ammo? Can it get destroyed?

Relgar avatar Jan 03 '24 06:01 Relgar

Also impacted by this bug in 0.5.2.

seerdecker avatar Feb 10 '24 14:02 seerdecker