From 8a8be20c122c35f2a34756cd318710723f80efe1 Mon Sep 17 00:00:00 2001 From: dwasint <82520990+dwasint@users.noreply.github.com> Date: Thu, 9 Nov 2023 19:47:28 -0500 Subject: [PATCH] adds description helper --- .../trading/unusual_effects/_unusual_component.dm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/monkestation/code/modules/trading/unusual_effects/_unusual_component.dm b/monkestation/code/modules/trading/unusual_effects/_unusual_component.dm index 03501d116b2f..f12574fe70cf 100644 --- a/monkestation/code/modules/trading/unusual_effects/_unusual_component.dm +++ b/monkestation/code/modules/trading/unusual_effects/_unusual_component.dm @@ -1,7 +1,7 @@ /datum/component/unusual_handler var/atom/source_object ///the description added to the unusual. - var/unusual_description = "" + var/unusual_description = "Not Implemented Yet Teehee" ///the round the unusual was created at var/round_id = 0 ///the particle spewer component path @@ -23,6 +23,17 @@ source_object = parent source_object.AddComponent(particle_path) + + RegisterSignal(source_object, COMSIG_ATOM_UPDATE_DESC, PROC_REF(append_unusual)) + +/datum/component/unusual_handler/Destroy(force, silent) + . = ..() + UnregisterSignal(source_object, COMSIG_ATOM_UPDATE_DESC) +/datum/component/unusual_handler/proc/append_unusual(atom/source, updates) + SIGNAL_HANDLER + source_object.desc += span_notice("\n Unboxed by: [original_owner_ckey]") + source_object.desc += span_notice("\n Unboxed on: [round_id]") + source_object.desc += span_notice("\n Unusual Type: [unusual_description]") /datum/component/unusual_handler/proc/setup_from_list(list/parsed_results) return