From 8284c56c5475b8cc3d5b7f8038aea89c9e248716 Mon Sep 17 00:00:00 2001 From: AzuleUtama <44248086+AzuleUtama@users.noreply.github.com> Date: Wed, 12 Dec 2018 00:28:45 +0000 Subject: [PATCH] Fixes bulldog and c20's low ammo alarms only going off once --- code/modules/projectiles/guns/projectile/automatic.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index f886c5e5e53..ecaf8d801b2 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -22,6 +22,8 @@ /obj/item/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params) . = ..() if(.) + if(alarmed) // Did the empty clip alarm go off already? + alarmed = 0 // Reset the alarm once a magazine is loaded return if(istype(A, /obj/item/ammo_box/magazine)) var/obj/item/ammo_box/magazine/AM = A @@ -33,6 +35,8 @@ magazine = null else to_chat(user, "You insert the magazine into \the [src].") + if(alarmed) + alarmed = 0 user.remove_from_mob(AM) magazine = AM magazine.loc = src