Afterattack() Signal (#38606)

* adds signal and modifies each call of afterattack to call it's inherited proc

* uses new macro for sendsignal()

* map fuck

* skip precommithooks

* combine and negate 2 ifs
This commit is contained in:
Trevor Serpas
2018-07-07 02:00:25 -04:00
committed by Emmett Gaines
parent e2093f11f5
commit bee0b5b2c3
113 changed files with 167 additions and 129 deletions
@@ -72,6 +72,7 @@
C.total_damage += target_health - target.health //we did some damage, but let's not assume how much we did
/obj/item/twohanded/required/kinetic_crusher/afterattack(atom/target, mob/living/user, proximity_flag, clickparams)
. = ..()
if(!proximity_flag && charged)//Mark a target, or mine a tile.
var/turf/proj_turf = user.loc
if(!isturf(proj_turf))
@@ -16,6 +16,7 @@
var/revive_type = SENTIENCE_ORGANIC //So you can't revive boss monsters or robots with it
/obj/item/lazarus_injector/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(!loaded)
return
if(isliving(target) && proximity_flag)
@@ -7,6 +7,7 @@
w_class = WEIGHT_CLASS_TINY
/obj/item/hivelordstabilizer/afterattack(obj/item/organ/M, mob/user)
. = ..()
var/obj/item/organ/regenerative_core/C = M
if(!istype(C, /obj/item/organ/regenerative_core))
to_chat(user, "<span class='warning'>The stabilizer only works on certain types of monster organs, generally regenerative in nature.</span>")
@@ -66,6 +67,7 @@
ui_action_click()
/obj/item/organ/regenerative_core/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(proximity_flag && ishuman(target))
var/mob/living/carbon/human/H = target
if(inert)
@@ -83,7 +85,6 @@
SSblackbox.record_feedback("nested tally", "hivelord_core", 1, list("[type]", "used", "self"))
H.revive(full_heal = 1)
qdel(src)
..()
/obj/item/organ/regenerative_core/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
. = ..()
+1
View File
@@ -38,6 +38,7 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons)
to_chat(user, "You link the extraction pack to the beacon system.")
/obj/item/extraction_pack/afterattack(atom/movable/A, mob/living/carbon/human/user, flag, params)
. = ..()
if(!beacon)
to_chat(user, "[src] is not linked to a beacon, and cannot be used.")
return
@@ -899,7 +899,7 @@
var/static/list/banned_turfs = typecacheof(list(/turf/open/space/transit, /turf/closed))
/obj/item/lava_staff/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
..()
. = ..()
if(timer > world.time)
return
@@ -1097,7 +1097,7 @@
qdel(user)
/obj/item/hierophant_club/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
..()
. = ..()
var/turf/T = get_turf(target)
if(!T || timer > world.time)
return
+1 -1
View File
@@ -259,6 +259,7 @@
icon_state = "data"
/obj/item/card/mining_access_card/afterattack(atom/movable/AM, mob/user, proximity)
. = ..()
if(istype(AM, /obj/item/card/id) && proximity)
var/obj/item/card/id/I = AM
I.access |= ACCESS_MINING
@@ -267,7 +268,6 @@
I.access |= ACCESS_CARGO
to_chat(user, "You upgrade [I] with mining access.")
qdel(src)
..()
/obj/item/storage/backpack/duffelbag/mining_conscript
name = "mining conscription kit"
+1
View File
@@ -270,6 +270,7 @@
icon = 'icons/obj/module.dmi'
/obj/item/mine_bot_upgrade/afterattack(mob/living/simple_animal/hostile/mining_drone/M, mob/user, proximity)
. = ..()
if(!istype(M) || !proximity)
return
upgrade_bot(M, user)