should be ready.
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
lose_text = "<span class='notice'>You feel smart again.</span>"
|
||||
|
||||
/datum/brain_trauma/mild/dumbness/on_gain()
|
||||
owner.add_trait(TRAIT_DUMB, TRAUMA_TRAIT)
|
||||
ADD_TRAIT(owner, TRAIT_DUMB, TRAUMA_TRAIT)
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "dumb", /datum/mood_event/oblivious)
|
||||
..()
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/mild/dumbness/on_lose()
|
||||
owner.remove_trait(TRAIT_DUMB, TRAUMA_TRAIT)
|
||||
REMOVE_TRAIT(owner, TRAIT_DUMB, TRAUMA_TRAIT)
|
||||
owner.derpspeech = 0
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "dumb")
|
||||
..()
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
lose_text = "<span class='notice'>You suddenly remember how to speak.</span>"
|
||||
|
||||
/datum/brain_trauma/severe/mute/on_gain()
|
||||
owner.add_trait(TRAIT_MUTE, TRAUMA_TRAIT)
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/mute/on_lose()
|
||||
owner.remove_trait(TRAIT_MUTE, TRAUMA_TRAIT)
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/aphasia
|
||||
@@ -121,7 +121,7 @@
|
||||
stress -= 4
|
||||
|
||||
/datum/brain_trauma/severe/monophobia/proc/check_alone()
|
||||
if(owner.has_trait(TRAIT_BLIND))
|
||||
if(HAS_TRAIT(owner, TRAIT_BLIND))
|
||||
return TRUE
|
||||
for(var/mob/M in oview(owner, 7))
|
||||
if(!isliving(M)) //ghosts ain't people
|
||||
@@ -183,11 +183,11 @@
|
||||
lose_text = "<span class='notice'>You feel in control of your hands again.</span>"
|
||||
|
||||
/datum/brain_trauma/severe/discoordination/on_gain()
|
||||
owner.add_trait(TRAIT_MONKEYLIKE, TRAUMA_TRAIT)
|
||||
ADD_TRAIT(owner, TRAIT_MONKEYLIKE, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/discoordination/on_lose()
|
||||
owner.remove_trait(TRAIT_MONKEYLIKE, TRAUMA_TRAIT)
|
||||
REMOVE_TRAIT(owner, TRAIT_MONKEYLIKE, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/pacifism
|
||||
@@ -198,9 +198,9 @@
|
||||
lose_text = "<span class='notice'>You no longer feel compelled to not harm.</span>"
|
||||
|
||||
/datum/brain_trauma/severe/pacifism/on_gain()
|
||||
owner.add_trait(TRAIT_PACIFISM, TRAUMA_TRAIT)
|
||||
ADD_TRAIT(owner, TRAIT_PACIFISM, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/severe/pacifism/on_lose()
|
||||
owner.remove_trait(TRAIT_PACIFISM, TRAUMA_TRAIT)
|
||||
REMOVE_TRAIT(owner, TRAIT_PACIFISM, TRAUMA_TRAIT)
|
||||
..()
|
||||
@@ -192,7 +192,7 @@
|
||||
return //no random switching
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
if(owner.has_trait(TRAIT_DEAF) || owner == speaker)
|
||||
if(HAS_TRAIT(owner, TRAIT_DEAF) || owner == speaker)
|
||||
return message
|
||||
if(findtext(message, codeword))
|
||||
message = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(H.has_trait(TRAIT_PIERCEIMMUNE))
|
||||
if(HAS_TRAIT(H, TRAIT_PIERCEIMMUNE))
|
||||
return
|
||||
|
||||
if((flags & CALTROP_IGNORE_WALKERS) && H.m_intent == MOVE_INTENT_WALK)
|
||||
@@ -46,7 +46,7 @@
|
||||
return
|
||||
|
||||
var/damage = rand(min_damage, max_damage)
|
||||
if(H.has_trait(TRAIT_LIGHT_STEP))
|
||||
if(HAS_TRAIT(H, TRAIT_LIGHT_STEP))
|
||||
damage *= 0.75
|
||||
H.apply_damage(damage, BRUTE, picked_def_zone)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if (!wearer)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
if(!wearer.has_trait(TRAIT_DEAF))
|
||||
if(!HAS_TRAIT(wearer, TRAIT_DEAF))
|
||||
var/obj/item/organ/ears/ears = wearer.getorganslot(ORGAN_SLOT_EARS)
|
||||
if (ears)
|
||||
ears.deaf = max(ears.deaf - 1, (ears.ear_damage < UNHEALING_EAR_DAMAGE ? 0 : 1)) // Do not clear deafness while above the unhealing ear damage threshold
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/datum/component/mood/Initialize()
|
||||
if(!isliving(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
|
||||
START_PROCESSING(SSmood, src)
|
||||
|
||||
RegisterSignal(parent, COMSIG_ADD_MOOD_EVENT, .proc/add_event)
|
||||
@@ -150,17 +150,17 @@
|
||||
else
|
||||
owner.crit_threshold -= (holdmyinsanityeffect - insanity_effect)
|
||||
|
||||
if(owner.has_trait(TRAIT_DEPRESSION))
|
||||
if(HAS_TRAIT(owner, TRAIT_DEPRESSION))
|
||||
if(prob(0.05))
|
||||
add_event(null, "depression", /datum/mood_event/depression)
|
||||
clear_event(null, "jolly")
|
||||
if(owner.has_trait(TRAIT_JOLLY))
|
||||
if(HAS_TRAIT(owner, TRAIT_JOLLY))
|
||||
if(prob(0.05))
|
||||
add_event(null, "jolly", /datum/mood_event/jolly)
|
||||
clear_event(null, "depression")
|
||||
|
||||
holdmyinsanityeffect = insanity_effect
|
||||
|
||||
|
||||
HandleNutrition(owner)
|
||||
|
||||
/datum/component/mood/proc/DecreaseSanity(amount, minimum = SANITY_INSANE)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
/mob/living/carbon/AirborneContractDisease(datum/disease/D, force_spread)
|
||||
if(internal)
|
||||
return
|
||||
if(has_trait(TRAIT_NOBREATH))
|
||||
if(HAS_TRAIT(src, TRAIT_NOBREATH))
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
|
||||
if(dna)
|
||||
if(has_trait(TRAIT_VIRUSIMMUNE) && !D.bypasses_immunity)
|
||||
if(HAS_TRAIT(src, TRAIT_VIRUSIMMUNE) && !D.bypasses_immunity)
|
||||
return FALSE
|
||||
|
||||
for(var/thing in D.required_organs)
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
|
||||
/datum/symptom/heal/coma/CanHeal(datum/disease/advance/A)
|
||||
var/mob/living/M = A.affected_mob
|
||||
if(M.has_trait(TRAIT_DEATHCOMA))
|
||||
if(HAS_TRAIT(M, TRAIT_DEATHCOMA))
|
||||
return power
|
||||
else if(M.IsUnconscious() || M.stat == UNCONSCIOUS)
|
||||
return power * 0.9
|
||||
|
||||
@@ -85,14 +85,14 @@
|
||||
if(4, 5)
|
||||
M.restoreEars()
|
||||
|
||||
if(M.has_trait(TRAIT_BLIND, EYE_DAMAGE))
|
||||
if(HAS_TRAIT_FROM(M, TRAIT_BLIND, EYE_DAMAGE))
|
||||
if(prob(20))
|
||||
to_chat(M, "<span class='notice'>Your vision slowly returns...</span>")
|
||||
M.cure_blind(EYE_DAMAGE)
|
||||
M.cure_nearsighted(EYE_DAMAGE)
|
||||
M.blur_eyes(35)
|
||||
|
||||
else if(M.has_trait(TRAIT_NEARSIGHT, EYE_DAMAGE))
|
||||
else if(HAS_TRAIT_FROM(M, TRAIT_NEARSIGHT, EYE_DAMAGE))
|
||||
to_chat(M, "<span class='notice'>You can finally focus your eyes on distant objects.</span>")
|
||||
M.cure_nearsighted(EYE_DAMAGE)
|
||||
M.blur_eyes(10)
|
||||
|
||||
@@ -61,7 +61,7 @@ Bonus
|
||||
M.become_nearsighted(EYE_DAMAGE)
|
||||
if(prob(eyes.eye_damage - 10 + 1))
|
||||
if(!remove_eyes)
|
||||
if(!M.has_trait(TRAIT_BLIND))
|
||||
if(!HAS_TRAIT(M, TRAIT_BLIND))
|
||||
to_chat(M, "<span class='userdanger'>You go blind!</span>")
|
||||
M.become_blind(EYE_DAMAGE)
|
||||
else
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
if(L.has_trait(TRAIT_EMOTEMUTE))
|
||||
if(HAS_TRAIT(L, TRAIT_EMOTEMUTE))
|
||||
return FALSE
|
||||
|
||||
/datum/emote/sound
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
|
||||
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if((user.has_trait(TRAIT_CLUMSY)) && prob(50))
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||
user.Knockdown(60)
|
||||
if(ishuman(user))
|
||||
|
||||
@@ -86,12 +86,12 @@
|
||||
/datum/mutation/human/clumsy/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.add_trait(TRAIT_CLUMSY, GENETIC_MUTATION)
|
||||
ADD_TRAIT(owner, TRAIT_CLUMSY, GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/clumsy/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.remove_trait(TRAIT_CLUMSY, GENETIC_MUTATION)
|
||||
REMOVE_TRAIT(owner, TRAIT_CLUMSY, GENETIC_MUTATION)
|
||||
|
||||
|
||||
//Tourettes causes you to randomly stand in place and shout.
|
||||
@@ -125,12 +125,12 @@
|
||||
/datum/mutation/human/deaf/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.add_trait(TRAIT_DEAF, GENETIC_MUTATION)
|
||||
ADD_TRAIT(owner, TRAIT_DEAF, GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/deaf/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.remove_trait(TRAIT_DEAF, GENETIC_MUTATION)
|
||||
REMOVE_TRAIT(owner, TRAIT_DEAF, GENETIC_MUTATION)
|
||||
|
||||
|
||||
//Monified turns you into a monkey.
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
/datum/mutation/human/cold_resistance/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.add_trait(TRAIT_RESISTCOLD, "cold_resistance")
|
||||
// owner.add_trait(TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE
|
||||
ADD_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
|
||||
// ADD_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE
|
||||
|
||||
/datum/mutation/human/cold_resistance/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.remove_trait(TRAIT_RESISTCOLD, "cold_resistance")
|
||||
// owner.remove_trait(TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE
|
||||
REMOVE_TRAIT(owner, TRAIT_RESISTCOLD, "cold_resistance")
|
||||
// REMOVE_TRAIT(owner, TRAIT_RESISTLOWPRESSURE, "cold_resistance") CITADEL CHANGE
|
||||
|
||||
/datum/mutation/human/cold_resistance/on_life(mob/living/carbon/human/owner)
|
||||
if(owner.getFireLoss())
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
/datum/mutation/human/hulk/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.add_trait(TRAIT_STUNIMMUNE, TRAIT_HULK)
|
||||
owner.add_trait(TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
ADD_TRAIT(owner, TRAIT_STUNIMMUNE, TRAIT_HULK)
|
||||
ADD_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
owner.update_body_parts()
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk)
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
/datum/mutation/human/hulk/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.remove_trait(TRAIT_STUNIMMUNE, TRAIT_HULK)
|
||||
owner.remove_trait(TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
REMOVE_TRAIT(owner, TRAIT_STUNIMMUNE, TRAIT_HULK)
|
||||
REMOVE_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
owner.update_body_parts()
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "hulk")
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
/datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.add_trait(TRAIT_MUTE, GENETIC_MUTATION)
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
owner.remove_trait(TRAIT_MUTE, GENETIC_MUTATION)
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION)
|
||||
|
||||
|
||||
/datum/mutation/human/smile
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
switch(M.lingcheck())
|
||||
if (LINGHIVE_LING)
|
||||
var/mob/living/L = M
|
||||
if (!L.has_trait(CHANGELING_HIVEMIND_MUTE))
|
||||
if (!HAS_TRAIT(L, CHANGELING_HIVEMIND_MUTE))
|
||||
to_chat(M, msg)
|
||||
if(LINGHIVE_LINK)
|
||||
to_chat(M, msg)
|
||||
@@ -35,7 +35,7 @@
|
||||
if(prob(40))
|
||||
to_chat(M, "<i><font color=#800080>We can faintly sense an outsider trying to communicate through the hivemind...</font></i>")
|
||||
if(LINGHIVE_LING)
|
||||
if (user.has_trait(CHANGELING_HIVEMIND_MUTE))
|
||||
if (HAS_TRAIT(user, CHANGELING_HIVEMIND_MUTE))
|
||||
to_chat(user, "<span class='warning'>The poison in the air hinders our ability to interact with the hivemind.</span>")
|
||||
return FALSE
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
@@ -52,7 +52,7 @@
|
||||
to_chat(M, msg)
|
||||
if(LINGHIVE_LING)
|
||||
var/mob/living/L = M
|
||||
if (!L.has_trait(CHANGELING_HIVEMIND_MUTE))
|
||||
if (!HAS_TRAIT(L, CHANGELING_HIVEMIND_MUTE))
|
||||
to_chat(M, msg)
|
||||
if(LINGHIVE_OUTSIDER)
|
||||
if(prob(40))
|
||||
|
||||
@@ -465,13 +465,13 @@
|
||||
|
||||
/datum/status_effect/hippocraticOath/on_apply()
|
||||
//Makes the user passive, it's in their oath not to harm!
|
||||
owner.add_trait(TRAIT_PACIFISM, "hippocraticOath")
|
||||
ADD_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath")
|
||||
var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
H.add_hud_to(owner)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/hippocraticOath/on_remove()
|
||||
owner.remove_trait(TRAIT_PACIFISM, "hippocraticOath")
|
||||
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath")
|
||||
var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
H.remove_hud_from(owner)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
to_chat(quirk_holder, gain_text)
|
||||
quirk_holder.roundstart_quirks += src
|
||||
if(mob_trait)
|
||||
quirk_holder.add_trait(mob_trait, ROUNDSTART_TRAIT)
|
||||
ADD_TRAIT(quirk_holder, mob_trait, ROUNDSTART_TRAIT)
|
||||
START_PROCESSING(SSquirks, src)
|
||||
add()
|
||||
if(spawn_effects)
|
||||
@@ -35,7 +35,7 @@
|
||||
to_chat(quirk_holder, lose_text)
|
||||
quirk_holder.roundstart_quirks -= src
|
||||
if(mob_trait)
|
||||
quirk_holder.remove_trait(mob_trait, ROUNDSTART_TRAIT, TRUE)
|
||||
REMOVE_TRAIT(quirk_holder, mob_trait, ROUNDSTART_TRAIT)
|
||||
SSquirks.quirk_objects -= src
|
||||
return ..()
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
quirk_holder.roundstart_quirks -= src
|
||||
to_mob.roundstart_quirks += src
|
||||
if(mob_trait)
|
||||
quirk_holder.remove_trait(mob_trait, ROUNDSTART_TRAIT)
|
||||
to_mob.add_trait(mob_trait, ROUNDSTART_TRAIT)
|
||||
REMOVE_TRAIT(quirk_holder, mob_trait, ROUNDSTART_TRAIT)
|
||||
ADD_TRAIT(to_mob, mob_trait, ROUNDSTART_TRAIT)
|
||||
quirk_holder = to_mob
|
||||
on_transfer()
|
||||
|
||||
@@ -111,7 +111,7 @@ Use this as a guideline
|
||||
|
||||
mob_trait = TRAIT_NEARSIGHT
|
||||
///This define is in __DEFINES/traits.dm and is the actual "trait" that the game tracks
|
||||
///You'll need to use "has_trait(X, sources)" checks around the code to check this; for instance, the Ageusia trait is checked in taste code
|
||||
///You'll need to use "HAS_TRAIT_FROM(src, X, sources)" checks around the code to check this; for instance, the Ageusia trait is checked in taste code
|
||||
///If you need help finding where to put it, the declaration finder on GitHub is the best way to locate it
|
||||
|
||||
gain_text = "<span class='danger'>Things far away from you start looking blurry.</span>"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
if(prob(40))
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.dna && !H.has_trait(TRAIT_RADIMMUNE))
|
||||
if(H.dna && !HAS_TRAIT(H, TRAIT_RADIMMUNE))
|
||||
if(prob(max(0,100-resist)))
|
||||
H.randmuti()
|
||||
if(prob(50))
|
||||
|
||||
Reference in New Issue
Block a user