Persistence Patch

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

- 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:
Rykka
2020-08-16 09:48:46 -04:00
parent fe88fbf3f5
commit ad6870c78d
13 changed files with 60 additions and 20 deletions

View File

@@ -937,15 +937,29 @@ var/datum/announcement/minor/admin_min_announcer = new
set category = "Server"
set desc="Whether persistent data will be saved from now on."
set name="Toggle Persistent Data"
config.persistence_enabled = !(config.persistence_enabled)
if(config.persistence_enabled)
config.persistence_disabled = !(config.persistence_disabled)
if(!config.persistence_disabled)
to_world("<B>Persistence is now enabled..</B>")
else
to_world("<B>Persistence is no longer enabled.</B>")
message_admins("<font color='blue'>[key_name_admin(usr)] toggled persistence to [config.persistence_enabled ? "On" : "Off"].</font>", 1)
log_admin("[key_name(usr)] toggled persistence to [config.persistence_enabled ? "On" : "Off"].")
message_admins("<font color='blue'>[key_name_admin(usr)] toggled persistence to [config.persistence_disabled ? "Off" : "On"].</font>", 1)
log_admin("[key_name(usr)] toggled persistence to [config.persistence_disabled ? "Off" : "On"].")
world.update_status()
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglemaploadpersistence()
set category = "Server"
set desc="Whether mapload persistent data will be saved from now on."
set name="Toggle Mapload Persistent Data"
config.persistence_ignore_mapload = !(config.persistence_ignore_mapload)
if(!config.persistence_ignore_mapload)
to_world("<B>Persistence is now enabled..</B>")
else
to_world("<B>Persistence is no longer enabled.</B>")
message_admins("<font color='blue'>[key_name_admin(usr)] toggled persistence to [config.persistence_ignore_mapload ? "Off" : "On"].</font>", 1)
log_admin("[key_name(usr)] toggled persistence to [config.persistence_ignore_mapload ? "Off" : "On"].")
world.update_status()
feedback_add_details("admin_verb","TMPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggle_aliens()
set category = "Server"