//EXAMPLE CODE
/obj/paper_creator/var/text_on_papers = "Hewwo"
/obj/structure_creator/Click()
new/obj/paper{text = text_on_papers;}()
var/t = "Another hewwo"
new/obj/paper{text = t;}()
We will get cross-reference loop or undefined var, I think it’s worth to make some way to get vars of proc or of object that creating it with new{}()
Maybe something like in-{} vars like myBase or myProc or anything else that will contain ref of creator or vars of proc.
So it can looks like this:
//EXAMPLE CODE
/obj/paper_creator/var/text_on_papers = "Hewwo"
/obj/structure_creator/Click()
new/obj/paper{text = myBase.text_on_papers;}()
var/t = "Another hewwo"
new/obj/paper{text = myProc.t;}()
I haven't problem with workarounds of this like change vars after creation of instance like:
/obj/paper_creator/var/text_on_papers = "Hewwo"
/obj/structure_creator/Click()
var/obj/paper/P = new/obj/paper()
P.text = text_on_papers
But it will be cooler without this workaround