From ec5c8ceb10731505ba62dd7df11b9b10ad45edb5 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Mon, 15 Sep 2025 08:00:20 -0400 Subject: [PATCH] Mech Examine Improvements (#21357) This PR makes it so that examining a mech provides clickable descriptions for its hardpoints, which allows players to directly view the mechanics hints for specific pieces of equipment. I have actually tested this PR, and here's a screenshot showing it works. image --- code/modules/heavy_vehicle/mecha.dm | 19 +------------------ .../hellfirejag-mech-examine-improvements.yml | 4 ++++ 2 files changed, 5 insertions(+), 18 deletions(-) create mode 100644 html/changelogs/hellfirejag-mech-examine-improvements.yml diff --git a/code/modules/heavy_vehicle/mecha.dm b/code/modules/heavy_vehicle/mecha.dm index 35f8f6c9656..dbd98e080d0 100644 --- a/code/modules/heavy_vehicle/mecha.dm +++ b/code/modules/heavy_vehicle/mecha.dm @@ -156,7 +156,7 @@ . += SPAN_NOTICE("It has the following hardpoints:") for(var/hardpoint in hardpoints) var/obj/item/I = hardpoints[hardpoint] - . += "- [hardpoint]: [istype(I) ? SPAN_NOTICE("[I]") : "nothing"]." + . += "- [hardpoint]: [istype(I) ? "[I.name]" : "nothing"]." else . += "It has no visible hardpoints." @@ -175,23 +175,6 @@ damage_string = SPAN_DANGER("destroyed") . += "Its [thing.name] [thing.gender == PLURAL ? "are" : "is"] [damage_string]." -/mob/living/heavy_vehicle/mechanics_hints(mob/user, distance, is_adjacent) - . += ..() - var/list/hardpoint_hints = list() - for(var/hardpoint in hardpoints) - var/obj/item/mecha_equipment/I = hardpoints[hardpoint] - if(!istype(I) || !length(I.module_hints)) - continue - hardpoint_hints += "- [hardpoint]: [SPAN_NOTICE("[I]")]" - hardpoint_hints += I.relayed_mechanics_hints(user, distance, is_adjacent) - - if(length(hardpoint_hints)) - . += "Its hardpoints have the following mechanics:" - . += hardpoint_hints - return - // Mech has no hardpoints, let's teach them how to fix that instead. - . += "modules can be attached to a mech by clicking on the mech with a module in hand." - /mob/living/heavy_vehicle/Topic(href,href_list[]) if (href_list["examine"]) var/mob/M = locate(href_list["examine"]) diff --git a/html/changelogs/hellfirejag-mech-examine-improvements.yml b/html/changelogs/hellfirejag-mech-examine-improvements.yml new file mode 100644 index 00000000000..126003a49e4 --- /dev/null +++ b/html/changelogs/hellfirejag-mech-examine-improvements.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - rscadd: "Examining a mech now provides clickable descriptions for its hardpoints, which can be further examined to view the mechanics hints of its mounted equipment."