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
wew
This commit is contained in:
17
code/controllers/configuration/entries/persistence.dm
Normal file
17
code/controllers/configuration/entries/persistence.dm
Normal file
@@ -0,0 +1,17 @@
|
||||
/// Whether or not to use the persistence system for cleanable objects
|
||||
/datum/config_entry/flag/persistent_debris
|
||||
config_entry_value = FALSE
|
||||
|
||||
/// Whether or not to nuke all roundstart debris that isn't due to persistence if the above is true
|
||||
/datum/config_entry/flag/persistent_debris_only
|
||||
config_entry_value = TRUE
|
||||
|
||||
/// Max amount of objects to store, total
|
||||
/datum/config_entry/number/persistent_debris_global_max
|
||||
config_entry_value = 10000
|
||||
integer = TRUE
|
||||
|
||||
/// Max amount of objects to store per type
|
||||
/datum/config_entry/number/persistent_debris_type_max
|
||||
config_entry_value = 2000
|
||||
integer = TRUE
|
||||
@@ -67,6 +67,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
LoadChiselMessages()
|
||||
LoadPhotoPersistence()
|
||||
LoadRandomizedRecipes()
|
||||
LoadPaintings()
|
||||
|
||||
/**
|
||||
* Saves persistent data relevant to the game in general: Trophies, antag reputation, etc
|
||||
@@ -247,8 +248,6 @@ SUBSYSTEM_DEF(persistence)
|
||||
/datum/controller/subsystem/persistence/proc/SaveChiselMessage(obj/structure/chisel_message/M)
|
||||
saved_messages += list(M.pack()) // dm eats one list
|
||||
|
||||
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/CollectAntagReputation()
|
||||
var/ANTAG_REP_MAXIMUM = CONFIG_GET(number/antag_rep_maximum)
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/**
|
||||
* Persistence for cleanable debris.
|
||||
*/
|
||||
@@ -1,6 +1,9 @@
|
||||
/obj/effect/decal/cleanable
|
||||
gender = PLURAL
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
/// Is this kind of cleanable decal persistent
|
||||
var/persistent = FALSE
|
||||
|
||||
var/list/random_icon_states = null
|
||||
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
|
||||
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
|
||||
@@ -9,6 +12,8 @@
|
||||
|
||||
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
if(mapload && persistent && CONFIG_GET(flag/persistent_debris_only))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
LAZYINITLIST(blood_DNA) //Kinda needed
|
||||
if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
|
||||
icon_state = pick(random_icon_states)
|
||||
@@ -29,6 +34,18 @@
|
||||
|
||||
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, beauty)), 0)
|
||||
|
||||
/**
|
||||
* Returns a list of data
|
||||
*/
|
||||
/obj/effect/decal/cleanable/proc/PersistenceSave()
|
||||
return null
|
||||
|
||||
/**
|
||||
* Laods from a data list.
|
||||
*/
|
||||
/obj/effect/decal/cleanable/proc/PersistenceLoad(list/data)
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C) // Returns true if we should give up in favor of the pre-existing decal
|
||||
if(mergeable_decal)
|
||||
qdel(C)
|
||||
|
||||
Reference in New Issue
Block a user