From d2fa99ff76247437eed7f1db1886fdabadda01c7 Mon Sep 17 00:00:00 2001 From: Timberpoes Date: Tue, 11 Aug 2020 19:51:33 +0100 Subject: [PATCH] Telekinesis works on interacting with items. (#52834) Rolls TK checks into baseline mob can_interact_with code. TK check code unashamedly stolen from /mob/living/carbon/human/shared_living_ui_distance This change touches every single can_interact interaction involving a mob and an atom, except /obj/machine which overrides can_interact without calling the parent and thus is unaffected by this change. It enables any functionality that would require a can_interact() check to return TRUE. It effectively works alongside the adjacency check and comes into play if the adjacency check would fail. --- code/modules/mob/mob.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d606dbb9e9c..c25a3eb0f98 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1075,7 +1075,11 @@ ///Can the mob interact() with an atom? /mob/proc/can_interact_with(atom/A) - return isAdminGhostAI(src) || Adjacent(A) + if(isAdminGhostAI(src) || Adjacent(A)) + return TRUE + var/datum/dna/mob_dna = has_dna() + if(mob_dna?.check_mutation(TK) && tkMaxRangeCheck(src, A)) + return TRUE ///Can the mob use Topic to interact with machines /mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dexterity=FALSE, no_tk=FALSE)