mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +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!
|
||||
|
||||
/obj/item/weapon/paper/New()
|
||||
/obj/item/weapon/paper/New(var/newloc, var/text, var/title)
|
||||
..()
|
||||
pixel_y = rand(-8, 8)
|
||||
pixel_x = rand(-9, 9)
|
||||
stamps = ""
|
||||
|
||||
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>")
|
||||
|
||||
Reference in New Issue
Block a user