Skip to content

Commit 04e49ce

Browse files
authored
Fix panel lock (#275)
* Cyborg panel locking tweaks * add incapacitated check
1 parent 5bca39a commit 04e49ce

File tree

1 file changed

+6
-3
lines changed
  • code/modules/mob/living/silicon/robot

1 file changed

+6
-3
lines changed

code/modules/mob/living/silicon/robot/robot.dm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,17 +416,20 @@
416416
/mob/living/silicon/robot/verb/toggle_panel_lock()
417417
set name = "Toggle Panel Lock"
418418
set category = "Silicon Commands"
419-
to_chat(src, "You begin [locked ? "" : "un"]locking your panel.")
419+
if(opened || !has_power || incapacitated())
420+
to_chat(src, span_warning("You are unable to interact with your panel lock."))
421+
return FALSE
422+
to_chat(src, span_notice("You begin [!locked ? "" : "un"]locking your panel."))
420423
if(!opened && has_power && do_after(usr, 80) && !opened && has_power)
421-
to_chat(src, "You [locked ? "un" : ""]locked your panel.")
424+
to_chat(src, span_notice("You [locked ? "un" : ""]locked your panel."))
422425
locked = !locked
423426

424427
/mob/living/silicon/robot/verb/toggle_lights()
425428
set category = "Silicon Commands"
426429
set name = "Toggle Lights"
427430

428431
lights_on = !lights_on
429-
to_chat(usr, "You [lights_on ? "enable" : "disable"] your integrated light.")
432+
to_chat(usr, span_notice("You [lights_on ? "enable" : "disable"] your integrated light."))
430433
if(lights_on)
431434
set_light(5)
432435
else

0 commit comments

Comments
 (0)