mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] TK exploits (#11463)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1522b50d2c
commit
bf6ae72dee
@@ -177,3 +177,7 @@ var/SMALLSIZEBLOCK = 0
|
|||||||
// Gene flags
|
// Gene flags
|
||||||
#define GENE_ALWAYS_ACTIVATE 1
|
#define GENE_ALWAYS_ACTIVATE 1
|
||||||
#define MUTCHK_HIDEMSG 2 // Traitgenes (Hide gene activation/deactivation messages, mostly for resleeving so you don't get spammed)
|
#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.")
|
||||||
|
|||||||
@@ -221,6 +221,7 @@
|
|||||||
LaserEyes(A) // moved into a proc below
|
LaserEyes(A) // moved into a proc below
|
||||||
else if(has_telegrip())
|
else if(has_telegrip())
|
||||||
if(get_dist(src, A) > tk_maxrange)
|
if(get_dist(src, A) > tk_maxrange)
|
||||||
|
to_chat(src, TK_OUTRANGED_MESSAGE)
|
||||||
return
|
return
|
||||||
A.attack_tk(src)
|
A.attack_tk(src)
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -57,8 +57,12 @@
|
|||||||
if(istype(gloves,/obj/item/clothing/gloves/telekinetic))
|
if(istype(gloves,/obj/item/clothing/gloves/telekinetic))
|
||||||
var/obj/item/clothing/gloves/telekinetic/TKG = gloves
|
var/obj/item/clothing/gloves/telekinetic/TKG = gloves
|
||||||
TKG.use_grip_power(src,TRUE)
|
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.
|
else if(spitting) //Only used by xenos right now, can be expanded.
|
||||||
Spit(A)
|
Spit(A)
|
||||||
|
|
||||||
|
|||||||
@@ -107,11 +107,15 @@ var/const/tk_maxrange = 15
|
|||||||
if(isobj(target) && !isturf(target.loc))
|
if(isobj(target) && !isturf(target.loc))
|
||||||
return
|
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)
|
var/d = get_dist(user, target)
|
||||||
if(focus)
|
if(focus)
|
||||||
d = max(d, get_dist(user, focus)) // whichever is further
|
d = max(d, get_dist(user, focus)) // whichever is further
|
||||||
if(d > tk_maxrange)
|
if(d > tk_maxrange)
|
||||||
to_chat(user, span_notice("Your mind won't reach that far."))
|
to_chat(user, TK_OUTRANGED_MESSAGE)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!focus)
|
if(!focus)
|
||||||
|
|||||||
Reference in New Issue
Block a user