mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
Fixes this properly.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user