mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
refactor toggle_door_locks
This commit is contained in:
@@ -309,13 +309,11 @@
|
||||
for(var/obj/machinery/computer/syndicate_depot/C in src)
|
||||
C.security_lockout = FALSE
|
||||
|
||||
/area/syndicate_depot/core/proc/toggle_door_locks()
|
||||
/area/syndicate_depot/core/proc/set_emergency_access(var/openaccess)
|
||||
for(var/obj/machinery/door/airlock/A in src)
|
||||
if(istype(A, /obj/machinery/door/airlock/hatch/syndicate/vault))
|
||||
continue
|
||||
A.emergency = !A.emergency
|
||||
if(A.locked)
|
||||
A.locked = !A.locked
|
||||
A.emergency = !!openaccess
|
||||
A.update_icon()
|
||||
|
||||
/area/syndicate_depot/core/proc/toggle_falsewalls()
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
/obj/machinery/computer/syndicate_depot/doors
|
||||
name = "depot door control computer"
|
||||
req_access = list()
|
||||
var/pub_access = FALSE
|
||||
|
||||
/obj/machinery/computer/syndicate_depot/doors/get_menu(mob/user)
|
||||
return {"<B>Syndicate Depot Door Control Computer</B><HR>
|
||||
@@ -137,8 +138,13 @@
|
||||
if(..())
|
||||
return
|
||||
if(depotarea)
|
||||
depotarea.toggle_door_locks(src)
|
||||
to_chat(user, "<span class='notice'>Door locks toggled.</span>")
|
||||
pub_access = !pub_access
|
||||
if(pub_access)
|
||||
depotarea.set_emergency_access(TRUE)
|
||||
to_chat(user, "<span class='notice'>Emergency Access enabled.</span>")
|
||||
else
|
||||
depotarea.set_emergency_access(FALSE)
|
||||
to_chat(user, "<span class='notice'>Emergency Access disabled.</span>")
|
||||
playsound(user, sound_yes, 50, 0)
|
||||
|
||||
/obj/machinery/computer/syndicate_depot/doors/secondary(mob/user, subcommand)
|
||||
|
||||
Reference in New Issue
Block a user