Adds screentips to grilles, moves deconstruction to RMB. (#95903)

This commit is contained in:
ArcaneMusic
2026-05-14 08:54:25 -04:00
committed by GitHub
parent faee66a35c
commit ddc51bd5d8
+14 -3
View File
@@ -31,6 +31,7 @@
/obj/structure/grille/Initialize(mapload)
. = ..()
AddElement(/datum/element/atmos_sensitive, mapload)
register_context()
/obj/structure/grille/Destroy()
update_cable_icons_on_turf(get_turf(src))
@@ -59,9 +60,19 @@
if(resistance_flags & INDESTRUCTIBLE)
return
if(anchored)
. += span_notice("It's secured in place with <b>screws</b>. The rods look like they could be <b>cut</b> through.")
. += span_notice("It's secured in place with [EXAMINE_HINT("screws")]. The rods look like they could be [EXAMINE_HINT("cut")] through.")
else
. += span_notice("The anchoring screws are <i>unscrewed</i>. The rods look like they could be <b>cut</b> through.")
. += span_notice("The anchoring screws are [EXAMINE_HINT("unscrewed")]. The rods look like they could be [EXAMINE_HINT("cut")] through.")
/obj/structure/grille/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
if(held_item?.tool_behaviour == TOOL_WIRECUTTER)
context[SCREENTIP_CONTEXT_RMB] = "Deconstruct"
return CONTEXTUAL_SCREENTIP_SET
if(held_item?.tool_behaviour == TOOL_SCREWDRIVER)
context[SCREENTIP_CONTEXT_LMB] = "[anchored ? "Unanchor" : "Anchor"]"
return CONTEXTUAL_SCREENTIP_SET
return .
/obj/structure/grille/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
switch(the_rcd.mode)
@@ -199,7 +210,7 @@
return TRUE
return FALSE
/obj/structure/grille/wirecutter_act(mob/living/user, obj/item/tool)
/obj/structure/grille/wirecutter_act_secondary(mob/living/user, obj/item/tool)
add_fingerprint(user)
if(shock(user, 100))
return