mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
* Optimizes qdel related things (slight init time savings) * lang holder * cleanup custom spawners slightly * ref update Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: tastyfish <crazychris32@gmail.com>
16 lines
630 B
Plaintext
16 lines
630 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 && isdatum(thing) && (thing:datum_flags & DF_USE_TAG) && thing:tag ? "[thing:tag]" : text_ref(thing))
|
|
**/
|
|
/proc/REF(input)
|
|
if(isdatum(input))
|
|
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 text_ref(input)
|