mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
* _HELPERS/unsorted.dm has been sorted * Feexing conflicts Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
16 lines
640 B
Plaintext
16 lines
640 B
Plaintext
/**
|
|
* \ref behaviour got changed in 512 so this is necesary to replicate old behaviour.
|
|
* If it ever becomes necesary to get a more performant REF(), this lies here in wait
|
|
* #define REF(thing) (thing && istype(thing, /datum) && (thing:datum_flags & DF_USE_TAG) && thing:tag ? "[thing:tag]" : "\ref[thing]")
|
|
**/
|
|
/proc/REF(input)
|
|
if(istype(input, /datum))
|
|
var/datum/thing = input
|
|
if(thing.datum_flags & DF_USE_TAG)
|
|
if(!thing.tag)
|
|
stack_trace("A ref was requested of an object with DF_USE_TAG set but no tag: [thing]")
|
|
thing.datum_flags &= ~DF_USE_TAG
|
|
else
|
|
return "\[[url_encode(thing.tag)]\]"
|
|
return "\ref[input]"
|