From 1a18086a3b97ee19c4e41466575d0243467ae435 Mon Sep 17 00:00:00 2001 From: AnturK Date: Tue, 18 Jun 2019 22:46:16 +0200 Subject: [PATCH] Fixes this properly. --- code/modules/holodeck/computer.dm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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)