From b14809f889d79c464403a4d3f19d01cea95e43b2 Mon Sep 17 00:00:00 2001 From: Brett Williams Date: Sun, 31 Mar 2019 20:29:59 -0300 Subject: [PATCH] Refactored magic guns to use process_fire() for checks This was previously using afterattack() --- code/modules/projectiles/guns/magic.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 0965a89e265..90d00fb730c 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -24,15 +24,17 @@ lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands righthand_file = 'icons/mob/inhands/items_righthand.dmi' -/obj/item/gun/magic/afterattack(atom/target, mob/living/user, flag) +/obj/item/gun/magic/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread) if(no_den_usage) var/area/A = get_area(user) if(istype(A, /area/wizard_station)) + add_fingerprint(user) to_chat(user, "You know better than to violate the security of The Den, best wait until you leave to use [src].") return else no_den_usage = 0 if(checks_antimagic && user.anti_magic_check(TRUE, FALSE, major = FALSE, self = TRUE)) + add_fingerprint(user) to_chat(user, "Something is interfering with [src].") return . = ..()