mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
hoh boy
This commit is contained in:
@@ -57,9 +57,9 @@
|
|||||||
var/path = data["__PATH__"]
|
var/path = data["__PATH__"]
|
||||||
if(!path)
|
if(!path)
|
||||||
continue
|
continue
|
||||||
var/obj/effect/cleanable/instantiated = new path(tile)
|
var/obj/effect/decal/cleanable/instantiated = new path(tile)
|
||||||
if(data)
|
if(data)
|
||||||
instantiated.LoadPersistence(data)
|
instantiated.PersistenceLoad(data)
|
||||||
|
|
||||||
/datum/controller/subsystem/persistence/proc/SaveMapDebris()
|
/datum/controller/subsystem/persistence/proc/SaveMapDebris()
|
||||||
if(fexists("[get_map_persistence_path()]/debris.json"))
|
if(fexists("[get_map_persistence_path()]/debris.json"))
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
var/list/data = list()
|
var/list/data = list()
|
||||||
var/list/z_lookup = SSmapping.z_to_station_z_index
|
var/list/z_lookup = SSmapping.z_to_station_z_index
|
||||||
var/list/debris = RelevantPersistentDebris()
|
var/list/debris = RelevantPersistentDebris()
|
||||||
var/obj/effect/cleanable/saving
|
var/obj/effect/decal/cleanable/saving
|
||||||
var/global_max = CONFIG_GET(number/persistent_debris_global_max)
|
var/global_max = CONFIG_GET(number/persistent_debris_global_max)
|
||||||
var/type_max = CONFIG_GET(number/persistent_debris_type_max)
|
var/type_max = CONFIG_GET(number/persistent_debris_type_max)
|
||||||
var/stored = 0
|
var/stored = 0
|
||||||
@@ -95,13 +95,13 @@
|
|||||||
if(stored > global_max)
|
if(stored > global_max)
|
||||||
var/w = "Persistent debris saving globally aborted due to global max >= [global_max]. Either janitors never do their jobs or something is wrong."
|
var/w = "Persistent debris saving globally aborted due to global max >= [global_max]. Either janitors never do their jobs or something is wrong."
|
||||||
message_admins(w)
|
message_admins(w)
|
||||||
subsystem_log(w))
|
subsystem_log(w)
|
||||||
return
|
return
|
||||||
stored_by_type[path] = stored_by_type[path]? stored_by_type[path] + 1 : 1
|
stored_by_type[path] = stored_by_type[path]? stored_by_type[path] + 1 : 1
|
||||||
if(stored_by_type[path] > type_max)
|
if(stored_by_type[path] > type_max)
|
||||||
var/w = "Persistent debris saving aborted for type [path] due to type max >= [global_max]. Either janitors never do their jobs or something is wrong."
|
var/w = "Persistent debris saving aborted for type [path] due to type max >= [global_max]. Either janitors never do their jobs or something is wrong."
|
||||||
message_admins(w)
|
message_admins(w)
|
||||||
subsystem_log(w))
|
subsystem_log(w)
|
||||||
|
|
||||||
subsystem_log({"
|
subsystem_log({"
|
||||||
Debris saving completed:
|
Debris saving completed:
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
"})
|
"})
|
||||||
WRITE_FILE("[get_map_persistence_path()]/debris.json", json_encode(data))
|
WRITE_FILE("[get_map_persistence_path()]/debris.json", json_encode(data))
|
||||||
|
|
||||||
/datum/controller/subsystem/persistence/proc/IsValidDebrisLocation(turf/tile, list/allowed_typecache, list/allowed_zcache, type, loading = FALSE)
|
/datum/controller/subsystem/persistence/proc/IsValidDebrisLocation(turf/tile, list/allowed_typecache, list/allowed_zcache, obj/effect/decal/cleanable/type, loading = FALSE)
|
||||||
if(!allowed_typecache[tile.type])
|
if(!allowed_typecache[tile.type])
|
||||||
return FALSE
|
return FALSE
|
||||||
var/area/A = tile.loc
|
var/area/A = tile.loc
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
if(loading)
|
if(loading)
|
||||||
if(!initial(type.persistence_allow_stacking))
|
if(!initial(type.persistence_allow_stacking))
|
||||||
var/obj/effect/cleanable/C = locate(type) in tile
|
var/obj/effect/decal/cleanable/C = locate(type) in tile
|
||||||
if(!QDELETED(C))
|
if(!QDELETED(C))
|
||||||
return FALSE
|
return FALSE
|
||||||
// Saving verifies allow stacking in the save proc.
|
// Saving verifies allow stacking in the save proc.
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
|
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION))
|
||||||
allowed_z_cache[num2text(z)] = TRUE
|
allowed_z_cache[num2text(z)] = TRUE
|
||||||
. = list()
|
. = list()
|
||||||
for(var/obj/effect/cleanable/C in world)
|
for(var/obj/effect/decal/cleanable/C in world)
|
||||||
if(!C.loc || QDELETED(C))
|
if(!C.loc || QDELETED(C))
|
||||||
continue
|
continue
|
||||||
if(!C.persistent)
|
if(!C.persistent)
|
||||||
|
|||||||
Reference in New Issue
Block a user