Merge pull request #8708 from Rykka-Stormheart/shep-dev-persistence-megapatch

Persistence Patch
This commit is contained in:
Novacat
2020-08-21 01:14:04 -04:00
committed by GitHub
13 changed files with 62 additions and 22 deletions

View File

@@ -34,6 +34,8 @@
var/spam_flag = 0
var/age = 0
var/last_modified_ckey
var/was_maploaded = FALSE // This tracks if the paper was created on mapload.
var/const/deffont = "Verdana"
var/const/signfont = "Times New Roman"
@@ -103,6 +105,12 @@
//lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
/obj/item/weapon/paper/Initialize(mapload)
. = ..()
if(mapload) // Jank, but we do this to prevent maploaded papers from somehow stacking across rounds if re-added to the board by a player.
was_maploaded = TRUE
/obj/item/weapon/paper/New(var/newloc, var/text, var/title)
..()
pixel_y = rand(-8, 8)
@@ -467,6 +475,7 @@
//t = html_encode(t)
t = replacetext(t, "\n", "<BR>")
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
was_maploaded = FALSE // Set this to FALSE because a user has written on us. This is for persistence purposes.
if(fields > 50)//large amount of fields creates a heavy load on the server, see updateinfolinks() and addtofield()