Adds 'Forced Shutdown' verb to computers (#20032)

What it says on the tin. Adds a "Force Shutdown" right-click verb to
computers that allows you to forcibly terminate them. Useful in the
event the TGUI bluescreens, or the program hangs for some reason.
This commit is contained in:
naut
2024-10-15 03:26:10 +08:00
committed by GitHub
parent bf0b77b944
commit bef0f2694e
3 changed files with 67 additions and 0 deletions
@@ -68,6 +68,7 @@
hard_drive.store_file(prog)
/obj/item/modular_computer/proc/handle_verbs()
verbs += /obj/item/modular_computer/proc/force_shutdown
if(card_slot)
if(card_slot.stored_card)
verbs += /obj/item/modular_computer/proc/eject_id
@@ -1,3 +1,11 @@
/obj/item/modular_computer/proc/force_shutdown()
set name = "Force Shutdown"
set category = "Object"
set src in view(1)
to_chat(usr, SPAN_NOTICE("You long-press the power button on \the [src], causing it to forcibly power off."))
shutdown_computer(TRUE)
/obj/item/modular_computer/proc/eject_id()
set name = "Eject ID"
set category = "Object"