diff --git a/code/__defines/map.dm b/code/__defines/map.dm index fce63b9955c..6ae9fd7c6f4 100644 --- a/code/__defines/map.dm +++ b/code/__defines/map.dm @@ -7,6 +7,7 @@ #define MAP_LEVEL_EMPTY 0x020 // Empty Z-levels that may be used for various things (currently used by bluespace jump) #define MAP_LEVEL_CONSOLES 0x040 // Z-levels available to various consoles, such as the crew monitor (when that gets coded in). Defaults to station_levels if unset. #define MAP_LEVEL_XENOARCH_EXEMPT 0x080 // Z-levels exempt from xenoarch digsite generation. +#define MAP_LEVEL_PERSIST 0x100 // Z-levels where SSpersistence should persist between rounds // Misc map defines. #define SUBMAP_MAP_EDGE_PAD 8 // Automatically created submaps are forbidden from being this close to the main map's edge. //VOREStation Edit \ No newline at end of file diff --git a/code/controllers/subsystems/persistence.dm b/code/controllers/subsystems/persistence.dm index 8ea9e0b5829..1667aa83203 100644 --- a/code/controllers/subsystems/persistence.dm +++ b/code/controllers/subsystems/persistence.dm @@ -32,8 +32,7 @@ SUBSYSTEM_DEF(persistence) if(!A || (A.flags & AREA_FLAG_IS_NOT_PERSISTENT)) return -// if((!T.z in GLOB.using_map.station_levels) || !initialized) - if(!(T.z in using_map.station_levels)) + if(!(T.z in using_map.persist_levels)) return if(!tracking_values[track_type]) diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm index 2475d4caef5..f43c9c49317 100644 --- a/code/modules/food/kitchen/smartfridge/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm @@ -32,8 +32,8 @@ icon_base = "fridge_sci" icon_contents = "chem" -/obj/machinery/smartfridge/New() - ..() +/obj/machinery/smartfridge/Initialize() + . = ..() if(persistent) SSpersistence.track_value(src, persistent) if(is_secure) diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 07c72230261..b7a320a6bd7 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -33,6 +33,7 @@ var/list/all_maps = list() var/static/list/player_levels = list() // Z-levels a character can typically reach var/static/list/sealed_levels = list() // Z-levels that don't allow random transit at edge var/static/list/xenoarch_exempt_levels = list() //Z-levels exempt from xenoarch finds and digsites spawning. + var/static/list/persist_levels = list() // Z-levels where SSpersistence should persist between rounds. Defaults to station_levels if unset. var/static/list/empty_levels = null // Empty Z-levels that may be used for various things (currently used by bluespace jump) // End Static Lists @@ -135,8 +136,10 @@ var/list/all_maps = list() if(zlevel_datum_type) for(var/type in subtypesof(zlevel_datum_type)) new type(src) - if(!map_levels) + if(!map_levels?.len) map_levels = station_levels.Copy() + if(!persist_levels?.len) + persist_levels = station_levels.Copy() if(!allowed_jobs || !allowed_jobs.len) allowed_jobs = subtypesof(/datum/job) if(default_skybox) //Type was specified @@ -295,6 +298,7 @@ var/list/all_maps = list() if(flags & MAP_LEVEL_PLAYER) map.player_levels += z if(flags & MAP_LEVEL_SEALED) map.sealed_levels += z if(flags & MAP_LEVEL_XENOARCH_EXEMPT) map.xenoarch_exempt_levels += z + if(flags & MAP_LEVEL_PERSIST) map.persist_levels += z if(flags & MAP_LEVEL_EMPTY) if(!map.empty_levels) map.empty_levels = list() map.empty_levels += z