Skip to content

Commit

Permalink
Allows mobs with telekinesis to subtler at range. (#25082)
Browse files Browse the repository at this point in the history
* telekinesis subtler

increases subtler range for those with telekinesis.

* Update modular_skyrat/modules/verbs/code/subtle.dm

Co-authored-by: GoldenAlpharex <[email protected]>

---------

Co-authored-by: GoldenAlpharex <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Nov 18, 2023
1 parent 74c99f6 commit 2f52080
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modular_skyrat/modules/verbs/code/subtle.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#define SUBTLE_DEFAULT_DISTANCE 1
#define SUBTLE_SAME_TILE_DISTANCE 0
#define SUBTLER_TELEKINESIS_DISTANCE 7

#define SUBTLE_ONE_TILE_TEXT "1-Tile Range"
#define SUBTLE_SAME_TILE_TEXT "Same Tile"
Expand Down Expand Up @@ -78,6 +79,12 @@
var/subtler_message
var/subtler_emote = params
var/target
var/subtler_range = SUBTLE_DEFAULT_DISTANCE

var/datum/dna/dna = user.has_dna()
if(dna && dna?.check_mutation(/datum/mutation/human/telekinesis))
subtler_range = SUBTLER_TELEKINESIS_DISTANCE

if(SSdbcore.IsConnected() && is_banned_from(user, "emote"))
to_chat(user, span_warning("You cannot send subtle emotes (banned)."))
return FALSE
Expand All @@ -89,7 +96,7 @@
if(!subtler_emote)
return FALSE

var/list/in_view = get_hearers_in_view(1, user)
var/list/in_view = get_hearers_in_view(subtler_range, user)

var/obj/effect/overlay/holo_pad_hologram/hologram = GLOB.hologram_impersonators[user]
if(hologram)
Expand Down Expand Up @@ -132,7 +139,7 @@
var/mob/target_mob = target
user.show_message(subtler_message, alt_msg = subtler_message)
var/obj/effect/overlay/holo_pad_hologram/hologram = GLOB.hologram_impersonators[user]
if((get_dist(user.loc, target_mob.loc) <= SUBTLE_DEFAULT_DISTANCE) || (hologram && get_dist(hologram.loc, target_mob.loc) <= SUBTLE_DEFAULT_DISTANCE))
if((get_dist(user.loc, target_mob.loc) <= subtler_range) || (hologram && get_dist(hologram.loc, target_mob.loc) <= subtler_range))
target_mob.show_message(subtler_message, alt_msg = subtler_message)
else
to_chat(user, span_warning("Your emote was unable to be sent to your target: Too far away."))
Expand Down Expand Up @@ -188,6 +195,7 @@

#undef SUBTLE_DEFAULT_DISTANCE
#undef SUBTLE_SAME_TILE_DISTANCE
#undef SUBTLER_TELEKINESIS_DISTANCE

#undef SUBTLE_ONE_TILE_TEXT
#undef SUBTLE_SAME_TILE_TEXT

0 comments on commit 2f52080

Please sign in to comment.