diff --git a/__DEFINES/setup.dm b/__DEFINES/setup.dm
index f99ab5210f5..e007b2f3f10 100644
--- a/__DEFINES/setup.dm
+++ b/__DEFINES/setup.dm
@@ -471,7 +471,7 @@ var/global/list/BODY_COVER_VALUE_LIST=list("[HEAD]" = COVER_PROTECTION_HEAD,"[EY
#define M_TOXIC_FARTS 201 // Duh
#define M_STRONG 202 // (Nothing)
#define M_SOBER 203 // Increased alcohol metabolism
-#define M_JAMSIGNALS 204 // Block EMFs
+#define M_PSY_RESIST 204 // Block remoteview
#define M_SUPER_FART 205 // Duh
#define M_SMILE 206 // :)
#define M_ELVIS 207 // You ain't nothin' but a hound dog.
diff --git a/code/datums/gamemode/powers/changeling.dm b/code/datums/gamemode/powers/changeling.dm
index 0abb6c88785..5cf61ccb85a 100644
--- a/code/datums/gamemode/powers/changeling.dm
+++ b/code/datums/gamemode/powers/changeling.dm
@@ -226,6 +226,7 @@
return
var/mob/living/carbon/human/C = R.antag.current
to_chat(C, "We distort our form to prevent AI-tracking.")
+ C.digitalcamo = 1
/datum/power/changeling/rapidregeneration
name = "Rapid Regeneration"
diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm
index 0c7978d03b1..c911ab9c877 100644
--- a/code/game/data_huds.dm
+++ b/code/game/data_huds.dm
@@ -89,7 +89,8 @@ the HUD updates properly! */
for(var/mob/living/carbon/patient in range(C.view+DATAHUD_RANGE_OVERHEAD,T))
if (ishuman(patient))
- if(!can_mind_interact(patient.mind)) //Tinfoil hat? Move along.
+ var/mob/living/carbon/human/H = patient
+ if(H.head && istype(H.head,/obj/item/clothing/head/tinfoil)) //Tinfoil hat? Move along.
continue
if(!check_HUD_visibility(patient, M))
continue
@@ -183,7 +184,7 @@ the HUD updates properly! */
if(!holder)
continue
holder.icon_state = "hudno_id"
- if(!can_mind_interact(perp.mind)) //Tinfoil hat? Move along.
+ if(perp.head && istype(perp.head,/obj/item/clothing/head/tinfoil)) //Tinfoil hat? Move along.
C.images += holder
continue
var/obj/item/weapon/card/id/card = perp.get_id_card()
diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm
index 4529c24427d..851f5889b92 100644
--- a/code/game/dna/genes/goon_powers.dm
+++ b/code/game/dna/genes/goon_powers.dm
@@ -11,17 +11,15 @@
/datum/dna/gene/basic/sober/New()
block = SOBERBLOCK
-//WAS: /datum/bioEffect/psychic_resist
-/datum/dna/gene/basic/jamsignals
- name = "Signal Jam"
- desc = "Creates an invisible shield around your body, protecting you from harmful electromagnetic radiation."
- activation_messages = list("Your body and mind feel shielded.")
- deactivation_messages = list("You feel oddly exposed.")
+/datum/dna/gene/basic/psychic_resist
+ name = "Psy-Resist"
+ desc = "Boosts efficiency in sectors of the brain commonly associated with meta-mental energies."
+ activation_messages = list("Your mind feels closed.")
- mutation = M_JAMSIGNALS
+ mutation = M_PSY_RESIST
-/datum/dna/gene/basic/jamsignals/New()
- block = JAMSIGNALSBLOCK
+/datum/dna/gene/basic/psychic_resist/New()
+ block = PSYRESISTBLOCK
/////////////////////////
// Stealth Enhancers
@@ -614,7 +612,7 @@
to_chat(user, "This can only be used on carbon beings.")
return 1
- if (!can_mind_interact(M.mind))
+ if (M_PSY_RESIST in M.mutations)
to_chat(user, "You can't see into [M.name]'s mind at all!")
return 1
diff --git a/code/game/dna/genes/powers.dm b/code/game/dna/genes/powers.dm
index 64e646979af..7bb3336c6cf 100644
--- a/code/game/dna/genes/powers.dm
+++ b/code/game/dna/genes/powers.dm
@@ -72,8 +72,13 @@
user.reset_view(0)
return
- for(var/mob/living/target in targets)
- if (can_mind_interact(target.mind))
+ for(var/T in targets)
+ var/mob/living/target
+ if (isliving(T))
+ target = T
+ if (istype (T, /datum/mind))
+ target = user.can_mind_interact(T)
+ if(target)
user.remoteview_target = target
user.reset_view(target)
break
@@ -150,17 +155,19 @@
M.telepathic_target.len = 0
var/all_switch = TRUE
- for(var/mob/living/T in targets)
- if(!istype(T) && !can_mind_interact(T.mind))
- to_chat(M,"[T] cannot sense your telepathy.")
+ for(var/T in targets)
+ var/mob/living/target
+ if (isliving(T))
+ target = T
+ if (istype (T, /datum/mind))
+ target = user.can_mind_interact(T)
+ if(!T || !istype(target) || tinfoil_check(target) || !user.can_mind_interact(target))
+ user.show_message("You are unable to use telepathy with [target].")
continue
- if(istype(M))
- M.telepathic_target += T
+ else if(istype(M))
+ M.telepathic_target += target
continue
- if(T == user) //Talking to ourselves
- to_chat(user,"Projected to self: \"[message]\"")
- return
- if(M_TELEPATHY in T.mutations)
+ if(M_TELEPATHY in target.mutations)
to_chat(T, "You hear [user.real_name]'s voice: \"[message]\"")
else
to_chat(T,"You hear a voice inside your head: \"[message]\"")
diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm
index 7853b0dffac..59e9b1c18c2 100644
--- a/code/game/gamemodes/setupgame.dm
+++ b/code/game/gamemodes/setupgame.dm
@@ -49,7 +49,7 @@ var/ELVISBLOCK = 0
// Powers
var/SOBERBLOCK = 0
-var/JAMSIGNALSBLOCK = 0
+var/PSYRESISTBLOCK = 0
var/STRONGBLOCK = 0
//var/SHADOWBLOCK = 0
var/FARSIGHTBLOCK = 0
@@ -159,7 +159,7 @@ var/LACTOSEBLOCK = 0
// Powers
SOBERBLOCK = getAssignedBlock("SOBER", numsToAssign, DNA_HARD_BOUNDS, good=1)
- JAMSIGNALSBLOCK = getAssignedBlock("JAMSIGNALS", numsToAssign, DNA_HARD_BOUNDS, good=1)
+ PSYRESISTBLOCK = getAssignedBlock("PSYRESIST", numsToAssign, DNA_HARD_BOUNDS, good=1)
//SHADOWBLOCK = getAssignedBlock("SHADOW", numsToAssign, DNA_HARDER_BOUNDS, good=1)
FARSIGHTBLOCK = getAssignedBlock("FARSIGHT", numsToAssign, DNA_HARDER_BOUNDS, good=1)
CHAMELEONBLOCK = getAssignedBlock("CHAMELEON", numsToAssign, DNA_HARDER_BOUNDS, good=1)
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index 0a02286347b..642d160ee9b 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -156,11 +156,27 @@
return FALSE
if(ismob(target))
- var/mob/M = target
- if(!can_mind_interact(M.mind))
+ var/mob/target_mob = target
+ if(target_mob.digitalcamo)
return FALSE
- if(istype(target.loc, /obj/effect/dummy))
+ if(ishuman(target))
+ var/mob/living/carbon/human/target_human = target
+ if(target_human.wear_id && istype(target_human.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
return FALSE
+ if(target_human.is_wearing_item(/obj/item/clothing/mask/gas/voice))
+ return FALSE
+ if(target_human.is_wearing_item(/obj/item/clothing/gloves/ninja))
+ return FALSE
+ if(target_human.is_wearing_item(/obj/item/clothing/head/tinfoil))
+ return FALSE
+ if(target_human.is_holding_item(/obj/item/device/megaphone/madscientist))
+ return FALSE
+
+ if(isalien(target))
+ return FALSE
+
+ if(istype(target.loc, /obj/effect/dummy))
+ return FALSE
if(!near_camera(target))
return FALSE
diff --git a/code/game/machinery/mind_machine.dm b/code/game/machinery/mind_machine.dm
index 4ce0f514f22..9fdc7b040a0 100644
--- a/code/game/machinery/mind_machine.dm
+++ b/code/game/machinery/mind_machine.dm
@@ -44,6 +44,8 @@
var/podsConnected = FALSE
var/mob/living/occupantOne = null
var/mob/living/occupantTwo = null
+ var/occupantStatOne = null
+ var/occupantStatTwo = null
var/mindTypeOne = null //Player mind, simple mob, silicon, etc
var/mindTypeTwo = null
var/lockedPods = FALSE
@@ -123,6 +125,7 @@
connectTwo = null
. = ..()
+
/obj/machinery/mind_machine/mind_machine_hub/attackby(var/obj/item/A, var/mob/user)
..()
if(istype(A, /obj/item/bluespace_crystal))
@@ -166,7 +169,10 @@
connectTwo = FALSE
findConnections()
+
//////UI stuff/////////////
+
+
/obj/machinery/mind_machine/mind_machine_hub/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = NANOUI_FOCUS)
if(errorMessage != MINDMACHINE_NOERROR)
spawn(5 SECONDS)
@@ -186,8 +192,8 @@
if(occupantScan)
occData["nameOne"] = occupantOne.name
occData["nameTwo"] = occupantTwo.name
- occData["statOne"] = occupantOne.stat == 2 ? "Dead" : occupantOne.stat == 1 ? "Unconscious" : "Conscious"
- occData["statTwo"] = occupantTwo.stat == 2 ? "Dead" : occupantTwo.stat == 1 ? "Unconscious" : "Conscious"
+ occData["statOne"] = occupantStatOne
+ occData["statTwo"] = occupantStatTwo
occData["mindTypeOne"] = mindTypeOne
occData["mindTypeTwo"] = mindTypeTwo
data["occData"] = occData;
@@ -258,6 +264,7 @@
//////Scan and Swap, other UI procs//////////////
+
/obj/machinery/mind_machine/mind_machine_hub/proc/unlockPods()
occupantScan = FALSE
mindTypeOne = "None"
@@ -321,22 +328,40 @@
occupantScan = TRUE
playsound(connectOne, 'sound/effects/sparks4.ogg', 80, 1)
playsound(connectTwo, 'sound/effects/sparks4.ogg', 80, 1)
- mindTypeOne = scanPod(occupantOne)
- mindTypeTwo = scanPod(occupantTwo)
+ scanPod(occupantOne)
+ scanPod(occupantTwo)
currentlySwapping = FALSE
/obj/machinery/mind_machine/mind_machine_hub/proc/scanPod(var/mob/living/S)
+ var/MT
+ var/OS
+ switch(S.stat)
+ if(CONSCIOUS)
+ OS = "Alive"
+ if(UNCONSCIOUS)
+ OS = "Unconscious"
+ if(DEAD)
+ OS = "Dead"
if(!S.mind)
- return MINDMACHINE_LOWER //Simple mob
- if(isrobot(S))
- return MINDMACHINE_SILICON //Silicon player, obviously
- if(isvampire(S) || isanycultist(S) || ischangeling(S) || ismalf(S) || is_type_in_list(S, illegalSwap))
- return MINDMACHINE_SHIELDED //Mostly to fix spell bugs but also tinfoil
- if(S.client && can_mind_interact(S.mind))
- return MINDMACHINE_HIGHER //Player controlled
- if(S.client && !can_mind_interact(S.mind))
- return MINDMACHINE_SHIELDED
- return MINDMACHINE_LOWER //Monkeyman
+ MT = MINDMACHINE_LOWER//Simple mob
+ if(S.mind)
+ if(isrobot(S))
+ MT = MINDMACHINE_SILICON //Silicon player, obviously
+ else
+ MT = MINDMACHINE_HIGHER //Player controlled
+ if(isvampire(S) || isanycultist(S) || ischangeling(S) || ismalf(S))
+ MT = MINDMACHINE_SHIELDED //Mostly to fix spell bugs but also tinfoil
+ if(is_type_in_list(S, illegalSwap) || is_type_in_list(S, illegalSwap))
+ MT = MINDMACHINE_SHIELDED
+ if((ishigherbeing(S)) || (ismonkey(S)))
+ if(S.is_wearing_any(list(/obj/item/clothing/head/tinfoil,/obj/item/clothing/head/helmet/stun), slot_head))
+ MT = MINDMACHINE_SHIELDED
+ if(S == occupantOne)
+ mindTypeOne = MT
+ occupantStatOne = OS
+ if(S == occupantTwo)
+ mindTypeTwo = MT
+ occupantStatTwo = OS
/obj/machinery/mind_machine/mind_machine_hub/proc/swapOccupants(var/mob/living/M)
if(!occupantScan || !lockedPods)
@@ -357,7 +382,7 @@
spark(connectTwo)
unlockPods()
return
- if(occupantOne.stat == DEAD || occupantTwo.stat == DEAD) //Being able to swap if they die between scan and swap is intentional
+ if(occupantStatOne == "Dead" || occupantStatTwo == "Dead") //Being able to swap if they die between scan and swap is intentional
if(!soulShardSafety) //Secrets
errorMessage = MINDMACHINE_LIVING_REQUIRED
return
@@ -566,7 +591,7 @@
var/list/woopsMobs = list()
var/mob/woopsTarget = null
for(var/mob/living/R in mob_list)
- if(!R.mind && R.stat != DEAD && (get_dist(src, R) < 50) && (connectOne.z == R.z) && (!is_type_in_list(R, illegalSwap)))
+ if((!R.mind) && (R.stat != 2) && (get_dist(src, R) < 50) && (connectOne.z == R.z) && (!is_type_in_list(R, illegalSwap)))
woopsMobs += R
if(woopsMobs.len)
woopsTarget = pick(woopsMobs)
@@ -825,4 +850,4 @@
if(1)
connectedHub.occupantOne = null
if(2)
- connectedHub.occupantTwo = null
+ connectedHub.occupantTwo = null
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index 067728b44b4..9fc6e1cdc67 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -502,27 +502,27 @@
block = SOBERBLOCK
..()
-/obj/item/weapon/dnainjector/nofail/jamsignals
- name = "DNA-Injector (Jam Signals)"
- desc = "Hidden in plain sight"
+/obj/item/weapon/dnainjector/nofail/psychic_resist
+ name = "DNA-Injector (Psychic Resist)"
+ desc = "Not today, mind hippies."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
-/obj/item/weapon/dnainjector/nofail/JAMSIGNALS/initialize()
- block = JAMSIGNALSBLOCK
+/obj/item/weapon/dnainjector/nofail/psychic_resist/initialize()
+ block = PSYRESISTBLOCK
..()
-/obj/item/weapon/dnainjector/nofail/antijamsignals
- name = "DNA-Injector (Anti-Jamming)"
- desc = "There are eyes everywhere"
+/obj/item/weapon/dnainjector/nofail/antipsychic_resist
+ name = "DNA-Injector (Anti-Psychic Resist)"
+ desc = "Im thinking about furry porn 24/7. Come at me."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
-/obj/item/weapon/dnainjector/nofail/antijamsignals/initialize()
- block = JAMSIGNALSBLOCK
+/obj/item/weapon/dnainjector/nofail/antipsychic_resist/initialize()
+ block = PSYRESISTBLOCK
..()
/*/obj/item/weapon/dnainjector/nofail/darkcloak
@@ -1382,7 +1382,7 @@
/obj/item/weapon/dnainjector/nofail/insulation,
/obj/item/weapon/dnainjector/nofail/midgit,
/obj/item/weapon/dnainjector/nofail/sober,
- /obj/item/weapon/dnainjector/nofail/jamsignals,
+ /obj/item/weapon/dnainjector/nofail/psychic_resist,
/obj/item/weapon/dnainjector/nofail/chameleon,
/obj/item/weapon/dnainjector/nofail/cryo,
/obj/item/weapon/dnainjector/nofail/mattereater,
diff --git a/code/modules/mob/living/carbon/human/life/handle_disabilities.dm b/code/modules/mob/living/carbon/human/life/handle_disabilities.dm
index c8096105481..b80ff9c48df 100644
--- a/code/modules/mob/living/carbon/human/life/handle_disabilities.dm
+++ b/code/modules/mob/living/carbon/human/life/handle_disabilities.dm
@@ -2,7 +2,7 @@
/mob/living/carbon/human/proc/handle_disabilities()
if(stat == DEAD)
return
- if(disabilities & ELECTROSENSE && !dna.GetSEState(JAMSIGNALSBLOCK))
+ if(disabilities & ELECTROSENSE)
var/affect_chance = 30
var/affected = FALSE
if(head && istype(head,/obj/item/clothing/head/tinfoil))
diff --git a/code/modules/mob/living/carbon/human/life/handle_regular_hud_updates.dm b/code/modules/mob/living/carbon/human/life/handle_regular_hud_updates.dm
index 2a72b2a4177..78b0ccd4ea8 100644
--- a/code/modules/mob/living/carbon/human/life/handle_regular_hud_updates.dm
+++ b/code/modules/mob/living/carbon/human/life/handle_regular_hud_updates.dm
@@ -251,7 +251,7 @@
isRemoteObserve = 0
//Does he have psy resist?
- if(!can_mind_interact(remoteview_target.mind))
+ if(M_PSY_RESIST in remoteview_target.mutations)
to_chat(src, "Your mind is shut out!")
isRemoteObserve = 0
diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm
index 0c55c897383..01d289020f2 100644
--- a/code/modules/mob/living/carbon/species.dm
+++ b/code/modules/mob/living/carbon/species.dm
@@ -1368,11 +1368,8 @@ var/list/has_died_as_golem = list()
var/all_switch = TRUE
for(var/mob/living/T in telepathic_target)
- if(istype(T) && can_mind_interact(T.mind))
- to_chat(T,"You feel [M]'s thoughts: \"[message]\"")
- else
- to_chat(M,"[T] cannot sense your telepathy.")
- continue
+ if(istype(T) && M.can_mind_interact(T))
+ to_chat(T,"You feel [M]'s thoughts: [message]")
if(all_switch)
all_switch = FALSE
if(T != M)
diff --git a/code/modules/mob/living/simple_animal/hostile/human/grey.dm b/code/modules/mob/living/simple_animal/hostile/human/grey.dm
index 39c692ee6f4..d1bf7087d42 100644
--- a/code/modules/mob/living/simple_animal/hostile/human/grey.dm
+++ b/code/modules/mob/living/simple_animal/hostile/human/grey.dm
@@ -867,31 +867,32 @@
/mob/living/simple_animal/hostile/humanoid/grey/researcher/surgeon/Shoot()
var/mob/living/carbon/human/H = target
- if(can_mind_interact(H.mind)) // Psy-attacks don't work if the target is unconsious, wearing a tin foil hat, or has genetic resistance
+ if(H.isUnconscious() || H.is_wearing_item(/obj/item/clothing/head/tinfoil) || (M_PSY_RESIST in H.mutations)) // Psy-attacks don't work if the target is unconsious, wearing a tin foil hat, or has genetic resistance
return
- switch(rand(0,4))
- if(0) //Minor brain damage
- to_chat(H, "You get a blindingly painful headache.")
- H.adjustBrainLoss(10)
- H.eye_blurry = max(H.eye_blurry, 5)
- if(1) //Brief knockdown
- to_chat(H, "You suddenly lose your sense of balance!")
- H.emote("me", 1, "collapses!")
- H.Knockdown(2)
- if(2) //Target gets put to sleep for a few seconds
- to_chat(H, "You feel exhausted...")
- H.drowsyness += 4
- spawn(2 SECONDS)
- H.sleeping += 3
- if(3) //Minor hallucinations and jittering
- to_chat(H, "Your mind feels less stable, and you feel nervous.")
- H.hallucination += 60 // For some reason it has to be this high at least or seemingly nothing happens
- H.Jitter(20)
- H.stuttering += 20
- if(4) //Ranged disarm
- to_chat(H, "Your arm jerks involuntarily, and you drop what you're holding!")
- H.drop_item()
- return 1
+ else
+ switch(rand(0,4))
+ if(0) //Minor brain damage
+ to_chat(H, "You get a blindingly painful headache.")
+ H.adjustBrainLoss(10)
+ H.eye_blurry = max(H.eye_blurry, 5)
+ if(1) //Brief knockdown
+ to_chat(H, "You suddenly lose your sense of balance!")
+ H.emote("me", 1, "collapses!")
+ H.Knockdown(2)
+ if(2) //Target gets put to sleep for a few seconds
+ to_chat(H, "You feel exhausted...")
+ H.drowsyness += 4
+ spawn(2 SECONDS)
+ H.sleeping += 3
+ if(3) //Minor hallucinations and jittering
+ to_chat(H, "Your mind feels less stable, and you feel nervous.")
+ H.hallucination += 60 // For some reason it has to be this high at least or seemingly nothing happens
+ H.Jitter(20)
+ H.stuttering += 20
+ if(4) //Ranged disarm
+ to_chat(H, "Your arm jerks involuntarily, and you drop what you're holding!")
+ H.drop_item()
+ return 1
/mob/living/simple_animal/hostile/humanoid/grey/researcher/surgeon/Aggro()
..()
@@ -1004,48 +1005,64 @@
M.throw_at(target_turf,100,telekinesis_throw_speed)
/mob/living/simple_animal/hostile/humanoid/grey/leader/Shoot()
- // If not done cooling down from the previous psychic attack, just shoot a laser beem
- if(last_psychicattack + psychicattack_cooldown > world.time)
- ..()
- return
- var/list/victims = list()
- for(var/mob/living/carbon/human/H in view(src, psychic_range))
- victims.Add(H)
- if(!victims.len)
- return
- var/shot_choice = rand(0,4)
- for(var/mob/living/carbon/human/H in victims)
- if(!can_mind_interact(H.mind))
- continue
- switch(shot_choice)
+ if(last_psychicattack + psychicattack_cooldown < world.time)
+ var/list/victims = list()
+ for(var/mob/living/carbon/human/H in view(src, psychic_range))
+ victims.Add(H)
+
+ if(!victims.len)
+ return
+ switch(rand(0,4))
if(0) //Brain damage, confusion, and dizziness
- to_chat(H, "An unbearable pain stabs into your mind!")
- H.adjustBrainLoss(20)
- H.eye_blurry = max(H.eye_blurry, 10)
- H.confused += 10
- H.dizziness += 10
- if(prob(25))
- H.audible_scream()
+ for(var/mob/living/carbon/human/H in victims)
+ if(H.isUnconscious() || H.is_wearing_item(/obj/item/clothing/head/tinfoil) || (M_PSY_RESIST in H.mutations)) // Psy-attacks don't work if the target is unconsious, wearing a tin foil hat, or has genetic resistance
+ continue
+ to_chat(H, "An unbearable pain stabs into your mind!")
+ H.adjustBrainLoss(20)
+ H.eye_blurry = max(H.eye_blurry, 10)
+ H.confused += 10
+ H.dizziness += 10
+ last_psychicattack = world.time
+ if(prob(25))
+ H.audible_scream()
if(1) //A knockdown, with some dizziness
- to_chat(H, "You suddenly lose your sense of balance!")
- H.emote("me", 1, "collapses!")
- H.Knockdown(4)
- H.confused += 6
- H.dizziness += 6
+ for(var/mob/living/carbon/human/H in victims)
+ if(H.isUnconscious() || H.is_wearing_item(/obj/item/clothing/head/tinfoil) || (M_PSY_RESIST in H.mutations)) // Psy-attacks don't work if the target is unconsious, wearing a tin foil hat, or has genetic resistance
+ continue
+ to_chat(H, "You suddenly lose your sense of balance!")
+ H.emote("me", 1, "collapses!")
+ H.Knockdown(4)
+ H.confused += 6
+ H.dizziness += 6
+ last_psychicattack = world.time
if(2) //Naptime
- to_chat(H, "You feel exhausted beyond belief. You can't keep your eyes open...")
- H.drowsyness += 6
- spawn(2 SECONDS)
- H.sleeping += 5
+ for(var/mob/living/carbon/human/H in victims)
+ if(H.isUnconscious() || H.is_wearing_item(/obj/item/clothing/head/tinfoil) || (M_PSY_RESIST in H.mutations)) // Psy-attacks don't work if the target is unconsious, wearing a tin foil hat, or has genetic resistance
+ continue
+ to_chat(H, "You feel exhausted beyond belief. You can't keep your eyes open...")
+ H.drowsyness += 6
+ last_psychicattack = world.time
+ spawn(2 SECONDS)
+ H.sleeping += 5
if(3) //Serious hallucinations and jittering
- to_chat(H, "Your mind feels much less stable, and you feel a terrible dread.")
- H.hallucination += 75
- H.Jitter(30)
- H.stuttering += 30
+ for(var/mob/living/carbon/human/H in victims)
+ if(H.isUnconscious() || H.is_wearing_item(/obj/item/clothing/head/tinfoil) || (M_PSY_RESIST in H.mutations)) // Psy-attacks don't work if the target is unconsious, wearing a tin foil hat, or has genetic resistance
+ continue
+ to_chat(H, "Your mind feels much less stable, and you feel a terrible dread.")
+ H.hallucination += 75
+ H.Jitter(30)
+ H.stuttering += 30
+ last_psychicattack = world.time
if(4) //Brief period of pacification
- to_chat(H, "You feel strangely calm and passive. What's the point in fighting?")
- H.reagents.add_reagent(CHILLWAX, 1)
- last_psychicattack = world.time
+ for(var/mob/living/carbon/human/H in victims)
+ if(H.isUnconscious() || H.is_wearing_item(/obj/item/clothing/head/tinfoil) || (M_PSY_RESIST in H.mutations)) // Psy-attacks don't work if the target is unconsious, wearing a tin foil hat, or has genetic resistance
+ continue
+ to_chat(H, "You feel strangely calm and passive. What's the point in fighting?")
+ H.reagents.add_reagent(CHILLWAX, 1)
+ last_psychicattack = world.time
+
+ if(!last_psychicattack + psychicattack_cooldown < world.time) // If not done cooling down from the previous psychic attack, just shoot a laser beem
+ ..()
/mob/living/simple_animal/hostile/humanoid/grey/leader/bullet_act(var/obj/item/projectile/P) // Lasers have a 50% chance to reflect off the armor, which matches up if the player takes it and puts it on
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam) || istype(P, /obj/item/projectile/forcebolt) || istype(P, /obj/item/projectile/change))
diff --git a/code/modules/mob/living/simple_animal/hostile/human/halloween.dm b/code/modules/mob/living/simple_animal/hostile/human/halloween.dm
index 7a0623084bc..0bdabb741b2 100644
--- a/code/modules/mob/living/simple_animal/hostile/human/halloween.dm
+++ b/code/modules/mob/living/simple_animal/hostile/human/halloween.dm
@@ -639,7 +639,9 @@
switch(spell)
if(1) //Mass Hallucination
for(var/mob/living/carbon/human/H in victims)
- if(!can_mind_interact(H.mind))
+ if(H.is_wearing_any(list(/obj/item/clothing/head/tinfoil,/obj/item/clothing/head/helmet/stun), slot_head))
+ continue
+ if(M_PSY_RESIST in H.mutations)
continue
to_chat(H, "You feel [diceroll>15 ? "incredibly" : ""] disorientated.")
H.hallucination = clamp(rand(10,20)*diceroll, hallucination, 60) //Maximum of 120 seconds
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index d3fcf700b38..d600e8a9e9f 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -2218,7 +2218,7 @@ Use this proc preferably at the end of an equipment loadout
/mob/proc/attempt_crawling(var/turf/target)
return FALSE
-/proc/can_mind_interact(var/datum/mind/target_mind)
+/mob/proc/can_mind_interact(var/datum/mind/target_mind)
var/mob/living/target
if(isliving(target_mind))
target = target_mind
@@ -2228,34 +2228,26 @@ Use this proc preferably at the end of an equipment loadout
target = target_mind.current
if (!istype(target))
return null
- if(M_JAMSIGNALS in target.mutations)
+ var/turf/target_turf = get_turf(target)
+ var/turf/our_turf = get_turf(src)
+ if(!target_turf)
return null
- if(isalien(target))
+ if (target.isDead())
+ to_chat(src, "You cannot sense the target mind anymore, that's not good...")
return null
- if(target.is_wearing_item(/obj/item/clothing/mask/gas/voice))
+ if(target_turf.z != our_turf.z) //Not on the same zlevel as us
+ to_chat(src, "The target mind is too faint, they must be quite far from you...")
return null
- if(target.is_wearing_item(/obj/item/clothing/head/helmet/stun/))
+ if(target.stat != CONSCIOUS)
+ to_chat(src, "The target mind is too faint, but still close, they must be unconscious...")
return null
- if(target.is_wearing_item(/obj/item/clothing/gloves/ninja))
+ if(M_PSY_RESIST in target.mutations)
+ to_chat(src, "The target mind is resisting!")
return null
- if(target.is_wearing_item(/obj/item/clothing/head/tinfoil))
+ if(target.is_wearing_any(list(/obj/item/clothing/head/helmet/space/martian,/obj/item/clothing/head/tinfoil,/obj/item/clothing/head/helmet/stun), slot_head))
+ to_chat(src, "Interference is disrupting the connection with the target mind.")
return null
- if(target.is_wearing_item(/obj/item/clothing/head/helmet/space/martian))
- return null
- if(target.is_holding_item(/obj/item/device/megaphone/madscientist))
- return null
- var/mob/living/carbon/human/H = target
- if(istype(H))
- if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
- return null
- if(istruevampire(H))
- return null
- var/datum/role/changeling/C = target.mind.GetRole(CHANGELING)
- if(istype(C))
- if(locate(/datum/power/changeling/DigitalCamouflage) in C.current_powers)
- return null
-
- return TRUE
+ return target
/mob/proc/canMouseDrag()//used mostly to check if the mob can drag'and'drop stuff in/out of various other stuff, such as disposals, cryo tubes, etc.
return TRUE
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 349336bfe52..218f9943bd4 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -233,6 +233,8 @@
var/status_flags = CANSTUN|CANKNOCKDOWN|CANPARALYSE|CANPUSH //bitflags defining which status effects can be inflicted (replaces CANKNOCKDOWN, canstun, etc)
+ var/digitalcamo = 0 // Can they be tracked by the AI?
+
var/list/radar_blips = list() // list of screen objects, radar blips
var/radar_open = 0 // nonzero is radar is open
diff --git a/code/modules/spells/targeted/targeted.dm b/code/modules/spells/targeted/targeted.dm
index ac5a14b3ca6..625904b374f 100644
--- a/code/modules/spells/targeted/targeted.dm
+++ b/code/modules/spells/targeted/targeted.dm
@@ -39,13 +39,13 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp
return 0
if(ismob(target) && mind_affecting)
var/mob/M = target
- if (!can_mind_interact(M.mind))
+ if (!user.can_mind_interact(M.mind))
return 0
return !compatible_mobs.len || is_type_in_list(target, compatible_mobs)
/spell/targeted/choose_targets(mob/user = usr)
- if(mind_affecting && !can_mind_interact(user.mind))
- to_chat(user, "Interference is disrupting the connection with the target.")
+ if(mind_affecting && tinfoil_check(user))
+ to_chat(user, "Something is interfering with your ability to target minds.")
return
var/list/targets = list()
if(max_targets == 0) //unlimited
@@ -96,7 +96,7 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp
continue
if(mind_affecting)
if(iscarbon(user))
- if(!M.mind || !can_mind_interact(M.mind))
+ if(!M.mind || !user.can_mind_interact(M.mind))
continue
possible_targets += M
@@ -185,3 +185,12 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp
target.confused += amt_confused
target.confused_intensity = CONFUSED_MAGIC
target.stuttering += amt_stuttering
+
+/spell/targeted/proc/tinfoil_check(mob/living/carbon/human/user)
+ if(!istype(user))
+ return 0
+
+ if(user.is_wearing_any(list(/obj/item/clothing/head/tinfoil,/obj/item/clothing/head/helmet/stun), slot_head))
+ return 1
+
+ return 0