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.
This commit is contained in:
Timberpoes
2020-08-11 19:51:33 +01:00
committed by GitHub
parent b0a35d79c1
commit d2fa99ff76
+5 -1
View File
@@ -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)