[MIRROR] TK exploits (#11463)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-08-19 14:25:15 -07:00
committed by GitHub
parent 1522b50d2c
commit bf6ae72dee
4 changed files with 16 additions and 3 deletions

View File

@@ -177,3 +177,7 @@ var/SMALLSIZEBLOCK = 0
// Gene flags
#define GENE_ALWAYS_ACTIVATE 1
#define MUTCHK_HIDEMSG 2 // Traitgenes (Hide gene activation/deactivation messages, mostly for resleeving so you don't get spammed)
// Misc
#define TK_DENIED_MESSAGE span_warning("You are too distracted to focus your telekinesis.")
#define TK_OUTRANGED_MESSAGE span_notice("Your telekinesis won't reach that far.")

View File

@@ -221,6 +221,7 @@
LaserEyes(A) // moved into a proc below
else if(has_telegrip())
if(get_dist(src, A) > tk_maxrange)
to_chat(src, TK_OUTRANGED_MESSAGE)
return
A.attack_tk(src)
/*

View File

@@ -57,8 +57,12 @@
if(istype(gloves,/obj/item/clothing/gloves/telekinetic))
var/obj/item/clothing/gloves/telekinetic/TKG = gloves
TKG.use_grip_power(src,TRUE)
A.attack_tk(src)
if(client.eye != src) // Extremely bad exploits if allowed to TK while remote viewing
to_chat(src, TK_DENIED_MESSAGE)
else if(get_dist(src, A) > tk_maxrange)
to_chat(src, TK_OUTRANGED_MESSAGE)
else
A.attack_tk(src)
else if(spitting) //Only used by xenos right now, can be expanded.
Spit(A)

View File

@@ -107,11 +107,15 @@ var/const/tk_maxrange = 15
if(isobj(target) && !isturf(target.loc))
return
if(user.client.eye != user) // Extremely bad exploits if allowed to TK while remote viewing
to_chat(user, TK_DENIED_MESSAGE)
return
var/d = get_dist(user, target)
if(focus)
d = max(d, get_dist(user, focus)) // whichever is further
if(d > tk_maxrange)
to_chat(user, span_notice("Your mind won't reach that far."))
to_chat(user, TK_OUTRANGED_MESSAGE)
return
if(!focus)