This commit is contained in:
silicons
2020-12-26 20:56:48 -08:00
parent bfb3d087c3
commit a6ae0fe5c2
5 changed files with 23 additions and 3 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -101,9 +101,9 @@
to_chat(user, "<span class='notice'>You begin adding reinforced glass to the floor...</span>")
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)

View File

@@ -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

14
config/persistence.txt Normal file
View File

@@ -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