diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index 27118ae808a..ed0d35b482c 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -116,6 +116,8 @@
/// Returns a list of trait sources for this trait. Only useful for wacko cases and internal futzing
/// You should not be using this
#define GET_TRAIT_SOURCES(target, trait) target._status_traits?[trait] || list()
+/// A simple helper for checking traits in a mob's mind
+#define HAS_MIND_TRAIT(target, trait) (HAS_TRAIT(target, trait) || (target.mind ? HAS_TRAIT(target.mind, trait) : FALSE))
/*
Remember to update _globalvars/traits.dm if you're adding/removing/renaming traits.
diff --git a/code/__HELPERS/hallucinations.dm b/code/__HELPERS/hallucinations.dm
index 809ff475fc9..9deb27b9040 100644
--- a/code/__HELPERS/hallucinations.dm
+++ b/code/__HELPERS/hallucinations.dm
@@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(all_ongoing_hallucinations)
*/
/proc/visible_hallucination_pulse(atom/center, radius = 7, hallucination_duration = 50 SECONDS, hallucination_max_duration, list/optional_messages)
for(var/mob/living/nearby_living in view(center, radius))
- if(HAS_TRAIT(nearby_living, TRAIT_MADNESS_IMMUNE) || (nearby_living.mind && HAS_TRAIT(nearby_living.mind, TRAIT_MADNESS_IMMUNE)))
+ if(HAS_MIND_TRAIT(nearby_living, TRAIT_MADNESS_IMMUNE))
continue
if(nearby_living.mob_biotypes & NO_HALLUCINATION_BIOTYPES)
diff --git a/code/datums/ai/hauntium/haunted_controller.dm b/code/datums/ai/hauntium/haunted_controller.dm
index 0f5f08dfc94..b2863a310c1 100644
--- a/code/datums/ai/hauntium/haunted_controller.dm
+++ b/code/datums/ai/hauntium/haunted_controller.dm
@@ -28,7 +28,7 @@
var/haunt_equipper = TRUE
if(isliving(equipper))
var/mob/living/possibly_cool = equipper
- if(possibly_cool.mob_biotypes & MOB_UNDEAD || possibly_cool.mind && HAS_TRAIT(possibly_cool.mind, TRAIT_MORBID))
+ if(possibly_cool.mob_biotypes & MOB_UNDEAD || HAS_MIND_TRAIT(possibly_cool, TRAIT_MORBID))
haunt_equipper = FALSE
if(haunt_equipper)
//You have now become one of the victims of the HAAAAUNTTIIIINNGGG OOOOOO~~~
diff --git a/code/datums/components/sign_language.dm b/code/datums/components/sign_language.dm
index bb6548ddf41..23e40258100 100644
--- a/code/datums/components/sign_language.dm
+++ b/code/datums/components/sign_language.dm
@@ -131,7 +131,7 @@
SIGNAL_HANDLER
var/mob/living/carbon/carbon_parent = parent
- if(HAS_TRAIT(carbon_parent, TRAIT_MIMING))
+ if(HAS_MIND_TRAIT(carbon_parent, TRAIT_MIMING))
to_chat(carbon_parent, span_green("You stop yourself from signing in favor of the artform of mimery!"))
return COMPONENT_CANNOT_SPEAK
@@ -214,7 +214,7 @@
var/mob/living/carbon/carbon_parent = parent
if(spell.invocation_type == INVOCATION_EMOTE) // Mime spells are not cast with signs
return NONE // Run normal checks
- else if(check_signables_state() != SIGN_OKAY || HAS_TRAIT(carbon_parent, TRAIT_MIMING)) // Cannot cast if miming or not SIGN_OKAY
+ else if(check_signables_state() != SIGN_OKAY || HAS_MIND_TRAIT(carbon_parent, TRAIT_MIMING)) // Cannot cast if miming or not SIGN_OKAY
if(feedback)
to_chat(carbon_parent, span_warning("You can't sign the words to invoke [spell]!"))
return SPELL_INVOCATION_FAIL
diff --git a/code/datums/elements/befriend_petting.dm b/code/datums/elements/befriend_petting.dm
index 26972e3aeff..91ecaaf85e1 100644
--- a/code/datums/elements/befriend_petting.dm
+++ b/code/datums/elements/befriend_petting.dm
@@ -36,7 +36,7 @@
if (user.combat_mode)
return // We'll deal with this later
if (owner.stat == DEAD)
- var/additional_text = HAS_TRAIT(user.mind, TRAIT_NAIVE) ? "It looks like [owner.p_theyre()] sleeping." : "[owner.p_they(capitalized = TRUE)] seem[owner.p_s()] to be dead."
+ var/additional_text = HAS_MIND_TRAIT(user, TRAIT_NAIVE) ? "It looks like [owner.p_theyre()] sleeping." : "[owner.p_they(capitalized = TRUE)] seem[owner.p_s()] to be dead."
to_chat(user, span_warning("[owner] feels cold to the touch. [additional_text]"))
return
if (owner.stat != CONSCIOUS)
diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm
index 458f437417e..ba40fc5f0b4 100644
--- a/code/datums/emotes.dm
+++ b/code/datums/emotes.dm
@@ -218,7 +218,7 @@
. = msg
if(!muzzle_ignore && user.is_muzzled() && emote_type & EMOTE_AUDIBLE)
return "makes a [pick("strong ", "weak ", "")]noise."
- if(HAS_TRAIT(user, TRAIT_MIMING) && message_mime)
+ if(HAS_MIND_TRAIT(user, TRAIT_MIMING) && message_mime)
. = message_mime
if(isalienadult(user) && message_alien)
. = message_alien
@@ -312,7 +312,7 @@
return FALSE
if(ishuman(user))
var/mob/living/carbon/human/loud_mouth = user
- if(HAS_TRAIT(loud_mouth, TRAIT_MIMING)) // vow of silence prevents outloud noises
+ if(HAS_MIND_TRAIT(loud_mouth, TRAIT_MIMING)) // vow of silence prevents outloud noises
return FALSE
if(!loud_mouth.get_organ_slot(ORGAN_SLOT_TONGUE))
return FALSE
diff --git a/code/datums/weather/weather_types/snow_storm.dm b/code/datums/weather/weather_types/snow_storm.dm
index 080ea3cc878..9db51ee5ad4 100644
--- a/code/datums/weather/weather_types/snow_storm.dm
+++ b/code/datums/weather/weather_types/snow_storm.dm
@@ -39,7 +39,7 @@
if(isobserver(player))
return TRUE
- if(HAS_TRAIT(player, TRAIT_DETECT_STORM) || HAS_TRAIT(player.mind, TRAIT_DETECT_STORM))
+ if(HAS_MIND_TRAIT(player, TRAIT_DETECT_STORM))
return TRUE
if(istype(get_area(player), /area/mine))
diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm
index 920f858a19d..279f8101007 100644
--- a/code/game/objects/items/defib.dm
+++ b/code/game/objects/items/defib.dm
@@ -657,7 +657,7 @@
H.set_jitter_if_lower(200 SECONDS)
to_chat(H, "[CONFIG_GET(string/blackoutpolicy)]") //SKYRAT EDIT ADDITION
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK)
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID))
user.add_mood_event("morbid_saved_life", /datum/mood_event/morbid_saved_life)
else
user.add_mood_event("saved_life", /datum/mood_event/saved_life)
diff --git a/code/game/objects/items/food/bread.dm b/code/game/objects/items/food/bread.dm
index e3ee72a573d..7608657f580 100644
--- a/code/game/objects/items/food/bread.dm
+++ b/code/game/objects/items/food/bread.dm
@@ -343,18 +343,18 @@
/obj/item/food/baguette/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
- if (HAS_TRAIT(user, TRAIT_MIMING) && held_item == src)
+ if(HAS_MIND_TRAIT(user, TRAIT_MIMING) && held_item == src)
context[SCREENTIP_CONTEXT_LMB] = "Toggle Swordplay"
return CONTEXTUAL_SCREENTIP_SET
/obj/item/food/baguette/examine(mob/user)
. = ..()
- if(HAS_TRAIT(user, TRAIT_MIMING))
+ if(HAS_MIND_TRAIT(user, TRAIT_MIMING))
. += span_notice("You can wield this like a sword by using it in your hand.")
/obj/item/food/baguette/attack_self(mob/user, modifiers)
. = ..()
- if(!HAS_TRAIT(user, TRAIT_MIMING))
+ if(!HAS_MIND_TRAIT(user, TRAIT_MIMING))
return
if(fake_swordplay)
end_swordplay(user)
diff --git a/code/game/objects/items/gift.dm b/code/game/objects/items/gift.dm
index 6c89627f0b6..324151feddb 100644
--- a/code/game/objects/items/gift.dm
+++ b/code/game/objects/items/gift.dm
@@ -34,11 +34,11 @@ GLOBAL_LIST_EMPTY(possible_gifts)
/obj/item/a_gift/examine(mob/M)
. = ..()
- if((M.mind && HAS_TRAIT(M.mind, TRAIT_PRESENT_VISION)) || isobserver(M))
+ if(HAS_MIND_TRAIT(M, TRAIT_PRESENT_VISION) || isobserver(M))
. += span_notice("It contains \a [initial(contains_type.name)].")
/obj/item/a_gift/attack_self(mob/M)
- if(M.mind && HAS_TRAIT(M.mind, TRAIT_CANNOT_OPEN_PRESENTS))
+ if(HAS_MIND_TRAIT(M, TRAIT_CANNOT_OPEN_PRESENTS))
to_chat(M, span_warning("You're supposed to be spreading gifts, not opening them yourself!"))
return
diff --git a/code/game/objects/items/melee/baton.dm b/code/game/objects/items/melee/baton.dm
index 0bef7faf988..ed842159d20 100644
--- a/code/game/objects/items/melee/baton.dm
+++ b/code/game/objects/items/melee/baton.dm
@@ -127,7 +127,7 @@
if(!chunky_finger_usable && ishuman(user))
var/mob/living/carbon/human/potential_chunky_finger_human = user
- if(potential_chunky_finger_human.check_chunky_fingers() && user.is_holding(src) && !HAS_TRAIT(user, TRAIT_CHUNKYFINGERS_IGNORE_BATON) && (user.mind && !HAS_TRAIT(user.mind, TRAIT_CHUNKYFINGERS_IGNORE_BATON)))
+ if(potential_chunky_finger_human.check_chunky_fingers() && user.is_holding(src) && !HAS_MIND_TRAIT(user, TRAIT_CHUNKYFINGERS_IGNORE_BATON))
balloon_alert(potential_chunky_finger_human, "fingers are too big!")
return BATON_ATTACK_DONE
diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm
index a2f420096d2..f3e26d2ee62 100644
--- a/code/game/objects/items/storage/backpack.dm
+++ b/code/game/objects/items/storage/backpack.dm
@@ -103,7 +103,7 @@
var/mob/user = get(loc, /mob)
if(!istype(user))
return
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_CANNOT_OPEN_PRESENTS))
+ if(HAS_MIND_TRAIT(user, TRAIT_CANNOT_OPEN_PRESENTS))
var/turf/floor = get_turf(src)
var/obj/item/thing = new /obj/item/a_gift/anything(floor)
if(!atom_storage.attempt_insert(thing, user, override = TRUE))
diff --git a/code/game/objects/items/storage/boxes/job_boxes.dm b/code/game/objects/items/storage/boxes/job_boxes.dm
index 543f864f204..1720893eb5e 100644
--- a/code/game/objects/items/storage/boxes/job_boxes.dm
+++ b/code/game/objects/items/storage/boxes/job_boxes.dm
@@ -161,7 +161,7 @@
/obj/item/storage/box/mime/attack_hand(mob/user, list/modifiers)
..()
- if(HAS_TRAIT(user, TRAIT_MIMING))
+ if(HAS_MIND_TRAIT(user, TRAIT_MIMING))
alpha = 255
/obj/item/storage/box/mime/Moved(atom/old_loc, movement_dir, forced, list/old_locs, momentum_change = TRUE)
diff --git a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
index 765baa2c065..0c02105f9ed 100644
--- a/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
+++ b/code/modules/antagonists/abductor/equipment/gear/abductor_items.dm
@@ -6,14 +6,14 @@
/obj/item/proc/AbductorCheck(mob/user)
if (HAS_TRAIT(user, TRAIT_ABDUCTOR_TRAINING))
return TRUE
- if (istype(user) && user.mind && HAS_TRAIT(user.mind, TRAIT_ABDUCTOR_TRAINING))
+ if (istype(user) && HAS_MIND_TRAIT(user, TRAIT_ABDUCTOR_TRAINING))
return TRUE
to_chat(user, span_warning("You can't figure out how this works!"))
return FALSE
/obj/item/abductor/proc/ScientistCheck(mob/user)
- var/training = HAS_TRAIT(user, TRAIT_ABDUCTOR_TRAINING) || (user.mind && HAS_TRAIT(user.mind, TRAIT_ABDUCTOR_TRAINING))
- var/sci_training = HAS_TRAIT(user, TRAIT_ABDUCTOR_SCIENTIST_TRAINING) || (user.mind && HAS_TRAIT(user.mind, TRAIT_ABDUCTOR_SCIENTIST_TRAINING))
+ var/training = HAS_MIND_TRAIT(user, TRAIT_ABDUCTOR_TRAINING)
+ var/sci_training = HAS_MIND_TRAIT(user, TRAIT_ABDUCTOR_SCIENTIST_TRAINING)
if(training && !sci_training)
to_chat(user, span_warning("You're not trained to use this!"))
diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm
index e61e6c775dd..c1dcf68b9df 100644
--- a/code/modules/antagonists/abductor/equipment/gland.dm
+++ b/code/modules/antagonists/abductor/equipment/gland.dm
@@ -29,7 +29,7 @@
/obj/item/organ/internal/heart/gland/examine(mob/user)
. = ..()
- if((user.mind && HAS_TRAIT(user.mind, TRAIT_ABDUCTOR_SCIENTIST_TRAINING)) || isobserver(user))
+ if(HAS_MIND_TRAIT(user, TRAIT_ABDUCTOR_SCIENTIST_TRAINING) || isobserver(user))
. += span_notice("It is \a [abductor_hint]")
/obj/item/organ/internal/heart/gland/proc/ownerCheck()
diff --git a/code/modules/antagonists/abductor/machinery/console.dm b/code/modules/antagonists/abductor/machinery/console.dm
index 24da496f785..b76a25ca720 100644
--- a/code/modules/antagonists/abductor/machinery/console.dm
+++ b/code/modules/antagonists/abductor/machinery/console.dm
@@ -66,7 +66,7 @@
. = ..()
if(.)
return
- if(!HAS_TRAIT(user, TRAIT_ABDUCTOR_TRAINING) && !HAS_TRAIT(user.mind, TRAIT_ABDUCTOR_TRAINING))
+ if(!HAS_MIND_TRAIT(user, TRAIT_ABDUCTOR_TRAINING))
to_chat(user, span_warning("You start mashing alien buttons at random!"))
if(do_after(user,100, target = src))
TeleporterSend()
diff --git a/code/modules/antagonists/nukeop/equipment/nuclear_authentication_disk.dm b/code/modules/antagonists/nukeop/equipment/nuclear_authentication_disk.dm
index b1db9a79ff1..6372b402cab 100644
--- a/code/modules/antagonists/nukeop/equipment/nuclear_authentication_disk.dm
+++ b/code/modules/antagonists/nukeop/equipment/nuclear_authentication_disk.dm
@@ -69,7 +69,7 @@
if(!fake)
return
- if(isobserver(user) || HAS_TRAIT(user, TRAIT_DISK_VERIFIER) || (user.mind && HAS_TRAIT(user.mind, TRAIT_DISK_VERIFIER)))
+ if(isobserver(user) || HAS_MIND_TRAIT(user, TRAIT_DISK_VERIFIER))
. += span_warning("The serial numbers on [src] are incorrect.")
/*
diff --git a/code/modules/antagonists/traitor/objectives/eyesnatching.dm b/code/modules/antagonists/traitor/objectives/eyesnatching.dm
index 106a78bba2b..49c53180b39 100644
--- a/code/modules/antagonists/traitor/objectives/eyesnatching.dm
+++ b/code/modules/antagonists/traitor/objectives/eyesnatching.dm
@@ -165,7 +165,7 @@
if(!head || !eyeballies || target.is_eyes_covered())
return ..()
var/eye_snatch_enthusiasm = 5 SECONDS
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID))
eye_snatch_enthusiasm *= 0.7
user.do_attack_animation(target, used_item = src)
target.visible_message(
diff --git a/code/modules/events/immovable_rod/immovable_rod.dm b/code/modules/events/immovable_rod/immovable_rod.dm
index daff4097f53..07aa4d25683 100644
--- a/code/modules/events/immovable_rod/immovable_rod.dm
+++ b/code/modules/events/immovable_rod/immovable_rod.dm
@@ -226,7 +226,7 @@
if(.)
return
- if(!(HAS_TRAIT(user, TRAIT_ROD_SUPLEX) || (user.mind && HAS_TRAIT(user.mind, TRAIT_ROD_SUPLEX))))
+ if(!HAS_MIND_TRAIT(user, TRAIT_ROD_SUPLEX))
return
playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE)
diff --git a/code/modules/jobs/job_types/chaplain/chaplain_vorpal_scythe.dm b/code/modules/jobs/job_types/chaplain/chaplain_vorpal_scythe.dm
index 5b0a6274bf1..bd15158e872 100644
--- a/code/modules/jobs/job_types/chaplain/chaplain_vorpal_scythe.dm
+++ b/code/modules/jobs/job_types/chaplain/chaplain_vorpal_scythe.dm
@@ -164,7 +164,7 @@ If the scythe isn't empowered when you sheath it, you take a heap of damage and
scythe_empowerment(potential_empowerment)
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID)) //You feel good about yourself, pal?
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID)) //You feel good about yourself, pal?
user.add_mood_event("morbid_dismemberment", /datum/mood_event/morbid_dismemberment)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
diff --git a/code/modules/mapfluff/ruins/lavalandruin_code/elephantgraveyard.dm b/code/modules/mapfluff/ruins/lavalandruin_code/elephantgraveyard.dm
index 14e5bcb2dc2..435b863868f 100644
--- a/code/modules/mapfluff/ruins/lavalandruin_code/elephantgraveyard.dm
+++ b/code/modules/mapfluff/ruins/lavalandruin_code/elephantgraveyard.dm
@@ -237,12 +237,12 @@
dug_closed = TRUE
close(user)
else if(open(user, force = TRUE))
- if (user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID))
user.add_mood_event("morbid_graverobbing", /datum/mood_event/morbid_graverobbing)
else
user.add_mood_event("graverobbing", /datum/mood_event/graverobbing)
if(lead_tomb && first_open)
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID))
to_chat(user, span_notice("Did someone say something? I'm sure it was nothing."))
else
user.gain_trauma(/datum/brain_trauma/magic/stalker)
diff --git a/code/modules/mob/living/carbon/carbon_say.dm b/code/modules/mob/living/carbon/carbon_say.dm
index d2245d6c668..3e4c29fa0e8 100644
--- a/code/modules/mob/living/carbon/carbon_say.dm
+++ b/code/modules/mob/living/carbon/carbon_say.dm
@@ -10,6 +10,6 @@
var/obj/item/organ/internal/tongue/spoken_with = get_organ_slot(ORGAN_SLOT_TONGUE)
if(spoken_with)
// the tower of babel needs to bypass the tongue language restrictions without giving omnitongue
- return (mind && HAS_TRAIT(mind, TRAIT_TOWER_OF_BABEL)) || spoken_with.could_speak_language(language_path)
+ return HAS_MIND_TRAIT(src, TRAIT_TOWER_OF_BABEL) || spoken_with.could_speak_language(language_path)
return initial(language_path.flags) & TONGUELESS_SPEECH
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 9e2d801d68a..79b564c629e 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -156,7 +156,7 @@
var/obj/item/clothing/glasses/G = get_item_by_slot(ITEM_SLOT_EYES)
var/are_we_in_weekend_at_bernies = G?.tint && buckled && istype(buckled, /obj/vehicle/ridden/wheelchair)
- if(isliving(user) && (HAS_TRAIT(user.mind, TRAIT_NAIVE) || are_we_in_weekend_at_bernies))
+ if(isliving(user) && (HAS_MIND_TRAIT(user, TRAIT_NAIVE) || are_we_in_weekend_at_bernies))
just_sleeping = TRUE
if(!just_sleeping)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index f3467c29c1e..bf221beb90e 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -521,7 +521,7 @@
return FALSE
visible_message(span_notice("[src] performs CPR on [target.name]!"), span_notice("You perform CPR on [target.name]."))
- if(HAS_TRAIT(src, TRAIT_MORBID))
+ if(HAS_MIND_TRAIT(src, TRAIT_MORBID))
add_mood_event("morbid_saved_life", /datum/mood_event/morbid_saved_life)
else
add_mood_event("saved_life", /datum/mood_event/saved_life)
diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm
index b620d56da1b..e52aa93e47c 100644
--- a/code/modules/mob/living/emote.dm
+++ b/code/modules/mob/living/emote.dm
@@ -192,7 +192,7 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/human_user = user
- if(human_user.dna.species.id == SPECIES_HUMAN && !HAS_TRAIT(human_user, TRAIT_MIMING))
+ if(human_user.dna.species.id == SPECIES_HUMAN && !HAS_MIND_TRAIT(human_user, TRAIT_MIMING))
if(human_user.gender == FEMALE)
return pick('sound/voice/human/gasp_female1.ogg', 'sound/voice/human/gasp_female2.ogg', 'sound/voice/human/gasp_female3.ogg')
else
@@ -283,7 +283,7 @@
if(!ishuman(user))
return
var/mob/living/carbon/human/human_user = user
- if(human_user.dna.species.id == SPECIES_HUMAN && !HAS_TRAIT(human_user, TRAIT_MIMING))
+ if(human_user.dna.species.id == SPECIES_HUMAN && !HAS_MIND_TRAIT(human_user, TRAIT_MIMING))
if(human_user.gender == FEMALE)
return 'sound/voice/human/womanlaugh.ogg'
else
diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm
index 43cb0d03023..479b5e07ad3 100644
--- a/code/modules/mob/living/living_say.dm
+++ b/code/modules/mob/living/living_say.dm
@@ -419,7 +419,7 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list(
return FALSE
if(!can_speak())
- if(HAS_TRAIT(src, TRAIT_MIMING))
+ if(HAS_MIND_TRAIT(src, TRAIT_MIMING))
to_chat(src, span_green("Your vow of silence prevents you from speaking!"))
else
to_chat(src, span_warning("You find yourself unable to speak!"))
@@ -428,7 +428,7 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list(
return TRUE
/mob/living/can_speak(allow_mimes = FALSE)
- if(!allow_mimes && HAS_TRAIT(src, TRAIT_MIMING))
+ if(!allow_mimes && HAS_MIND_TRAIT(src, TRAIT_MIMING))
return FALSE
if(HAS_TRAIT(src, TRAIT_MUTE))
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 2354699332b..bf1ee02fbc0 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -143,7 +143,7 @@
if(stat != DEAD)
return
- if(HAS_TRAIT(user.mind, TRAIT_NAIVE))
+ if(HAS_MIND_TRAIT(user, TRAIT_NAIVE))
. += pick(
"It seems tired and shagged out after a long squawk.",
"It seems to be pining for the fjords.",
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index b508542aadd..5ab67387eba 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -227,7 +227,7 @@
/mob/living/simple_animal/examine(mob/user)
. = ..()
if(stat == DEAD)
- if(HAS_TRAIT(user.mind, TRAIT_NAIVE))
+ if(HAS_MIND_TRAIT(user, TRAIT_NAIVE))
. += span_deadsay("Upon closer examination, [p_they()] appear[p_s()] to be asleep.")
else
. += span_deadsay("Upon closer examination, [p_they()] appear[p_s()] to be dead.")
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index afc1792533b..ee9727fa911 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -1338,7 +1338,7 @@
to_chat(src, span_warning("You can't write with the [writing_instrument]!"))
return FALSE
- if(HAS_TRAIT(src, TRAIT_MIMING) && !istype(writing_instrument, /obj/item/toy/crayon/mime))
+ if(HAS_MIND_TRAIT(src, TRAIT_MIMING) && !istype(writing_instrument, /obj/item/toy/crayon/mime))
to_chat(src, span_warning("Your vow of silence is preventing you from talking with text."))
return FALSE
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index b9ebdf61736..c4862a3b2a6 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -230,7 +230,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/examine(mob/user)
. = ..()
- var/immune = HAS_TRAIT(user, TRAIT_MADNESS_IMMUNE) || (user.mind && HAS_TRAIT(user.mind, TRAIT_MADNESS_IMMUNE))
+ var/immune = HAS_MIND_TRAIT(user, TRAIT_MADNESS_IMMUNE)
if(isliving(user) && !immune && (get_dist(user, src) < SM_HALLUCINATION_RANGE(internal_energy)))
. += span_danger("You get headaches just from looking at it.")
. += delamination_strategy.examine(src)
diff --git a/code/modules/power/supermatter/supermatter_extra_effects.dm b/code/modules/power/supermatter/supermatter_extra_effects.dm
index 62a66f11b8c..7fe56d9c2d4 100644
--- a/code/modules/power/supermatter/supermatter_extra_effects.dm
+++ b/code/modules/power/supermatter/supermatter_extra_effects.dm
@@ -79,7 +79,7 @@
var/psy_coeff_diff = -0.05
for(var/mob/living/carbon/human/seen_by_sm in view(src, SM_HALLUCINATION_RANGE(internal_energy)))
// Someone (generally a Psychologist), when looking at the SM within hallucination range makes it easier to manage.
- if(HAS_TRAIT(seen_by_sm, TRAIT_SUPERMATTER_SOOTHER) || (seen_by_sm.mind && HAS_TRAIT(seen_by_sm.mind, TRAIT_SUPERMATTER_SOOTHER)))
+ if(HAS_MIND_TRAIT(seen_by_sm, TRAIT_SUPERMATTER_SOOTHER))
psy_coeff_diff = 0.05
visible_hallucination_pulse(
center = src,
diff --git a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
index e51a8c2075a..e062ecec54d 100644
--- a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
@@ -1230,7 +1230,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/ethanol/silencer/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, times_fired)
- if(ishuman(drinker) && HAS_TRAIT(drinker, TRAIT_MIMING))
+ if(ishuman(drinker) && HAS_MIND_TRAIT(drinker, TRAIT_MIMING))
drinker.set_silence_if_lower(MIMEDRINK_SILENCE_DURATION)
drinker.heal_bodypart_damage(1 * REM * seconds_per_tick, 1 * REM * seconds_per_tick)
. = TRUE
@@ -1865,7 +1865,7 @@
chemical_flags = REAGENT_CAN_BE_SYNTHESIZED
/datum/reagent/consumable/ethanol/blank_paper/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, times_fired)
- if(ishuman(drinker) && HAS_TRAIT(drinker, TRAIT_MIMING))
+ if(ishuman(drinker) && HAS_MIND_TRAIT(drinker, TRAIT_MIMING))
drinker.set_silence_if_lower(MIMEDRINK_SILENCE_DURATION)
drinker.heal_bodypart_damage(1 * REM * seconds_per_tick, 1 * REM * seconds_per_tick)
. = TRUE
diff --git a/code/modules/reagents/chemistry/reagents/drinks/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drinks/drink_reagents.dm
index c5a4fbea5c4..3f6d4cbe7bd 100644
--- a/code/modules/reagents/chemistry/reagents/drinks/drink_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/drinks/drink_reagents.dm
@@ -128,7 +128,7 @@
icon_state = "shotglass"
/datum/reagent/consumable/nothing/on_mob_life(mob/living/carbon/drinker, seconds_per_tick, times_fired)
- if(ishuman(drinker) && HAS_TRAIT(drinker, TRAIT_MIMING))
+ if(ishuman(drinker) && HAS_MIND_TRAIT(drinker, TRAIT_MIMING))
drinker.set_silence_if_lower(MIMEDRINK_SILENCE_DURATION)
drinker.heal_bodypart_damage(1 * REM * seconds_per_tick, 1 * REM * seconds_per_tick)
. = TRUE
diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm
index 5d1ffb33a62..2ad318db529 100644
--- a/code/modules/spells/spell.dm
+++ b/code/modules/spells/spell.dm
@@ -165,7 +165,7 @@
// No point in feedback here, as mindless mobs aren't players
return FALSE
- if((spell_requirements & SPELL_REQUIRES_MIME_VOW) && !HAS_TRAIT(owner, TRAIT_MIMING))
+ if((spell_requirements & SPELL_REQUIRES_MIME_VOW) && !HAS_MIND_TRAIT(owner, TRAIT_MIMING))
// In the future this can be moved out of spell checks exactly
if(feedback)
to_chat(owner, span_warning("You must dedicate yourself to silence first!"))
diff --git a/code/modules/spells/spell_types/tower_of_babel.dm b/code/modules/spells/spell_types/tower_of_babel.dm
index c3261c52e2e..3c652579b7f 100644
--- a/code/modules/spells/spell_types/tower_of_babel.dm
+++ b/code/modules/spells/spell_types/tower_of_babel.dm
@@ -49,7 +49,7 @@ GLOBAL_DATUM(tower_of_babel, /datum/tower_of_babel)
if(!to_curse.mind)
return
- if(to_curse.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND) || HAS_TRAIT(to_curse.mind, TRAIT_TOWER_OF_BABEL))
+ if(to_curse.can_block_magic(MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND) || HAS_MIND_TRAIT(to_curse, TRAIT_TOWER_OF_BABEL))
to_chat(to_curse, span_notice("You have a strange feeling for a moment, but then it passes."))
return
diff --git a/code/modules/surgery/amputation.dm b/code/modules/surgery/amputation.dm
index 67f4a7b3d27..d442743c36b 100644
--- a/code/modules/surgery/amputation.dm
+++ b/code/modules/surgery/amputation.dm
@@ -60,7 +60,7 @@
)
display_pain(target, "You can no longer feel your severed [parse_zone(target_zone)]!")
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID) && ishuman(user))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user))
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_dismemberment", /datum/mood_event/morbid_dismemberment)
diff --git a/code/modules/surgery/autopsy.dm b/code/modules/surgery/autopsy.dm
index e5190b91fa2..4a552823d68 100644
--- a/code/modules/surgery/autopsy.dm
+++ b/code/modules/surgery/autopsy.dm
@@ -36,7 +36,7 @@
/datum/surgery_step/autopsy/success(mob/user, mob/living/carbon/target, target_zone, obj/item/autopsy_scanner/tool, datum/surgery/surgery, default_display_results = FALSE)
ADD_TRAIT(target, TRAIT_DISSECTED, REF(src))
tool.scan_cadaver(user, target)
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID) && ishuman(user))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user))
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_dissection_success", /datum/mood_event/morbid_dissection_success)
return ..()
diff --git a/code/modules/surgery/dissection.dm b/code/modules/surgery/dissection.dm
index b939a8d3914..917b67ff5f8 100644
--- a/code/modules/surgery/dissection.dm
+++ b/code/modules/surgery/dissection.dm
@@ -55,7 +55,7 @@
var/obj/machinery/computer/operating/operating_computer = surgery.locate_operating_computer(get_turf(target))
if (!isnull(operating_computer))
SEND_SIGNAL(operating_computer, COMSIG_OPERATING_COMPUTER_DISSECTION_COMPLETE, target)
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID) && ishuman(user))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user))
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_dissection_success", /datum/mood_event/morbid_dissection_success)
diff --git a/code/modules/surgery/healing.dm b/code/modules/surgery/healing.dm
index 1ed0318467b..cd54bf7252f 100644
--- a/code/modules/surgery/healing.dm
+++ b/code/modules/surgery/healing.dm
@@ -102,7 +102,7 @@
user_msg += get_progress(user, target, brute_healed, burn_healed)
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID) && ishuman(user) && !dead_patient) //Morbid folk don't care about tending the dead as much as tending the living
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user) && !dead_patient) //Morbid folk don't care about tending the dead as much as tending the living
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_tend_wounds", /datum/mood_event/morbid_tend_wounds)
diff --git a/code/modules/surgery/organ_manipulation.dm b/code/modules/surgery/organ_manipulation.dm
index e29f2aaabe8..33c9b54b3b1 100644
--- a/code/modules/surgery/organ_manipulation.dm
+++ b/code/modules/surgery/organ_manipulation.dm
@@ -276,7 +276,7 @@
span_notice("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!"),
span_notice("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!"),
)
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID) && ishuman(user))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user))
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_abominable_surgery_success", /datum/mood_event/morbid_abominable_surgery_success)
return ..()
diff --git a/code/modules/surgery/organs/internal/liver/_liver.dm b/code/modules/surgery/organs/internal/liver/_liver.dm
index e8705e019cd..e8be317d1d7 100644
--- a/code/modules/surgery/organs/internal/liver/_liver.dm
+++ b/code/modules/surgery/organs/internal/liver/_liver.dm
@@ -83,7 +83,7 @@
/obj/item/organ/internal/liver/examine(mob/user)
. = ..()
- if(HAS_TRAIT(user, TRAIT_ENTRAILS_READER) || (user.mind && HAS_TRAIT(user.mind, TRAIT_ENTRAILS_READER)) || isobserver(user))
+ if(HAS_MIND_TRAIT(user, TRAIT_ENTRAILS_READER) || isobserver(user))
if(HAS_TRAIT(src, TRAIT_LAW_ENFORCEMENT_METABOLISM))
. += span_info("Fatty deposits and sprinkle residue, imply that this is the liver of someone in security.")
if(HAS_TRAIT(src, TRAIT_CULINARY_METABOLISM))
diff --git a/code/modules/surgery/organs/internal/tongue/_tongue.dm b/code/modules/surgery/organs/internal/tongue/_tongue.dm
index dd8bcb4a12f..e767989fc05 100644
--- a/code/modules/surgery/organs/internal/tongue/_tongue.dm
+++ b/code/modules/surgery/organs/internal/tongue/_tongue.dm
@@ -54,7 +54,7 @@
/obj/item/organ/internal/tongue/examine(mob/user)
. = ..()
- if(HAS_TRAIT(user, TRAIT_ENTRAILS_READER) || (user.mind && HAS_TRAIT(user.mind, TRAIT_ENTRAILS_READER)) || isobserver(user))
+ if(HAS_MIND_TRAIT(user, TRAIT_ENTRAILS_READER)|| isobserver(user))
if(liked_foodtypes)
. += span_info("This tongue has an affinity for the taste of [english_list(bitfield_to_list(liked_foodtypes, FOOD_FLAGS_IC))].")
if(disliked_foodtypes)
@@ -393,7 +393,7 @@
/obj/item/organ/internal/tongue/abductor/examine(mob/examining_mob)
. = ..()
- if(HAS_TRAIT(examining_mob, TRAIT_ABDUCTOR_TRAINING) || (examining_mob.mind && HAS_TRAIT(examining_mob.mind, TRAIT_ABDUCTOR_TRAINING)) || isobserver(examining_mob))
+ if(HAS_MIND_TRAIT(examining_mob, TRAIT_ABDUCTOR_TRAINING) || isobserver(examining_mob))
. += span_notice("It can be attuned to a different channel by using it inhand.")
if(!mothership)
. += span_notice("It is not attuned to a specific mothership.")
diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm
index 1bf552ac37b..440d48d1c5e 100644
--- a/code/modules/surgery/plastic_surgery.dm
+++ b/code/modules/surgery/plastic_surgery.dm
@@ -66,7 +66,7 @@
if(ishuman(target))
var/mob/living/carbon/human/human_target = target
human_target.sec_hud_set_ID()
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID) && ishuman(user))
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user))
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_abominable_surgery_success", /datum/mood_event/morbid_abominable_surgery_success)
return ..()
diff --git a/code/modules/surgery/revival.dm b/code/modules/surgery/revival.dm
index 619181cfc5d..1f26a63cc6a 100644
--- a/code/modules/surgery/revival.dm
+++ b/code/modules/surgery/revival.dm
@@ -91,7 +91,7 @@
target.emote("gasp")
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 50, 199) //MAD SCIENCE
to_chat(target, "[CONFIG_GET(string/blackoutpolicy)]") //SKYRAT EDIT ADDITION - BLACKOUT POLICY
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID) && ishuman(user)) //Contrary to their typical hatred of resurrection, it wouldn't be very thematic if morbid people didn't love playing god
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID) && ishuman(user)) //Contrary to their typical hatred of resurrection, it wouldn't be very thematic if morbid people didn't love playing god
var/mob/living/carbon/human/morbid_weirdo = user
morbid_weirdo.add_mood_event("morbid_revival_success", /datum/mood_event/morbid_revival_success)
return TRUE
diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm
index 68086d3ab5f..7320e6ed947 100644
--- a/code/modules/surgery/surgery.dm
+++ b/code/modules/surgery/surgery.dm
@@ -74,7 +74,7 @@
return FALSE
// True surgeons (like abductor scientists) need no instructions
- if(HAS_TRAIT(user, TRAIT_SURGEON) || (!isnull(user.mind) && HAS_TRAIT(user.mind, TRAIT_SURGEON)))
+ if(HAS_MIND_TRAIT(user, TRAIT_SURGEON))
if(replaced_by) // only show top-level surgeries
return FALSE
else
diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm
index 74fdc1a545a..cc692c639ee 100644
--- a/code/modules/surgery/surgery_step.dm
+++ b/code/modules/surgery/surgery_step.dm
@@ -245,11 +245,11 @@
// Check if we are entitled to morbid bonuses
/datum/surgery_step/proc/check_morbid_curiosity(mob/user, obj/item/tool, datum/surgery/surgery)
- if(!(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID)))
+ if(!(surgery.surgery_flags & SURGERY_MORBID_CURIOSITY))
return FALSE
if(tool && !(tool.item_flags & CRUEL_IMPLEMENT))
return FALSE
- if(!(surgery.surgery_flags & SURGERY_MORBID_CURIOSITY))
+ if(!HAS_MIND_TRAIT(user, TRAIT_MORBID))
return FALSE
return TRUE
diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm
index 93c6803d55d..1c770141f6f 100644
--- a/code/modules/surgery/tools.dm
+++ b/code/modules/surgery/tools.dm
@@ -487,7 +487,7 @@
limb_snip_candidate.dismember()
user.visible_message(span_danger("[src] violently slams shut, amputating [patient]'s [candidate_name]."), span_notice("You amputate [patient]'s [candidate_name] with [src]."))
- if(user.mind && HAS_TRAIT(user.mind, TRAIT_MORBID)) //Freak
+ if(HAS_MIND_TRAIT(user, TRAIT_MORBID)) //Freak
user.add_mood_event("morbid_dismemberment", /datum/mood_event/morbid_dismemberment)
/obj/item/shears/suicide_act(mob/living/carbon/user)
diff --git a/modular_skyrat/modules/emotes/code/scream_emote.dm b/modular_skyrat/modules/emotes/code/scream_emote.dm
index 779c2e190d4..dd07e81cec8 100644
--- a/modular_skyrat/modules/emotes/code/scream_emote.dm
+++ b/modular_skyrat/modules/emotes/code/scream_emote.dm
@@ -6,7 +6,7 @@
/datum/emote/living/scream/run_emote(mob/living/user, params)
if(!(. = ..()))
return
- if(!user.is_muzzled() && !HAS_TRAIT(user, TRAIT_MIMING))
+ if(!user.is_muzzled() && !HAS_MIND_TRAIT(user, TRAIT_MIMING))
var/sound = get_sound(user, TRUE)
playsound(user.loc, sound, sound_volume, vary, 4, 1.2)