Skip to content

Commit

Permalink
Exempts horrible goose from tram hit counter (#72811)
Browse files Browse the repository at this point in the history
Tram hitting the goose increments the hit counter, this fixes it so
mobs without clients don't increase the Tram's hit counter.
  • Loading branch information
lessthnthree committed Jan 23, 2023
1 parent eebd820 commit 2bd2cb6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion code/game/objects/structures/signs/signs_interactive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/industrial_lift/industrial_lift.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2bd2cb6

Please sign in to comment.