mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-15 20:52:41 +00:00
Persistence Patch
- Fixes Paper and font tags stacking across rounds, as shown in:  - Fixes Graffiti being persistent for over 50 rounds (10+ days) - Sets Trash to be persistent for 4 rounds instead of 5 - Fixes Persistence being always-on because of if("persistence_enabled") config.persistence_enabled = 1. As explained: > it's on by default, which means config.txt will be read and if it's not there it stays at 1. If it is there,it gets set to 1. There is no way to disable it - Adds config options to enable/disable **Persistence for Maploaded objects**, as well as a verb to toggle such. - Adds Persistence to config. Currently IGNORE_MAPLOAD for Persistance is **Disabled.** Maploaded objects/dirt/etc will be saved by persistence, preserving current behavior.
This commit is contained in:
@@ -12,12 +12,13 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for
|
||||
var/age = 0
|
||||
var/list/random_icon_states = list()
|
||||
|
||||
/obj/effect/decal/cleanable/Initialize(var/ml, var/_age)
|
||||
/obj/effect/decal/cleanable/Initialize(var/mapload, var/_age)
|
||||
if(!isnull(_age))
|
||||
age = _age
|
||||
if(random_icon_states && length(src.random_icon_states) > 0)
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
SSpersistence.track_value(src, /datum/persistent/filth)
|
||||
if(!mapload || !config.persistence_ignore_mapload)
|
||||
SSpersistence.track_value(src, /datum/persistent/filth)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/Destroy()
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
age = _age
|
||||
|
||||
/obj/item/trash/Initialize()
|
||||
SSpersistence.track_value(src, /datum/persistent/filth/trash)
|
||||
if(!mapload || !config.persistence_ignore_mapload)
|
||||
SSpersistence.track_value(src, /datum/persistent/filth/trash)
|
||||
. = ..()
|
||||
|
||||
/obj/item/trash/Destroy()
|
||||
|
||||
@@ -108,7 +108,7 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
s["version"] = game_version
|
||||
s["mode"] = master_mode
|
||||
s["respawn"] = config.abandon_allowed
|
||||
s["persistance"] = config.persistence_enabled
|
||||
s["persistance"] = config.persistence_disabled
|
||||
s["enter"] = config.enter_allowed
|
||||
s["vote"] = config.allow_vote_mode
|
||||
s["ai"] = config.allow_ai
|
||||
@@ -529,7 +529,9 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
|
||||
features += config.abandon_allowed ? "respawn" : "no respawn"
|
||||
|
||||
features += config.persistence_enabled ? "persistence enabled" : "persistence disabled"
|
||||
features += config.persistence_disabled ? "persistence disabled" : "persistence enabled"
|
||||
|
||||
features += config.persistence_ignore_mapload ? "persistence mapload disabled" : "persistence mapload enabled"
|
||||
|
||||
if (config && config.allow_vote_mode)
|
||||
features += "vote"
|
||||
|
||||
Reference in New Issue
Block a user