From 53ddde9d06d63880c21665ab4b76d7de50fe8fdb Mon Sep 17 00:00:00 2001 From: Leland Kemble <70413276+lelandkemble@users.noreply.github.com> Date: Tue, 27 Jan 2026 19:04:15 -0500 Subject: [PATCH] Fixes improvised mounted weaponry dropping way too much cable (#95002) ## About The Pull Request Because cable coils are by default 30 cable, what was presumably intended to drop four cable actually dropped four stacks of cable. This modifies the deconstruction logic of improvised mounted weapons to spawn `/obj/item/stack`s once, with their count set in `new()`, rather than repeatedly spawning single stacks and having them merge, which allows granularity when it comes to cable. ## Why It's Good For The Game Unless you're deconstructing something via a wiremill, it shouldn't produce eight times as much cable as it cost. ## Changelog :cl: fix: Improvised mounted weaponry now drops a reasonable amount of cable /:cl: --- .../objects/structures/cannons/mounted_guns/mounted_gun.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/cannons/mounted_guns/mounted_gun.dm b/code/game/objects/structures/cannons/mounted_guns/mounted_gun.dm index 3d7b9b0136f..c128511fff2 100644 --- a/code/game/objects/structures/cannons/mounted_guns/mounted_gun.dm +++ b/code/game/objects/structures/cannons/mounted_guns/mounted_gun.dm @@ -148,9 +148,13 @@ /obj/structure/mounted_gun/atom_deconstruct(disassembled = TRUE) . = ..() dump_contents() + var/droploc = drop_location() for (var/type in debris) + if(ispath(type, /obj/item/stack)) + new type(droploc, debris[type]) + continue for (var/i in 1 to debris[type]) - new type(drop_location()) + new type(droploc) /obj/structure/mounted_gun/dump_contents() return // Generally we don't have contents to dump but some children do.