Refactored magic guns to use process_fire() for checks (#43432)

This was previously using afterattack()
This commit is contained in:
moo
2019-04-02 14:00:02 -04:00
committed by GitHub

View File

@@ -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, "<span class='warning'>You know better than to violate the security of The Den, best wait until you leave to use [src].</span>")
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, "<span class='warning'>Something is interfering with [src].</span>")
return
. = ..()