mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Seperates map reader parsing from loading (#38764)
* Seperates map reader parsing from loading * Compile fixes * Uhhh, ok dm * Ugh * Fix one error... * FIxes model caching
This commit is contained in:
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/z_list
|
||||
var/datum/space_level/transit
|
||||
var/datum/space_level/empty_space
|
||||
var/dmm_suite/loader
|
||||
var/datum/maploader/loader
|
||||
|
||||
/datum/controller/subsystem/mapping/PreInit()
|
||||
if(!config)
|
||||
@@ -178,7 +178,8 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/total_z = 0
|
||||
for (var/file in files)
|
||||
var/full_path = "_maps/[path]/[file]"
|
||||
var/bounds = loader.load_map(file(full_path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE)
|
||||
var/datum/parsed_map/pm = loader.load_map(file(full_path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE)
|
||||
var/bounds = pm?.bounds
|
||||
files[file] = total_z // save the start Z of this file
|
||||
total_z += bounds[MAP_MAXZ] - bounds[MAP_MINZ] + 1
|
||||
|
||||
@@ -202,7 +203,8 @@ SUBSYSTEM_DEF(mapping)
|
||||
// load the maps
|
||||
for (var/file in files)
|
||||
var/full_path = "_maps/[path]/[file]"
|
||||
if(!loader.load_map(file(full_path), 0, 0, start_z + files[file], no_changeturf = TRUE))
|
||||
var/datum/parsed_map/parsed = loader.load_map(file(full_path), 0, 0, start_z + files[file], no_changeturf = TRUE)
|
||||
if(!parsed?.bounds)
|
||||
errorList |= full_path
|
||||
if(!silent)
|
||||
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
|
||||
|
||||
Reference in New Issue
Block a user