From 2bd2cb6ecffc23821fdbbf87094e4d862e00f7b3 Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Sun, 22 Jan 2023 18:27:35 -0800 Subject: [PATCH] Exempts horrible goose from tram hit counter (#72811) Tram hitting the goose increments the hit counter, this fixes it so mobs without clients don't increase the Tram's hit counter. --- .../game/objects/structures/signs/signs_interactive.dm | 10 +++++++++- code/modules/industrial_lift/industrial_lift.dm | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index 52829968b536d2..49cc3e4bcbaf30 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -111,10 +111,18 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/delamination_counter, 32) /obj/structure/sign/collision_counter/Destroy() return ..() -/obj/structure/sign/collision_counter/proc/new_hit() +/obj/structure/sign/collision_counter/proc/new_hit(lift_master, collided_type) SIGNAL_HANDLER + if(!ismob(collided_type)) + return + + var/mob/living/carbon/human/victim = collided_type // Real players only, no gaming high score + if(!victim.client) + return + hit_count++ + if(hazard_flash) update_appearance() return diff --git a/code/modules/industrial_lift/industrial_lift.dm b/code/modules/industrial_lift/industrial_lift.dm index 8c4e82fdea8294..41e8b10209ed80 100644 --- a/code/modules/industrial_lift/industrial_lift.dm +++ b/code/modules/industrial_lift/industrial_lift.dm @@ -418,7 +418,7 @@ GLOBAL_LIST_EMPTY(lifts) var/datum/callback/land_slam = new(collided, TYPE_PROC_REF(/mob/living/, tram_slam_land)) collided.throw_at(throw_target, 200 * collision_lethality, 4 * collision_lethality, callback = land_slam) - SEND_SIGNAL(src, COMSIG_TRAM_COLLISION) + SEND_SIGNAL(src, COMSIG_TRAM_COLLISION, collided) unset_movement_registrations(exited_locs) group_move(things_to_move, going)