From 16684276b3842db6be4e1f73531e7bd819201f37 Mon Sep 17 00:00:00 2001 From: Luc <89928798+lewcc@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:27:31 -0500 Subject: [PATCH] Fixes some display issues with the next step on the surgical computer (#27972) * Fixes some surgical computer issues * better naming --- code/__DEFINES/tools_defines.dm | 9 +++++++++ code/modules/surgery/surgery.dm | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/tools_defines.dm b/code/__DEFINES/tools_defines.dm index 5cfb9c40ca6..c2a7efed8bf 100644 --- a/code/__DEFINES/tools_defines.dm +++ b/code/__DEFINES/tools_defines.dm @@ -6,6 +6,15 @@ #define TOOL_WRENCH "wrench" #define TOOL_WELDER "welder" +GLOBAL_LIST_INIT(construction_tool_behaviors, list( + TOOL_CROWBAR, + TOOL_MULTITOOL, + TOOL_SCREWDRIVER, + TOOL_WIRECUTTER, + TOOL_WRENCH, + TOOL_WELDER +)) + // Surgery tools #define TOOL_RETRACTOR "retractor" #define TOOL_HEMOSTAT "hemostat" diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 9eb5313d57a..2ee8ddfb8ea 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -500,15 +500,15 @@ var/list/tools = list() for(var/tool in allowed_tools) // only list main surgery tools. you can figure out the improvised version by trying (or reading the wiki lul) - if(tool in GLOB.surgery_tool_behaviors) + if((tool in GLOB.surgery_tool_behaviors) || ((tool in GLOB.construction_tool_behaviors) && allowed_tools[tool] == 100)) tools |= tool if(!length(tools)) // if nothing else, just pick the first in the list. var/atom/tool = allowed_tools[1] - tools |= tool.name + tools |= (ispath(tool)) ? tool::name : "[tool]" - return "[name] ([english_list(tools, and_text="or")])" + return "[name] ([english_list(tools, and_text=" or ")])" /** * Spread some nasty germs to an organ.