From e7641dd004bd562663d6481cdf0a42a49467e7d3 Mon Sep 17 00:00:00 2001 From: Cruix Date: Fri, 5 Jan 2018 03:55:52 -0800 Subject: [PATCH] Made the squeek component not make things squeak so often (#34082) --- code/datums/components/squeek.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/datums/components/squeek.dm b/code/datums/components/squeek.dm index 7b9a7866ca..7a362f0391 100644 --- a/code/datums/components/squeek.dm +++ b/code/datums/components/squeek.dm @@ -24,7 +24,8 @@ if(use_delay_override) use_delay = use_delay_override - RegisterSignal(list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_MOVABLE_CROSSED, COMSIG_MOVABLE_COLLIDE, COMSIG_MOVABLE_IMPACT, COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ), .proc/play_squeak) + RegisterSignal(list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_MOVABLE_COLLIDE, COMSIG_MOVABLE_IMPACT, COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ), .proc/play_squeak) + RegisterSignal(COMSIG_MOVABLE_CROSSED, .proc/play_squeak_turf) RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/use_squeak) RegisterSignal(COMSIG_SHOES_STEP_ACTION, .proc/step_squeak) @@ -42,6 +43,11 @@ else steps++ +/datum/component/squeak/proc/play_squeak_turf() + var/atom/current_parent = parent + if(isturf(current_parent.loc)) + play_squeak() + /datum/component/squeak/proc/use_squeak() if(last_use + use_delay < world.time) last_use = world.time