mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Improves status display examination feedback. Ensures output is properly sanitized.
This commit is contained in:
@@ -118,15 +118,17 @@
|
|||||||
update_display(line1, line2)
|
update_display(line1, line2)
|
||||||
return 1
|
return 1
|
||||||
if(STATUS_DISPLAY_TIME)
|
if(STATUS_DISPLAY_TIME)
|
||||||
update_display("TIME", worldtime2text())
|
message1 = "TIME"
|
||||||
|
message2 = worldtime2text()
|
||||||
|
update_display(message1, message2)
|
||||||
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/machinery/status_display/examine()
|
/obj/machinery/status_display/examine()
|
||||||
set src in view()
|
set src in view()
|
||||||
. = ..()
|
. = ..()
|
||||||
switch(mode)
|
if(mode != STATUS_DISPLAY_BLANK && mode != STATUS_DISPLAY_ALERT)
|
||||||
if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME,2)
|
usr << "The display says:<br>\t[sanitize(message1)]<br>\t[sanitize(message2)]"
|
||||||
usr << "The display says:<br>\t<xmp>[message1]</xmp><br>\t<xmp>[message2]</xmp>"
|
|
||||||
|
|
||||||
/obj/machinery/status_display/proc/set_message(m1, m2)
|
/obj/machinery/status_display/proc/set_message(m1, m2)
|
||||||
if(m1)
|
if(m1)
|
||||||
|
|||||||
@@ -27,12 +27,6 @@
|
|||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/machinery/status_display/supply_display/examine()
|
|
||||||
if(mode == STATUS_DISPLAY_CUSTOM)
|
|
||||||
usr << "The display says:<br>\t<xmp>[message1]</xmp><br>\t<xmp>[message2]</xmp>"
|
|
||||||
else
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/machinery/status_display/supply_display/receive_signal/(datum/signal/signal)
|
/obj/machinery/status_display/supply_display/receive_signal/(datum/signal/signal)
|
||||||
if(signal.data["command"] == "supply")
|
if(signal.data["command"] == "supply")
|
||||||
mode = STATUS_DISPLAY_CUSTOM
|
mode = STATUS_DISPLAY_CUSTOM
|
||||||
|
|||||||
Reference in New Issue
Block a user