SS init tags V2 (#15502)

* SS init tags V2

* Sabre tweaks
This commit is contained in:
AffectedArc07
2021-02-15 13:02:50 -05:00
committed by GitHub
parent 577b24b8dc
commit c7d01c9b57
8 changed files with 77 additions and 100 deletions
-65
View File
@@ -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)