mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Allow procs to spawn filled paper with passing info to constructor
This commit is contained in:
@@ -100,15 +100,21 @@
|
|||||||
|
|
||||||
//lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
|
//lipstick wiping is in code/game/objects/items/weapons/cosmetics.dm!
|
||||||
|
|
||||||
/obj/item/weapon/paper/New()
|
/obj/item/weapon/paper/New(var/newloc, var/text, var/title)
|
||||||
..()
|
..()
|
||||||
pixel_y = rand(-8, 8)
|
pixel_y = rand(-8, 8)
|
||||||
pixel_x = rand(-9, 9)
|
pixel_x = rand(-9, 9)
|
||||||
stamps = ""
|
stamps = ""
|
||||||
|
|
||||||
|
if(!isnull(title))
|
||||||
|
name = title
|
||||||
|
|
||||||
if(name != "paper")
|
if(name != "paper")
|
||||||
desc = "This is a paper titled '" + name + "'."
|
desc = "This is a paper titled '" + name + "'."
|
||||||
|
|
||||||
|
if(!isnull(text))
|
||||||
|
info = text
|
||||||
|
|
||||||
if(info != initial(info))
|
if(info != initial(info))
|
||||||
info = html_encode(info)
|
info = html_encode(info)
|
||||||
info = replacetext(info, "\n", "<BR>")
|
info = replacetext(info, "\n", "<BR>")
|
||||||
|
|||||||
Reference in New Issue
Block a user