From a81cc2ea9acf8b0df7cb75d16f436d7d05e80ac0 Mon Sep 17 00:00:00 2001 From: PhantornRU Date: Tue, 14 Nov 2023 23:24:20 +1000 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D1=81?= =?UTF-8?q?=D0=B8=D0=B3=D0=BD=D0=B0=D0=BB=D0=BB=D0=B5=D1=80=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_ss220/_defines220/code/signals_atom.dm | 2 ++ .../clumsy_table/code/clumsy_climb_component.dm | 2 ++ modular_ss220/clumsy_table/code/clumsy_table.dm | 15 ++++----------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/modular_ss220/_defines220/code/signals_atom.dm b/modular_ss220/_defines220/code/signals_atom.dm index 12bb802d5a72..81b81734f058 100644 --- a/modular_ss220/_defines220/code/signals_atom.dm +++ b/modular_ss220/_defines220/code/signals_atom.dm @@ -1,2 +1,4 @@ +/// called by /obj/structure/table/do_climb() : (/datum/component/clumsy_climb) #define COMSIG_CLIMBED_ON "climb_on" +/// called by /datum/emote/living/dance/run_emote() : (/datum/component/clumsy_climb) #define COMSIG_DANCED_ON "dance_on" diff --git a/modular_ss220/clumsy_table/code/clumsy_climb_component.dm b/modular_ss220/clumsy_table/code/clumsy_climb_component.dm index 4cae9fbfb1db..3bf0c1ac6b91 100644 --- a/modular_ss220/clumsy_table/code/clumsy_climb_component.dm +++ b/modular_ss220/clumsy_table/code/clumsy_climb_component.dm @@ -80,3 +80,5 @@ item_to_throw.pixel_y = rand(0, 10) item_to_throw.force /= force_mod item_to_throw.throwforce /= force_mod + + qdel(src) diff --git a/modular_ss220/clumsy_table/code/clumsy_table.dm b/modular_ss220/clumsy_table/code/clumsy_table.dm index c4b6dfd0524d..7e4635806d59 100644 --- a/modular_ss220/clumsy_table/code/clumsy_table.dm +++ b/modular_ss220/clumsy_table/code/clumsy_table.dm @@ -1,16 +1,9 @@ /obj/structure/table/Crossed(atom/movable/AM, oldloc) - add_clumsy_climb() + AddComponent(/datum/component/clumsy_climb, 5) . = ..() - remove_clumsy_climb() /obj/structure/table/do_climb(mob/living/user) - add_clumsy_climb() - . = ..() - SEND_SIGNAL(src, COMSIG_CLIMBED_ON, user) - remove_clumsy_climb() - -/obj/structure/table/proc/add_clumsy_climb() + if(!..()) + return FALSE AddComponent(/datum/component/clumsy_climb, 15) - -/obj/structure/table/proc/remove_clumsy_climb() - qdel(GetComponent(/datum/component/clumsy_climb)) + SEND_SIGNAL(src, COMSIG_CLIMBED_ON, user)