diff --git a/code/controllers/configuration/entries/persistence.dm b/code/controllers/configuration/entries/persistence.dm index cf7b23bef3..2444034b86 100644 --- a/code/controllers/configuration/entries/persistence.dm +++ b/code/controllers/configuration/entries/persistence.dm @@ -15,3 +15,6 @@ /datum/config_entry/number/persistent_debris_type_max config_entry_value = 2000 integer = TRUE + +/// Wipe dirty stuff on nuke +/datum/config_entry/flag/persistent_debris_wipe_on_nuke diff --git a/code/controllers/subsystem/persistence/cleanable_debris.dm b/code/controllers/subsystem/persistence/cleanable_debris.dm index a08c4c4964..8c9e7ba5c0 100644 --- a/code/controllers/subsystem/persistence/cleanable_debris.dm +++ b/code/controllers/subsystem/persistence/cleanable_debris.dm @@ -63,6 +63,8 @@ /datum/controller/subsystem/persistence/proc/SaveMapDebris() if(fexists("[get_map_persistence_path()]/debris.json")) fdel("[get_map_persistence_path()]/debris.json") + if(CONFIG_GET(flag/persistent_debris_wipe_on_nuke) && SSticker?.mode?.station_was_nuked) + return // local janitor cheers on nukeop team to save some work var/list/data = list() var/list/z_lookup = SSmapping.z_to_station_z_index var/list/debris = RelevantPersistentDebris() diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index 1b875a5e69..ad3cf86864 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -101,9 +101,9 @@ to_chat(user, "You begin adding reinforced glass to the floor...") if(do_after(user, 10, target = src)) if (RG.get_amount() >= 2 && !istype(src, /turf/open/transparent/glass/reinforced)) - for(var/obj/effect/decal/cleanable/decal in src) - if(decal.wiped_by_floor_change) - qdel(decal) + for(var/obj/effect/decal/cleanable/decal in src) + if(decal.wiped_by_floor_change) + qdel(decal) PlaceOnTop(/turf/open/transparent/glass/reinforced, flags = CHANGETURF_INHERIT_AIR) playsound(src, 'sound/items/deconstruct.ogg', 80, 1) RG.use(2) diff --git a/config/config.txt b/config/config.txt index 72df74beb1..c7bb36af0e 100644 --- a/config/config.txt +++ b/config/config.txt @@ -11,6 +11,7 @@ $include dynamic_config.txt $include plushies/defines.txt $include job_threats.txt $include policy.txt +$include persistence.txt $include respawns.txt # You can use the @ character at the beginning of a config option to lock it from being edited in-game diff --git a/config/persistence.txt b/config/persistence.txt new file mode 100644 index 0000000000..7d65a150e2 --- /dev/null +++ b/config/persistence.txt @@ -0,0 +1,14 @@ +### Whether or not cleanable object persistence is on +PERSISTENT_DEBRIS + +### Whether or not ONLY persistent cleanable objects should be spawned, for supported objects +PERSISTENT_DEBRIS_ONLY + +### Max objects to store, total +PERSISTENT_DEBRIS_GLOBAL_MAX 10000 + +### Max objects to store per type, total +PERSISTENT_DEBRIS_TYPE_MAX 2000 + +### Wipe objects on nuke for the above +PERSISTENT_DEBRIS_WIPE_ON_NUKE