From cdb867456e762e7bed356a8753795a98ec70d212 Mon Sep 17 00:00:00 2001 From: Couls Date: Wed, 22 May 2019 14:42:06 -0400 Subject: [PATCH] use \ref until I can figure something out for UID --- code/__HELPERS/unique_ids.dm | 14 ++------------ code/modules/keybindings/setup.dm | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/code/__HELPERS/unique_ids.dm b/code/__HELPERS/unique_ids.dm index c7db1b2e772..a66de0b5a88 100644 --- a/code/__HELPERS/unique_ids.dm +++ b/code/__HELPERS/unique_ids.dm @@ -18,18 +18,8 @@ var/global/next_unique_datum_id = 1 // /client/var/tmp/unique_datum_id = null -/datum/proc/UID(input) - if (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]" - else if(!unique_datum_id) +/datum/proc/UID() + if(!unique_datum_id) var/tag_backup = tag tag = null // Grab the raw ref, not the tag unique_datum_id = "\ref[src]_[next_unique_datum_id++]" diff --git a/code/modules/keybindings/setup.dm b/code/modules/keybindings/setup.dm index ba0f09fbf84..ad87622b709 100644 --- a/code/modules/keybindings/setup.dm +++ b/code/modules/keybindings/setup.dm @@ -42,5 +42,5 @@ for(var/k in 1 to macro_set.len) var/key = macro_set[k] var/command = macro_set[key] - winset(src, "[setname]-[UID(key)]", "parent=[setname];name=[key];command=[command]") + winset(src, "[setname]-\ref[key]", "parent=[setname];name=[key];command=[command]") winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED] mainwindow.macro=default")