From ccfc08b7a8a555db89ec2dd60def908298401a14 Mon Sep 17 00:00:00 2001 From: Elizabeth Lavenza Date: Sat, 30 Mar 2024 23:15:50 -0400 Subject: [PATCH] Fix attack_hand-related runtimes --- code/_onclick/other_mobs.dm | 4 ++-- code/game/objects/items/devices/transfer_valve.dm | 2 +- code/modules/assembly/bomb.dm | 4 ++-- .../ninja/suit/ninja_equipment_actions/energy_net_nets.dm | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 073f50d8c5..d9d552301e 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -35,7 +35,7 @@ SEND_SIGNAL(src, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, A) return . | A.attack_hand(src, intent, .) -/atom/proc/attack_hand(mob/user, act_intent = user.a_intent, attackchain_flags) +/atom/proc/attack_hand(mob/user, act_intent = user?.a_intent, attackchain_flags) //SHOULD_NOT_SLEEP(TRUE) if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) add_fingerprint(user) @@ -54,7 +54,7 @@ else if(attack_hand_is_action) user.DelayNextAction() -/atom/proc/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags) +/atom/proc/on_attack_hand(mob/user, act_intent = user?.a_intent, unarmed_attack_flags) //Return a non FALSE value to cancel whatever called this from propagating, if it respects it. /atom/proc/_try_interact(mob/user) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 7aafd729ea..ccaadacd26 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -110,7 +110,7 @@ if(.) return if(attached_device) - attached_device.attack_hand() + attached_device.attack_hand(user) //These keep attached devices synced up, for example a TTV with a mouse trap being found in a bag so it's triggered, or moving the TTV with an infrared beam sensor to update the beam's direction. diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 8c025e2ab4..bc05d1095a 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -91,12 +91,12 @@ if(bombassembly) bombassembly.on_found(finder) -/obj/item/onetankbomb/on_attack_hand() //also for mousetraps +/obj/item/onetankbomb/on_attack_hand(mob/user) //also for mousetraps . = ..() if(.) return if(bombassembly) - bombassembly.attack_hand() + bombassembly.attack_hand(user) /obj/item/onetankbomb/Move() . = ..() diff --git a/code/modules/ninja/suit/ninja_equipment_actions/energy_net_nets.dm b/code/modules/ninja/suit/ninja_equipment_actions/energy_net_nets.dm index bc0828242e..22b07ac783 100644 --- a/code/modules/ninja/suit/ninja_equipment_actions/energy_net_nets.dm +++ b/code/modules/ninja/suit/ninja_equipment_actions/energy_net_nets.dm @@ -37,7 +37,7 @@ return ..() /obj/structure/energy_net/attack_paw(mob/user) - return attack_hand() + return attack_hand(user) /obj/structure/energy_net/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE) return//We only want our target to be buckled