From 5eb79ec417e252e2164b05341568b353119d7ccf Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Fri, 26 Jan 2018 12:36:42 +0200 Subject: [PATCH] Fixes pneumatic cannon contents deletion (#34884) * Fix pneumatic cannon contents deletion * honk * Update pneumaticCannon.dm --- code/game/objects/items/pneumaticCannon.dm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index 8d32f95e8f..7a1446ef39 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -205,6 +205,15 @@ var/turf/newtarget = locate(new_x, new_y, starting.z) return newtarget +/obj/item/pneumatic_cannon/handle_atom_del(atom/A) + . = ..() + if (loadedItems.Remove(A)) + var/obj/item/I = A + loadedWeightClass -= I.w_class + else if (A == tank) + tank = null + update_icons() + /obj/item/pneumatic_cannon/ghetto //Obtainable by improvised methods; more gas per use, less capacity, but smaller name = "improvised pneumatic cannon" desc = "A gas-powered, object-firing cannon made out of common parts."