Adds support for locking holodeck templates to security levels, and locks medical holodeck behind red or delta seclevel.

This commit is contained in:
AsV9
2019-11-18 16:19:11 +01:00
parent d078258017
commit ff23246d3d
2 changed files with 6 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
var/obj/machinery/computer/holodeck/linked
var/restricted = 0 // if true, program goes on emag list
var/minimum_sec_level = SEC_LEVEL_GREEN //override this var if you want the program to be locked to a different alert-level (eg. SEC_LEVEL_BLUE, SEC_LEVEL_RED, SEC_LEVEL_DELTA)
/*
Power tracking: Use the holodeck computer's power grid
@@ -77,6 +78,7 @@
/area/holodeck/rec_center/medical
name = "Holodeck - Emergency Medical"
minimum_sec_level = SEC_LEVEL_RED
/area/holodeck/rec_center/pet_lounge
name = "Holodeck - Pet Park"

View File

@@ -231,11 +231,13 @@
var/obj/effect/holodeck_effect/HE = e
HE.safety(active)
/obj/machinery/computer/holodeck/proc/load_program(area/A, force = FALSE, add_delay = TRUE)
/obj/machinery/computer/holodeck/proc/load_program(area/holodeck/A, force = FALSE, add_delay = TRUE)
if(!is_operational())
A = offline_program
force = TRUE
if(A.minimum_sec_level > GLOB.security_level && !force && !(obj_flags & EMAGGED))
say("ERROR. Program currently unavailiable, the security level is not high enough.")
return
if(program == A)
return
if(current_cd > world.time && !force)