mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 21:19:44 +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:
@@ -18,10 +18,6 @@ SUBSYSTEM_DEF(mapping)
|
||||
world.max_z_changed() // This is to set up the player z-level list, maxz hasn't actually changed (probably)
|
||||
load_map_templates()
|
||||
|
||||
if(CONFIG_GET(flag/generate_map))
|
||||
// Map-gen is still very specific to the map, however putting it here should ensure it loads in the correct order.
|
||||
using_map.perform_map_generation()
|
||||
|
||||
loadEngine()
|
||||
preloadShelterTemplates() // VOREStation EDIT: Re-enable Shelter Capsules
|
||||
// Mining generation probably should be here too
|
||||
@@ -29,6 +25,10 @@ SUBSYSTEM_DEF(mapping)
|
||||
// Lateload Code related to Expedition areas.
|
||||
if(using_map) // VOREStation Edit: Re-enable this.
|
||||
loadLateMaps()
|
||||
|
||||
if(CONFIG_GET(flag/generate_map)) // VOREStation Edit: Re-order this.
|
||||
// Map-gen is still very specific to the map, however putting it here should ensure it loads in the correct order.
|
||||
using_map.perform_map_generation()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/load_map_templates()
|
||||
@@ -157,6 +157,51 @@ SUBSYSTEM_DEF(mapping)
|
||||
admin_notice("Redgate: [MT]", R_DEBUG)
|
||||
MT.load_new_z(centered = FALSE)
|
||||
|
||||
// Convert ai_shell_allowed_levels to actual Zs
|
||||
for(var/i in 1 to length(using_map.ai_shell_allowed_levels))
|
||||
var/current = using_map.ai_shell_allowed_levels[i]
|
||||
if(isnum(current))
|
||||
continue
|
||||
using_map.ai_shell_allowed_levels[i] = GLOB.map_templates_loaded[current]
|
||||
|
||||
// Convert overmap_z to actual Z
|
||||
if(using_map.use_overmap && !isnum(using_map.overmap_z))
|
||||
using_map.overmap_z = GLOB.map_templates_loaded[using_map.overmap_z]
|
||||
|
||||
// Convert belter_belt_z to actual Z
|
||||
for(var/i in 1 to length(using_map.belter_belt_z))
|
||||
var/current = using_map.belter_belt_z[i]
|
||||
if(isnum(current))
|
||||
continue
|
||||
using_map.belter_belt_z[i] = GLOB.map_templates_loaded[current]
|
||||
|
||||
// Convert belter_transit_z to actual Z
|
||||
for(var/i in 1 to length(using_map.belter_transit_z))
|
||||
var/current = using_map.belter_transit_z[i]
|
||||
if(isnum(current))
|
||||
continue
|
||||
using_map.belter_transit_z[i] = GLOB.map_templates_loaded[current]
|
||||
|
||||
// Convert belter_docked_z to actual Z (Unnecessary atm)
|
||||
/*for(var/i in 1 to length(using_map.belter_docked_z))
|
||||
var/current = using_map.belter_docked_z[i]
|
||||
if(isnum(current))
|
||||
continue
|
||||
using_map.belter_docked_z[i] = GLOB.map_templates_loaded[current]*/
|
||||
|
||||
// Convert mining_station_z to actual Z (Unnecessary atm)
|
||||
/*for(var/i in 1 to length(using_map.mining_station_z))
|
||||
var/current = using_map.mining_station_z[i]
|
||||
if(isnum(current))
|
||||
continue
|
||||
using_map.mining_station_z[i] = GLOB.map_templates_loaded[current]*/
|
||||
|
||||
// Convert mining_outpost_z to actual Z (Unnecessary atm)
|
||||
/*for(var/i in 1 to length(using_map.mining_outpost_z))
|
||||
var/current = using_map.mining_outpost_z[i]
|
||||
if(isnum(current))
|
||||
continue
|
||||
using_map.mining_outpost_z[i] = GLOB.map_templates_loaded[current]*/
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/preloadShelterTemplates()
|
||||
for(var/datum/map_template/shelter/shelter_type as anything in subtypesof(/datum/map_template/shelter))
|
||||
|
||||
@@ -25,7 +25,9 @@ SUBSYSTEM_DEF(planets)
|
||||
var/datum/planet/NP = new P()
|
||||
planets.Add(NP)
|
||||
for(var/Z in NP.expected_z_levels)
|
||||
if(Z > z_to_planet.len)
|
||||
if(!isnum(Z))
|
||||
Z = GLOB.map_templates_loaded[Z]
|
||||
if(Z > length(z_to_planet))
|
||||
z_to_planet.len = Z
|
||||
if(z_to_planet[Z])
|
||||
admin_notice(span_danger("Z[Z] is shared by more than one planet!"), R_DEBUG)
|
||||
|
||||
Reference in New Issue
Block a user