mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Refactor hardcoded lateloaded map define zs (#17290)
* Refactor hardcoded lateloaded map define zs to use a GLOB list instead * Refactor groundbase wilds loading * new to init docking codes * fix space whales excessive deleting * update comment * Forgot some aliases * How is this now a missing turf Remove duplicate turf
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/datum/map_template
|
||||
var/name = "Default Template Name"
|
||||
var/desc = "Some text should go here. Maybe."
|
||||
var/name_alias // Override to what this map gets registered as in map_templates_loaded
|
||||
var/template_group = null // If this is set, no more than one template in the same group will be spawned, per submap seeding.
|
||||
var/width = 0
|
||||
var/height = 0
|
||||
@@ -45,7 +46,7 @@
|
||||
var/list/obj/structure/cable/cables = list()
|
||||
var/list/obj/machinery/atmospherics/atmos_machines = list()
|
||||
var/list/turf/turfs = block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
|
||||
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]))
|
||||
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]))
|
||||
for(var/turf/B as anything in turfs)
|
||||
areas |= B.loc
|
||||
for(var/A in B)
|
||||
@@ -84,6 +85,7 @@
|
||||
x = round((world.maxx - width)/2)
|
||||
y = round((world.maxy - height)/2)
|
||||
|
||||
on_map_preload(world.maxz + 1) //VOREStation Edit
|
||||
var/datum/bapi_parsed_map/map = load_map_bapi(mappath, x, y, no_changeturf = TRUE)
|
||||
var/list/bounds = map.bounds
|
||||
if(!bounds)
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/// An asslist of name=z for map_templates that have been loaded
|
||||
GLOBAL_LIST_EMPTY(map_templates_loaded)
|
||||
|
||||
/// Registers the map into GLOB.map_templates_loaded
|
||||
/datum/map_template/proc/on_map_preload(z)
|
||||
if(name_alias)
|
||||
GLOB.map_templates_loaded[name_alias] = z
|
||||
else
|
||||
GLOB.map_templates_loaded[name] = z
|
||||
|
||||
/datum/map_template/proc/on_map_loaded(z)
|
||||
//We missed air init!
|
||||
if(SSair.subsystem_initialized)
|
||||
@@ -9,4 +19,4 @@
|
||||
var/turf/T = Trf //faster than implicit istype with typed for loop
|
||||
T.lighting_build_overlay()
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user