From 57d93e43e4e9a0b7bd071e3d7c7b036dc826b038 Mon Sep 17 00:00:00 2001 From: KageIIte Date: Tue, 16 Jul 2024 12:56:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BE=D0=BF=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B0?= =?UTF-8?q?=D1=81=D0=BB=D0=B5=D0=B4=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D1=80=D0=BD=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../instruments/code/drumskit.dm | 25 ++++++++----------- tgstation_unit_test_focus_file.dm | 1 + 2 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 tgstation_unit_test_focus_file.dm diff --git a/modular_bandastation/instruments/code/drumskit.dm b/modular_bandastation/instruments/code/drumskit.dm index 812331dbc34d4..1185790910385 100644 --- a/modular_bandastation/instruments/code/drumskit.dm +++ b/modular_bandastation/instruments/code/drumskit.dm @@ -1,4 +1,4 @@ -/obj/structure/musician/drumskit +/obj/structure/musician/piano/drumskit name = "\proper барабанная установка" desc = "Складная барбанная установка с несколькими томами и тарелками." icon = 'modular_bandastation/instruments/icons/samurai_guitar.dmi' @@ -9,34 +9,33 @@ var/active = FALSE //Использутся, чтобы отслеживать, персонаж должен лежать или "сидеть" (стоять) buckle_lying = FALSE - //Задает состояния и флаги Атома (как я понял) - взято из машинерии, иначе в строчке 75 вышибается ошибка - var/stat = 0 + broken_icon_state = "drum_red_broken" -/obj/structure/musician/drumskit/examine() +/obj/structure/musician/piano/drumskit/examine() . = ..() . += "Используйте гаечный ключ, чтобы разобрать для транспортировки и собрать для игры." -/obj/structure/musician/drumskit/Initialize(mapload) +/obj/structure/musician/piano/drumskit/Initialize(mapload) . = ..() //Выбирает инструмент по умолчанию song = new(src, "drums", 15) allowed_instrument_ids = null -/obj/structure/musician/drumskit/Destroy() +/obj/structure/musician/piano/drumskit/Destroy() UnregisterSignal(src, list(COMSIG_INSTRUMENT_START, COMSIG_INSTRUMENT_END)) return ..() -/obj/structure/musician/drumskit/proc/start_playing() +/obj/structure/musician/piano/drumskit/proc/start_playing() SIGNAL_HANDLER active = TRUE update_icon(UPDATE_ICON_STATE) -/obj/structure/musician/drumskit/proc/stop_playing() +/obj/structure/musician/piano/drumskit/proc/stop_playing() SIGNAL_HANDLER active = FALSE update_icon(UPDATE_ICON_STATE) -/obj/structure/musician/drumskit/wrench_act(mob/living/user, obj/item/I) +/obj/structure/musician/piano/drumskit/wrench_act(mob/living/user, obj/item/I) if(active || (resistance_flags & INDESTRUCTIBLE)) return @@ -61,7 +60,7 @@ return TRUE -/obj/structure/musician/drumskit/attack_hand(mob/user) +/obj/structure/musician/piano/drumskit/attack_hand(mob/user) add_fingerprint(user) if(!anchored) @@ -69,11 +68,9 @@ ui_interact(user) -/obj/structure/musician/drumskit/update_icon_state() +/obj/structure/musician/piano/drumskit/update_icon_state() .=..() - if(stat & (BROKEN)) - icon_state = "[base_icon_state]_broken" - else if(anchored) + if(anchored) icon_state = "[base_icon_state][active ? "_active" : null]" setDir(SOUTH) diff --git a/tgstation_unit_test_focus_file.dm b/tgstation_unit_test_focus_file.dm new file mode 100644 index 0000000000000..f48bf0aabec5e --- /dev/null +++ b/tgstation_unit_test_focus_file.dm @@ -0,0 +1 @@ +TEST_FOCUS(/datum/unit_test/create_and_destroy)