diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index a6c3f175558..df9a3db4d40 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -103,8 +103,20 @@ switch(action) if("load_program") var/program_to_load = text2path(params["type"]) - if(!ispath(program_to_load) || !(program_to_load in program_cache || program_to_load in emag_programs)) + if(!ispath(program_to_load)) return FALSE + var/valid = FALSE + var/list/checked = program_cache + if(obj_flags & EMAGGED) + checked |= emag_programs + for(var/prog in checked) + var/list/P = prog + if(P["type"] == program_to_load) + valid = TRUE + break + if(!valid) + return FALSE + var/area/A = locate(program_to_load) in GLOB.sortedAreas if(A) load_program(A)