mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Simultaneous map definitions (#10295)
Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
committed by
GitHub
parent
79d8693a6f
commit
651c8bc1af
@@ -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))
|
||||
@@ -170,7 +215,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
/datum/controller/subsystem/mapping/stat_entry(msg)
|
||||
if (!GLOB.Debug2)
|
||||
return // Only show up in stat panel if debugging is enabled.
|
||||
return ..() //CHOMPEdit
|
||||
. = ..()
|
||||
|
||||
// VOREStation Edit: BAPI-dmm
|
||||
/datum/controller/subsystem/mapping/Shutdown()
|
||||
|
||||
@@ -24,17 +24,12 @@ SUBSYSTEM_DEF(planets)
|
||||
for(var/P in planet_datums)
|
||||
var/datum/planet/NP = new P()
|
||||
planets.Add(NP)
|
||||
// Delete those following two lines with https://github.com/CHOMPStation2/CHOMPStation2/pull/10295
|
||||
for(var/Z in NP.expected_z_levels)
|
||||
if(Z > z_to_planet.len)
|
||||
/* Requires the map update https://github.com/CHOMPStation2/CHOMPStation2/pull/10295
|
||||
for(var/index in 1 to length(NP.expected_z_levels))
|
||||
var/Z = NP.expected_z_levels[index]
|
||||
if(!isnum(Z))
|
||||
Z = GLOB.map_templates_loaded[Z]
|
||||
NP.expected_z_levels[index] = 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