Fixes getting TK abilities when you shouldn't (#16300)

* fix

* oops

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* review

* oops

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
hal9000PR
2021-07-07 19:22:49 +01:00
committed by GitHub
co-authored by SteelSlayer
parent 16f07cf9f4
commit 3f6eac48d1
7 changed files with 8 additions and 5 deletions
+1
View File
@@ -119,6 +119,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_XENO_HOST "xeno_host" //Tracks whether we're gonna be a baby alien's mummy.
#define TRAIT_SHOCKIMMUNE "shock_immunity"
#define TRAIT_TESLA_SHOCKIMMUNE "tesla_shock_immunity"
#define TRAIT_TELEKINESIS "telekinesis"
#define TRAIT_RESISTHEAT "resist_heat"
#define TRAIT_RESISTHEATHANDS "resist_heat_handsonly" //For when you want to be able to touch hot things, but still want fire to be an issue.
#define TRAIT_RESISTCOLD "resist_cold"
+1
View File
@@ -24,6 +24,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_XENO_HOST" = TRAIT_XENO_HOST,
"TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE,
"TRAIT_TESLA_SHOCKIMMUNE" = TRAIT_TESLA_SHOCKIMMUNE,
"TRAIT_TELEKINESIS" = TRAIT_TELEKINESIS,
"TRAIT_RESISTHEAT" = TRAIT_RESISTHEAT,
"TRAIT_RESISTHEATHANDS" = TRAIT_RESISTHEATHANDS,
"TRAIT_RESISTCOLD" = TRAIT_RESISTCOLD,
+1 -1
View File
@@ -45,7 +45,7 @@
if(HAS_TRAIT(src, TRAIT_LASEREYES) && a_intent == INTENT_HARM)
LaserEyes(A)
if(dna.GetSEState(GLOB.teleblock))
if(HAS_TRAIT(src, TRAIT_TELEKINESIS))
A.attack_tk(src)
if(isturf(A) && get_dist(src, A) <= 1)
+2 -2
View File
@@ -39,7 +39,7 @@
/obj/item/attack_tk(mob/user)
if(user.stat || !isturf(loc))
return
if(user.dna?.GetSEState(GLOB.teleblock) && !user.get_active_hand()) // both should already be true to get here
if(HAS_TRAIT(user, TRAIT_TELEKINESIS) && !user.get_active_hand()) // both should already be true to get here
var/obj/item/tk_grab/O = new(src)
O.form_grab(user, src)
else
@@ -109,7 +109,7 @@
if(!host || host != user)
qdel(src)
return
if(!host.dna?.GetSEState(GLOB.teleblock))
if(!HAS_TRAIT(host, TRAIT_TELEKINESIS))
qdel(src)
return
if(isobj(target) && !isturf(target.loc))
+1
View File
@@ -185,6 +185,7 @@
activation_messages = list("You feel smarter.")
deactivation_messages = list("You feel dumber.")
instability = GENE_INSTABILITY_MAJOR
traits_to_add = list(TRAIT_TELEKINESIS)
activation_prob = 15
/datum/mutation/tk/New()
+1 -1
View File
@@ -578,7 +578,7 @@
if(prot > 0 || HAS_TRAIT(user, TRAIT_RESISTHEAT) || HAS_TRAIT(user, TRAIT_RESISTHEATHANDS))
to_chat(user, "<span class='notice'>You remove the light [fitting]</span>")
else if(user.dna?.GetSEState(GLOB.teleblock))
else if(HAS_TRAIT(user, TRAIT_TELEKINESIS))
to_chat(user, "<span class='notice'>You telekinetically remove the light [fitting].</span>")
else
if(user.a_intent == INTENT_DISARM || user.a_intent == INTENT_GRAB)
+1 -1
View File
@@ -113,6 +113,6 @@
return STATUS_CLOSE // Otherwise, we got nothing.
/mob/living/carbon/human/shared_living_ui_distance(atom/movable/src_object)
if(dna.GetSEState(GLOB.teleblock) && (get_dist(src, src_object) <= 2))
if(HAS_TRAIT(src, TRAIT_TELEKINESIS) && (get_dist(src, src_object) <= 2))
return STATUS_INTERACTIVE
return ..()