Object Examine Text Overhaul (#20923)

Extends and reworks how various extended information text (desc_info,
desc_build, desc_upgrades) are handled to make object interactions and
mechanics A.) much more clearly documented in-game and B.) much easier
to support from the back-end.

Almost certainly a candidate for test merge.

Assembly/Disassembly instructions are noticeably sporadic, largely due
to our current lack of a unified framework. That's a future thing I'd
like to attack so that it can be handled programmatically, but for now I
only targeted the biggest culprits as I came across them.

---------

Signed-off-by: Batrachophreno <Batrochophreno@gmail.com>
This commit is contained in:
Batrachophreno
2025-07-21 15:35:14 +00:00
committed by GitHub
parent 827985ea9f
commit 387cee9243
391 changed files with 4203 additions and 2828 deletions
@@ -31,9 +31,23 @@ ABSTRACT_TYPE(/obj/structure/engineer_maintenance)
/// The key-value list of tools that can be used on the panel once it's been opened. The key is the typepath of the item, and the value is a singleton which holds some data to be used
var/list/panel_tools
/// The list of tool names that can be used on the panel once it's open, but in name format, to be used in get_examine_text
/// The list of tool names that can be used on the panel once it's open, but in name format, to be used in mechanics_hints
var/list/panel_tool_names = list()
/obj/structure/engineer_maintenance/mechanics_hints(mob/user, distance, is_adjacent)
. += ..()
. += SPAN_NOTICE("Any wrench, or an impact drill with the wrenchbit selected, can be used to open/close the panel.")
if(panel_open)
. += SPAN_NOTICE("The following tools can be used to interact with the panel:")
for(var/tool_name in panel_tool_names)
. += SPAN_NOTICE("- [tool_name]")
/obj/structure/engineer_maintenance/feedback_hints(mob/user, distance, is_adjacent)
. += ..()
if(panel_open)
. += SPAN_NOTICE(detailed_desc)
. += SPAN_ITALIC("OOC NOTE: This object is purely a fluff item, and has no mechanical effect.")
/obj/structure/engineer_maintenance/Initialize(mapload)
. = ..()
name = panel_location == PANEL_LOCATION_FLOOR ? "maintenance panel" : "large maintenance panel" // floor panels are smaller than the wall mounted ones
@@ -50,21 +64,6 @@ ABSTRACT_TYPE(/obj/structure/engineer_maintenance)
SIGNAL_HANDLER
qdel(src)
/obj/structure/engineer_maintenance/get_examine_text(mob/user, distance, is_adjacent, infix, suffix, get_extended)
. = ..()
if(panel_open)
. += SPAN_NOTICE("---")
. += SPAN_NOTICE(detailed_desc)
. += SPAN_NOTICE("---")
. += SPAN_NOTICE("Any wrench, or an impact drill with the wrenchbit selected, can be used to open/close the panel.")
if(panel_open)
. += SPAN_NOTICE("---")
. += SPAN_NOTICE("The following tools can be used to interact with the panel:")
for(var/tool_name in panel_tool_names)
. += SPAN_NOTICE("- [tool_name]")
. += SPAN_ITALIC("OOC NOTE: This object is purely a fluff item, and has no mechanical effect.")
/obj/structure/engineer_maintenance/update_icon()
if(!panel_open)
icon_state = initial(icon_state)
@@ -219,15 +218,12 @@ ABSTRACT_TYPE(/obj/structure/engineer_maintenance)
if(finish_sound)
playsound(get_turf(target), finish_sound, 30, TRUE)
/singleton/engineer_maintenance_tool/steam_pipe
finish_sound = /singleton/sound_category/steam_pipe
/singleton/engineer_maintenance_tool/electrical_hum
finish_sound = /singleton/sound_category/electrical_hum
/singleton/engineer_maintenance_tool/electrical_spark
finish_sound = /singleton/sound_category/electrical_spark