Persistence Patch

- Fixes Paper and font tags stacking across rounds, as shown in: ![](https://cdn.discordapp.com/attachments/187013248309002240/741937939382141000/164fdd3a37fb22f18dfa9b5c431ffc04.png)

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

You will need to update config.txt with the following lines:
\## Uncomment this to DISABLE persistence 
\#PERSISTENCE_DISABLED 
 
\## Uncomment this to DISABLE maploaded trash/paper/etc from being saved by the persistence system. 
\#PERSISTENCE_IGNORE_MAPLOAD
This commit is contained in:
Rykka
2020-08-16 09:58:57 -04:00
parent 0f2fddde6a
commit 2ad7b475ec
11 changed files with 58 additions and 18 deletions
+7 -3
View File
@@ -236,7 +236,8 @@ var/list/gamemode_cache = list()
var/dooc_allowed = 1
var/dsay_allowed = 1
var/persistence_enabled = 1
var/persistence_disabled = FALSE
var/persistence_ignore_mapload = FALSE
var/allow_byond_links = 0
var/allow_discord_links = 0
@@ -576,8 +577,11 @@ var/list/gamemode_cache = list()
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
if ("persistence_enabled")
config.persistence_enabled = 1
if("persistence_disabled")
config.persistence_disabled = TRUE // Previously this forcibly set persistence enabled in the saves.
if("persistence_ignore_mapload")
config.persistence_ignore_mapload = TRUE
if ("probability")
var/prob_pos = findtext(value, " ")
+1 -1
View File
@@ -19,7 +19,7 @@ SUBSYSTEM_DEF(persistence)
/datum/controller/subsystem/persistence/proc/track_value(var/atom/value, var/track_type)
if(config.persistence_enabled == 0) //if the config is not set to persistent nothing will save or load.
if(config.persistence_disabled) //if the config is set to persistence disabled, nothing will save or load.
return
var/turf/T = get_turf(value)