mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Fixes runtime from examining mod PCs (#81200)
## About The Pull Request It's a classic  `EXAMINE_HINT(x)` resolves to `"<b>" + x + "</b>"` When placed in this line directly, you get: `["<b>" + HAS_TRAIT_FROM(...) ? "..." : "..." + "</b>"]` You see the issue, right? This resolves as you would expect: `("<b>" + HAS_TRAIT_FROM(...)) ? ("...") : ("..." + "</b>")` Which, of course, runtimes as it's adding a string to an integer (0). By pulling it out to its own var we can get around this: `["<b>" + frame_or_pc + "</b>"]` ## Changelog 🆑 Melbert fix: Fixed examining modular PCs /🆑
This commit is contained in:
@@ -70,7 +70,8 @@
|
||||
/obj/machinery/modular_computer/examine(mob/user)
|
||||
. = cpu?.examine(user) || ..()
|
||||
. += span_info("You can toggle interaction between computer and its machinery frame with [EXAMINE_HINT("Right-Click")] while empty-handed.")
|
||||
. += span_info("Currently interacting with [EXAMINE_HINT(HAS_TRAIT_FROM(src, TRAIT_MODPC_INTERACTING_WITH_FRAME, REF(user)) ? "frame" : "computer")].")
|
||||
var/frame_or_pc = HAS_TRAIT_FROM(src, TRAIT_MODPC_INTERACTING_WITH_FRAME, REF(user)) ? "frame" : "computer"
|
||||
. += span_info("Currently interacting with [EXAMINE_HINT(frame_or_pc)].")
|
||||
|
||||
/obj/machinery/modular_computer/attack_ghost(mob/dead/observer/user)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user