Fixes ABS reports getting sanitized by initialize() (#8391)

* Fixes ABS reports getting sanitized by initialize()

* Linting
This commit is contained in:
Atermonera
2022-02-13 20:49:37 -08:00
committed by GitHub
parent 6996e46ed4
commit 9de7693210
2 changed files with 11 additions and 14 deletions
+10 -13
View File
@@ -107,25 +107,22 @@
//lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
/obj/item/weapon/paper/Initialize(mapload, var/text, var/title)
. = ..()
if(istext(title))
name = title
if(istext(text))
info = text
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/Initialize()
. = ..()
if(istext(title))
name = title
if(istext(text))
info = text
addtimer(CALLBACK(src, .proc/update_info), 0)
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
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
stamps = ""
addtimer(CALLBACK(src, .proc/update_info), 0)
/obj/item/weapon/paper/proc/update_info()
if(name != "paper")
desc = "This is a paper titled '" + name + "'."