Holodeck fixes

This commit is contained in:
AnturK
2016-02-12 14:03:36 +01:00
parent 35ab127543
commit dcf5bfb273
2 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -91,12 +91,12 @@
for(var/obj/O in T)
var/obj/O2 = DuplicateObject(O , 1, newloc = X, nerf=nerf_weapons)
if(!O2) continue
copiedobjs += O2.GetAllContents() + O2
copiedobjs += O2.GetAllContents()
for(var/mob/M in T)
if(istype(M, /mob/camera)) continue // If we need to check for more mobs, I'll add a variable
var/mob/SM = DuplicateObject(M , 1, newloc = X)
copiedobjs += SM.GetAllContents() + SM
copiedobjs += SM.GetAllContents()
var/global/list/forbidden_vars = list("type","stat","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")
for(var/V in T.vars - forbidden_vars)
+8 -5
View File
@@ -153,7 +153,7 @@
if(!Adjacent(usr) && !istype(usr, /mob/living/silicon))
return
usr.set_machine(src)
src.add_fingerprint(usr)
add_fingerprint(usr)
if(href_list["loadarea"])
var/areapath = text2path(href_list["loadarea"])
if(!ispath(areapath, /area/holodeck))
@@ -161,14 +161,17 @@
var/area/holodeck/area = locate(areapath)
if(!istype(area))
return
if((area in program_cache) || (emagged && (area in emag_programs)))
if(area == offline_program || (area in program_cache) || (emagged && (area in emag_programs)))
load_program(area)
else if("safety" in href_list)
var/safe = text2num(href_list["safety"])
emagged = !safe
if(!program)
return
if(safe && (program in emag_programs))
emergency_shutdown()
nerf(safe)
src.updateUsrDialog()
updateUsrDialog()
/obj/machinery/computer/holodeck/proc/nerf(active)
for(var/obj/item/I in spawned)
@@ -181,12 +184,12 @@
if(!emag_programs.len)
user << "[src] does not seem to have a card swipe port. It must be an inferior model."
return
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
playsound(loc, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
user << "<span class='warning'>You vastly increase projector power and override the safety and security protocols.</span>"
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator."
log_game("[key_name(user)] emagged the Holodeck Control Console")
src.updateUsrDialog()
updateUsrDialog()
nerf(!emagged)
/obj/machinery/computer/holodeck/Destroy()