[MIRROR] TK no longer tries to interact with your hud [MDB IGNORE] (#10547)

* TK no longer tries to interact with your hud  (#63882)

* fix tk by adding a blacklist

* Update code/datums/mutations/telekinesis.dm
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>

* god damn you fikou

* TK no longer tries to interact with your hud

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
This commit is contained in:
SkyratBot
2022-01-09 20:48:40 +00:00
committed by GitHub
co-authored by Seth Scherer
parent 2b3b141d1d
commit 027b5c5601
2 changed files with 5 additions and 4 deletions
+1 -3
View File
@@ -181,11 +181,9 @@
/proc/tkMaxRangeCheck(mob/user, atom/target)
if (istype(target, /atom/movable/screen))
return
var/d = get_dist(user, target)
if(d > TK_MAXRANGE)
to_chat(user, span_warning("Your mind won't reach that far."))
user.balloon_alert(user, "can't TK, too far!")
return
return TRUE
+4 -1
View File
@@ -7,6 +7,8 @@
text_gain_indication = "<span class='notice'>You feel smarter!</span>"
limb_req = BODY_ZONE_HEAD
instability = 30
///Typecache of atoms that TK shouldn't interact with
var/static/list/blacklisted_atoms = typecacheof(list(/atom/movable/screen))
/datum/mutation/human/telekinesis/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
..()
@@ -31,8 +33,9 @@
///Triggers on COMSIG_MOB_ATTACK_RANGED. Usually handles stuff like picking up items at range.
/datum/mutation/human/telekinesis/proc/on_ranged_attack(mob/source, atom/target)
SIGNAL_HANDLER
if(is_type_in_typecache(target, blacklisted_atoms))
return
if(!tkMaxRangeCheck(source, target) || source.z != target.z)
source.balloon_alert(source, "can't TK, too far!")
return
return target.attack_tk(source)