new->init refactor

This commit is contained in:
Killian
2022-02-20 19:32:23 +00:00
parent 3f9af78f3a
commit 91d39da943
71 changed files with 182 additions and 4839 deletions
+8 -17
View File
@@ -106,35 +106,26 @@
//lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
/obj/item/weapon/paper/Initialize(mapload)
/obj/item/weapon/paper/Initialize(mapload, var/text, var/title)
. = ..()
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
<<<<<<< HEAD
/obj/item/weapon/paper/New(var/newloc, var/text, var/title)
..()
=======
/obj/item/weapon/paper/Initialize()
. = ..()
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
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(!isnull(title))
name = title
if(name != "paper")
desc = "This is a paper titled '" + name + "'."
if(!isnull(text))
info = text
if(info != initial(info))
info = html_encode(info)
info = replacetext(info, "\n", "<BR>")
@@ -434,7 +425,7 @@
var/raw = input(usr, "Enter what you want to write:", "Write") as null|message
if(!raw)
return
var/t = sanitize(raw, MAX_PAPER_MESSAGE_LEN, extra = 0)
if(!t)
return
+2 -8
View File
@@ -212,16 +212,10 @@
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
<<<<<<< HEAD
/obj/item/weapon/pen/reagent/sleepy/New()
..()
reagents.add_reagent("chloralhydrate", 1) //VOREStation Edit
reagents.add_reagent("stoxin", 14) //VOREStation Add
=======
/obj/item/weapon/pen/reagent/sleepy/Initialize()
. = ..()
reagents.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N
>>>>>>> 2f0a618d451... /atom New() => Initialize() [MDB IGNORE] (#8298)
reagents.add_reagent("chloralhydrate", 1) //VOREStation Edit
reagents.add_reagent("stoxin", 14) //VOREStation Add
/*