From edb09ea6d793ea179fe5239003434399c4fad645 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Tue, 22 May 2012 00:39:57 +0100 Subject: [PATCH] Fixes double barrel shotgun not working with the gun system. --- .../projectiles/guns/projectile/shotgun.dm | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 7b5b9056a26..258be742952 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -87,17 +87,19 @@ return 0 attack_self(mob/living/user as mob) - if(!(locate(/obj/item/ammo_casing/shotgun) in src) && !loaded.len) - user << "\The [src] is empty." - return + if(..()) + if(!(locate(/obj/item/ammo_casing/shotgun) in src) && !loaded.len) + user << "\The [src] is empty." + return - for(var/obj/item/ammo_casing/shotgun/shell in src) //This feels like a hack. //don't code at 3:30am kids!! - if(shell in loaded) - loaded -= shell - shell.loc = get_turf(src.loc) + for(var/obj/item/ammo_casing/shotgun/shell in src) //This feels like a hack. //don't code at 3:30am kids!! + if(shell in loaded) + loaded -= shell + shell.loc = get_turf(src.loc) - user << "You break \the [src]." - update_icon() + user << "You break \the [src]." + update_icon() + return attackby(var/obj/item/A as obj, mob/user as mob) if(istype(A, /obj/item/ammo_casing) && !load_method)