From 69db2c1d3bc67272f1a2e0a2388fdef83053486f Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Wed, 18 Jan 2023 20:51:08 -0800 Subject: [PATCH 1/5] counter logic --- code/modules/industrial_lift/industrial_lift.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/industrial_lift/industrial_lift.dm b/code/modules/industrial_lift/industrial_lift.dm index 8c4e82fdea8294..ccdade6ebcaf02 100644 --- a/code/modules/industrial_lift/industrial_lift.dm +++ b/code/modules/industrial_lift/industrial_lift.dm @@ -418,7 +418,8 @@ 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) + if(istype(collided, /mob/living/carbon/human)) //don't increment the counter when birdboat gets hit + SEND_SIGNAL(src, COMSIG_TRAM_COLLISION) unset_movement_registrations(exited_locs) group_move(things_to_move, going) From 37e9563d7c91b5bb53cd5f2673090285d68dc21c Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:14:27 -0800 Subject: [PATCH 2/5] move type check to proc --- code/game/objects/structures/signs/signs_interactive.dm | 6 +++++- code/modules/industrial_lift/industrial_lift.dm | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index 52829968b536d2..d4c19d847a0883 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -111,10 +111,14 @@ 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(!istype(collided_type, /mob/living/carbon/human)) //don't increment the counter when birdboat gets hit + 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 ccdade6ebcaf02..41e8b10209ed80 100644 --- a/code/modules/industrial_lift/industrial_lift.dm +++ b/code/modules/industrial_lift/industrial_lift.dm @@ -418,8 +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) - if(istype(collided, /mob/living/carbon/human)) //don't increment the counter when birdboat gets hit - SEND_SIGNAL(src, COMSIG_TRAM_COLLISION) + SEND_SIGNAL(src, COMSIG_TRAM_COLLISION, collided) unset_movement_registrations(exited_locs) group_move(things_to_move, going) From 9b3ec0c790913fc4a9fc8969d4baeb7fe6f15813 Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:30:57 -0800 Subject: [PATCH 3/5] only exclude horrible goose --- code/game/objects/structures/signs/signs_interactive.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index d4c19d847a0883..8661bdbae5fc43 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -114,7 +114,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/delamination_counter, 32) /obj/structure/sign/collision_counter/proc/new_hit(lift_master, collided_type) SIGNAL_HANDLER - if(!istype(collided_type, /mob/living/carbon/human)) //don't increment the counter when birdboat gets hit + if(istype(collided_type, /mob/living/simple_animal/hostile/retaliate/goose/vomit)) //don't increment the counter when birdboat gets hit return hit_count++ From 4ba43b12caae6c044ea9d01e51eb432dd0eb5645 Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Fri, 20 Jan 2023 22:08:02 -0800 Subject: [PATCH 4/5] only humans, no gaming high score --- code/game/objects/structures/signs/signs_interactive.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index 8661bdbae5fc43..fa1f0b7856c4fb 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -114,7 +114,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/delamination_counter, 32) /obj/structure/sign/collision_counter/proc/new_hit(lift_master, collided_type) SIGNAL_HANDLER - if(istype(collided_type, /mob/living/simple_animal/hostile/retaliate/goose/vomit)) //don't increment the counter when birdboat gets hit + if(!istype(collided_type, /mob/living/carbon/human)) // carbons only so you can't game the high score return hit_count++ From c3437f36a8413a0e8f00b34a6120be599597eee3 Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Sun, 22 Jan 2023 14:43:13 -0800 Subject: [PATCH 5/5] check for client to verify legit player --- code/game/objects/structures/signs/signs_interactive.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/signs/signs_interactive.dm b/code/game/objects/structures/signs/signs_interactive.dm index fa1f0b7856c4fb..49cc3e4bcbaf30 100644 --- a/code/game/objects/structures/signs/signs_interactive.dm +++ b/code/game/objects/structures/signs/signs_interactive.dm @@ -114,7 +114,11 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/delamination_counter, 32) /obj/structure/sign/collision_counter/proc/new_hit(lift_master, collided_type) SIGNAL_HANDLER - if(!istype(collided_type, /mob/living/carbon/human)) // carbons only so you can't game the high score + 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++