From 175d78d9891515ae8e9a31e2565c6f235cfc9f57 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Thu, 28 Jan 2016 23:32:41 -0600 Subject: [PATCH] Fix tgui tk checks Move to the proper distance check --- code/modules/tgui/states.dm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm index f40fb4ce9f9..4b5aa73d61d 100644 --- a/code/modules/tgui/states.dm +++ b/code/modules/tgui/states.dm @@ -55,13 +55,6 @@ return UI_UPDATE return UI_INTERACTIVE -/mob/living/carbon/human/shared_ui_interaction(src_object) - // If we have telekinesis and remain close enough, allow interaction. - if(dna.check_mutation(TK)) - if(tkMaxRangeCheck(src, src_object)) - return UI_INTERACTIVE - return ..() - /mob/living/silicon/ai/shared_ui_interaction(src_object) if(lacks_power()) // Close UIs if the AI is unpowered. return UI_CLOSE @@ -109,4 +102,9 @@ return UI_UPDATE else if(dist <= 5) // Disable if 5 tiles away. return UI_DISABLED - return UI_CLOSE // Otherwise, we got nothing. \ No newline at end of file + return UI_CLOSE // Otherwise, we got nothing. + +/mob/living/carbon/human/shared_living_ui_distance(atom/movable/src_object) + if(dna.check_mutation(TK) && tkMaxRangeCheck(src, src_object)) + return UI_INTERACTIVE + return ..()