mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
@@ -38,71 +38,6 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
|
||||
qdel(otherthing)
|
||||
T.ChangeTurf(T.baseturf)
|
||||
|
||||
/proc/createRandomZlevel()
|
||||
if(GLOB.awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
if(GLOB.potentialRandomZlevels && GLOB.potentialRandomZlevels.len)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Loading away mission...")
|
||||
|
||||
var/map = pick(GLOB.potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
var/zlev = GLOB.space_manager.add_new_zlevel(AWAY_MISSION, linkage = UNAFFECTED, traits = list(AWAY_LEVEL,BLOCK_TELEPORT))
|
||||
GLOB.space_manager.add_dirt(zlev)
|
||||
GLOB.maploader.load_map(file, z_offset = zlev)
|
||||
late_setup_level(block(locate(1, 1, zlev), locate(world.maxx, world.maxy, zlev)))
|
||||
GLOB.space_manager.remove_dirt(zlev)
|
||||
log_world(" Away mission loaded: [map]")
|
||||
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(L.name != "awaystart")
|
||||
continue
|
||||
GLOB.awaydestinations.Add(L)
|
||||
|
||||
log_startup_progress(" Away mission loaded in [stop_watch(watch)]s.")
|
||||
|
||||
else
|
||||
log_startup_progress(" No away missions found.")
|
||||
return
|
||||
|
||||
|
||||
/proc/createALLZlevels()
|
||||
if(GLOB.awaydestinations.len) //crude, but it saves another var!
|
||||
return
|
||||
|
||||
if(GLOB.potentialRandomZlevels && GLOB.potentialRandomZlevels.len)
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Loading away missions...")
|
||||
|
||||
for(var/map in GLOB.potentialRandomZlevels)
|
||||
var/file = file(map)
|
||||
if(isfile(file))
|
||||
log_startup_progress("Loading away mission: [map]")
|
||||
var/zlev = GLOB.space_manager.add_new_zlevel()
|
||||
GLOB.space_manager.add_dirt(zlev)
|
||||
GLOB.maploader.load_map(file, z_offset = zlev)
|
||||
late_setup_level(block(locate(1, 1, zlev), locate(world.maxx, world.maxy, zlev)))
|
||||
GLOB.space_manager.remove_dirt(zlev)
|
||||
log_world(" Away mission loaded: [map]")
|
||||
|
||||
//map_transition_config.Add(AWAY_MISSION_LIST)
|
||||
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(L.name != "awaystart")
|
||||
continue
|
||||
GLOB.awaydestinations.Add(L)
|
||||
|
||||
log_startup_progress(" Away mission loaded in [stop_watch(watch)]s.")
|
||||
watch = start_watch()
|
||||
|
||||
else
|
||||
log_startup_progress(" No away missions found.")
|
||||
return
|
||||
|
||||
/proc/generateMapList(filename)
|
||||
var/list/potentialMaps = list()
|
||||
var/list/Lines = file2list(filename)
|
||||
|
||||
Reference in New Issue
Block a user