mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Speed up mapload significantly
Co-authored-by: Aronai Sieyes <arokha@arokha.com>
This commit is contained in:
committed by
Aronai Sieyes
parent
9250685a06
commit
2e23dcdb49
@@ -38,7 +38,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
current_cycle = 0
|
||||
var/simulated_turf_count = 0
|
||||
for(var/turf/simulated/S in turfs)
|
||||
for(var/turf/simulated/S in world)
|
||||
simulated_turf_count++
|
||||
S.update_air_properties()
|
||||
CHECK_TICK
|
||||
|
||||
@@ -16,8 +16,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
|
||||
if(config.generate_map)
|
||||
// Map-gen is still very specific to the map, however putting it here should ensure it loads in the correct order.
|
||||
if(using_map.perform_map_generation())
|
||||
using_map.refresh_mining_turfs()
|
||||
using_map.perform_map_generation()
|
||||
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/load_map_templates()
|
||||
|
||||
@@ -6,6 +6,38 @@ SUBSYSTEM_DEF(skybox)
|
||||
flags = SS_NO_FIRE
|
||||
var/list/skybox_cache = list()
|
||||
|
||||
var/list/dust_cache = list()
|
||||
var/list/speedspace_cache = list()
|
||||
var/list/phase_shift_by_x = list()
|
||||
var/list/phase_shift_by_y = list()
|
||||
|
||||
/datum/controller/subsystem/skybox/PreInit()
|
||||
//Static
|
||||
for (var/i in 0 to 25)
|
||||
var/image/im = image('icons/turf/space_dust.dmi', "[i]")
|
||||
im.plane = DUST_PLANE
|
||||
im.alpha = 128 //80
|
||||
im.blend_mode = BLEND_ADD
|
||||
dust_cache["[i]"] = im
|
||||
//Moving
|
||||
for (var/i in 0 to 14)
|
||||
// NORTH/SOUTH
|
||||
var/image/im = image('icons/turf/space_dust_transit.dmi', "speedspace_ns_[i]")
|
||||
im.plane = DUST_PLANE
|
||||
im.blend_mode = BLEND_ADD
|
||||
speedspace_cache["NS_[i]"] = im
|
||||
// EAST/WEST
|
||||
im = image('icons/turf/space_dust_transit.dmi', "speedspace_ew_[i]")
|
||||
im.plane = DUST_PLANE
|
||||
im.blend_mode = BLEND_ADD
|
||||
speedspace_cache["EW_[i]"] = im
|
||||
|
||||
//Shuffle some lists
|
||||
phase_shift_by_x = get_cross_shift_list(15)
|
||||
phase_shift_by_y = get_cross_shift_list(15)
|
||||
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/skybox/Initialize()
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ SUBSYSTEM_DEF(xenoarch)
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/xenoarch/proc/SetupXenoarch()
|
||||
for(var/turf/simulated/mineral/M in turfs)
|
||||
for(var/turf/simulated/mineral/M in world)
|
||||
if(!M.density || M.z in using_map.xenoarch_exempt_levels)
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user