should be ready.

This commit is contained in:
Ghommie
2019-06-06 19:24:20 +02:00
parent 44358e054a
commit d3d2b8d898
168 changed files with 444 additions and 444 deletions
+7 -7
View File
@@ -16,7 +16,7 @@
/mob/living/carbon/monkey/handle_blood()
if(bodytemperature >= TCRYO && !(has_trait(TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood.
if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood.
//Blood regeneration if there is some space
if(blood_volume < BLOOD_VOLUME_NORMAL)
blood_volume += 0.1 // regenerate blood VERY slowly
@@ -30,10 +30,10 @@
bleed_rate = 0
return
if(bodytemperature >= TCRYO && !(has_trait(TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood.
if(bodytemperature >= TCRYO && !(HAS_TRAIT(src, TRAIT_NOCLONE))) //cryosleep or husked people do not pump the blood.
//Blood regeneration if there is some space
if(blood_volume < BLOOD_VOLUME_NORMAL && !has_trait(TRAIT_NOHUNGER))
if(blood_volume < BLOOD_VOLUME_NORMAL && !HAS_TRAIT(src, TRAIT_NOHUNGER))
var/nutrition_ratio = 0
switch(nutrition)
if(0 to NUTRITION_LEVEL_STARVING)
@@ -69,7 +69,7 @@
Unconscious(rand(20,60))
to_chat(src, "<span class='warning'>You feel extremely [word].</span>")
if(-INFINITY to BLOOD_VOLUME_SURVIVE)
if(!has_trait(TRAIT_NODEATH))
if(!HAS_TRAIT(src, TRAIT_NODEATH))
death()
var/temp_bleed = 0
@@ -87,7 +87,7 @@
bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects (heparin) naturally decreases
if(bleed_rate && !bleedsuppress && !(has_trait(TRAIT_FAKEDEATH)))
if(bleed_rate && !bleedsuppress && !(HAS_TRAIT(src, TRAIT_FAKEDEATH)))
bleed(bleed_rate)
//Makes a blood drop, leaking amt units of blood from the mob
@@ -214,13 +214,13 @@
return "blood"
/mob/living/carbon/monkey/get_blood_id()
if(!(has_trait(TRAIT_NOCLONE)))
if(!(HAS_TRAIT(src, TRAIT_NOCLONE)))
return "blood"
/mob/living/carbon/human/get_blood_id()
if(dna.species.exotic_blood)
return dna.species.exotic_blood
else if((NOBLOOD in dna.species.species_traits) || (has_trait(TRAIT_NOCLONE)))
else if((NOBLOOD in dna.species.species_traits) || (HAS_TRAIT(src, TRAIT_NOCLONE)))
return
return "blood"
@@ -42,13 +42,13 @@
INVOKE_ASYNC(is_devil(src), /datum/antagonist/devil.proc/beginResurrectionCheck, src)
/mob/living/carbon/human/proc/makeSkeleton()
add_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
ADD_TRAIT(src, TRAIT_DISFIGURED, TRAIT_GENERIC)
set_species(/datum/species/skeleton)
return 1
/mob/living/carbon/proc/Drain()
become_husk(CHANGELING_DRAIN)
add_trait(TRAIT_NOCLONE, CHANGELING_DRAIN)
ADD_TRAIT(src, TRAIT_NOCLONE, CHANGELING_DRAIN)
blood_volume = 0
return 1
@@ -93,7 +93,7 @@
if(!(SLOT_GLASSES in obscured))
if(glasses)
msg += "[t_He] [t_has] [glasses.get_examine_string(user)] covering [t_his] eyes.\n"
else if(eye_color == BLOODCULT_EYE && iscultist(src) && HAS_TRAIT(src, CULT_EYES))
else if(eye_color == BLOODCULT_EYE && iscultist(src) && HAS_TRAIT(src, TRAIT_CULT_EYES))
msg += "<span class='warning'><B>[t_His] eyes are glowing an unnatural red!</B></span>\n"
//ears
@@ -614,7 +614,7 @@
facial_hair_style = "Shaved"
hair_style = "Bald"
update_hair()
add_trait(TRAIT_DISFIGURED, TRAIT_GENERIC)
ADD_TRAIT(src, TRAIT_DISFIGURED, TRAIT_GENERIC)
update_damage_overlays()
+2 -2
View File
@@ -63,7 +63,7 @@
/mob/living/carbon/human/handle_traits()
if(eye_blind) //blindness, heals slowly over time
if(HAS_TRAIT(src, TRAIT_BLIND, EYES_COVERED)) //covering your eyes heals blurry eyes faster
if(HAS_TRAIT_FROM(src, TRAIT_BLIND, EYES_COVERED)) //covering your eyes heals blurry eyes faster
adjust_blindness(-3)
else
adjust_blindness(-1)
@@ -332,7 +332,7 @@
HM.on_life(src)
/mob/living/carbon/human/proc/handle_heart()
var/we_breath = !HAS_TRAIT(src, TRAIT_NOBREATH, SPECIES_TRAIT)
var/we_breath = !HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT)
if(!undergoing_cardiac_arrest())
return
+1 -1
View File
@@ -54,7 +54,7 @@
/mob/living/carbon/human/IsVocal()
// how do species that don't breathe talk? magic, that's what.
if(!HAS_TRAIT(src, TRAIT_NOBREATH, SPECIES_TRAIT) && !getorganslot(ORGAN_SLOT_LUNGS))
if(!HAS_TRAIT_FROM(src, TRAIT_NOBREATH, SPECIES_TRAIT) && !getorganslot(ORGAN_SLOT_LUNGS))
return FALSE
if(mind)
return !mind.miming
+17 -17
View File
@@ -286,7 +286,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
C.put_in_hands(new mutanthands())
for(var/X in inherent_traits)
C.add_trait(X, SPECIES_TRAIT)
ADD_TRAIT(C, X, SPECIES_TRAIT)
if(TRAIT_VIRUSIMMUNE in inherent_traits)
for(var/datum/disease/A in C.diseases)
@@ -313,7 +313,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(TRUE)
for(var/X in inherent_traits)
C.remove_trait(X, SPECIES_TRAIT)
REMOVE_TRAIT(C, X, SPECIES_TRAIT)
SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
@@ -1161,13 +1161,13 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(HAS_TRAIT(H, TRAIT_FAT))//I share your pain, past coder.
if(H.overeatduration < 100)
to_chat(H, "<span class='notice'>You feel fit again!</span>")
H.remove_trait(TRAIT_FAT, OBESITY)
REMOVE_TRAIT(H, TRAIT_FAT, OBESITY)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
else
if(H.overeatduration >= 100)
to_chat(H, "<span class='danger'>You suddenly feel blubbery!</span>")
H.add_trait(TRAIT_FAT, OBESITY)
ADD_TRAIT(H, TRAIT_FAT, OBESITY)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
@@ -1480,7 +1480,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
"<span class='notice'>You slap [user == target ? "yourself" : "\the [target]"] in the face! </span>",\
"You hear a slap."
)
if (!target.HAS_TRAIT(TRAIT_NYMPHO))
if (!HAS_TRAIT(target, TRAIT_NYMPHO))
stop_wagging_tail(target)
user.do_attack_animation(target, ATTACK_EFFECT_FACE_SLAP)
user.adjustStaminaLossBuffered(3)
@@ -1488,7 +1488,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else if(aim_for_groin && (target == user || target.lying || same_dir) && (target_on_help || target_restrained || target_aiming_for_groin))
user.do_attack_animation(target, ATTACK_EFFECT_ASS_SLAP)
user.adjustStaminaLossBuffered(3)
if(target.has_trait(TRAIT_ASSBLASTUSA))
if(HAS_TRAIT(target, TRAIT_ASSBLASTUSA))
var/hit_zone = (user.held_index_to_dir(user.active_hand_index) == "l" ? "l_":"r_") + "arm"
user.adjustStaminaLoss(50, affected_zone = hit_zone)
var/obj/item/bodypart/affecting = user.get_bodypart(hit_zone)
@@ -1512,9 +1512,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
)
if (target.canbearoused)
target.adjustArousalLoss(5)
if (target.getArousalLoss() >= 100 && ishuman(target) && target.has_trait(TRAIT_MASO) && target.has_dna())
if (target.getArousalLoss() >= 100 && ishuman(target) && HAS_TRAIT(target, TRAIT_MASO) && target.has_dna())
target.mob_climax(forced_climax=TRUE)
if (!target.has_trait(TRAIT_NYMPHO))
if (!HAS_TRAIT(target, TRAIT_NYMPHO))
stop_wagging_tail(target)
return FALSE
@@ -1649,7 +1649,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
//dismemberment
var/probability = I.get_dismemberment_chance(affecting)
if(prob(probability) || (H.has_trait(TRAIT_EASYDISMEMBER) && prob(probability))) //try twice
if(prob(probability) || (HAS_TRAIT(H, TRAIT_EASYDISMEMBER) && prob(probability))) //try twice
if(affecting.dismember(I.damtype))
I.add_mob_blood(H)
playsound(get_turf(H), I.get_dismember_sound(), 80, 1)
@@ -1747,7 +1747,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(BP)
if(damage > 0 ? BP.receive_damage(damage * hit_percent * brutemod * H.physiology.brute_mod, 0) : BP.heal_damage(abs(damage * hit_percent * brutemod * H.physiology.brute_mod), 0))
H.update_damage_overlays()
if(H.has_trait(TRAIT_MASO))
if(HAS_TRAIT(H, TRAIT_MASO))
H.adjustArousalLoss(damage * brutemod * H.physiology.brute_mod)
if (H.getArousalLoss() >= 100 && ishuman(H) && H.has_dna())
H.mob_climax(forced_climax=TRUE)
@@ -1796,7 +1796,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/////////////
/datum/species/proc/breathe(mob/living/carbon/human/H)
if(H.has_trait(TRAIT_NOBREATH))
if(HAS_TRAIT(H, TRAIT_NOBREATH))
return TRUE
@@ -1844,7 +1844,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.throw_alert("temp", /obj/screen/alert/hot, 3)
// +/- 50 degrees from 310K is the 'safe' zone, where no damage is dealt.
if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !H.has_trait(TRAIT_RESISTHEAT))
if(H.bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTHEAT))
//Body temperature is too hot.
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "cold")
@@ -1862,7 +1862,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.emote("scream")
H.apply_damage(burn_damage, BURN)
else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !H.has_trait(TRAIT_RESISTCOLD))
else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !HAS_TRAIT(H, TRAIT_RESISTCOLD))
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "hot")
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "cold", /datum/mood_event/cold)
switch(H.bodytemperature)
@@ -1881,7 +1881,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/adjusted_pressure = H.calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
switch(adjusted_pressure)
if(HAZARD_HIGH_PRESSURE to INFINITY)
if(!H.has_trait(TRAIT_RESISTHIGHPRESSURE))
if(!HAS_TRAIT(H, TRAIT_RESISTHIGHPRESSURE))
H.adjustBruteLoss(min(((adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 ) * PRESSURE_DAMAGE_COEFFICIENT, MAX_HIGH_PRESSURE_DAMAGE) * H.physiology.pressure_mod)
H.throw_alert("pressure", /obj/screen/alert/highpressure, 2)
else
@@ -1893,7 +1893,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(HAZARD_LOW_PRESSURE to WARNING_LOW_PRESSURE)
H.throw_alert("pressure", /obj/screen/alert/lowpressure, 1)
else
if(H.has_trait(TRAIT_RESISTLOWPRESSURE))
if(HAS_TRAIT(H, TRAIT_RESISTLOWPRESSURE))
H.clear_alert("pressure")
else
H.adjustBruteLoss(LOW_PRESSURE_DAMAGE * H.physiology.pressure_mod)
@@ -1904,7 +1904,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
//////////
/datum/species/proc/handle_fire(mob/living/carbon/human/H, no_protection = FALSE)
if(H.has_trait(TRAIT_NOFIRE))
if(HAS_TRAIT(H, TRAIT_NOFIRE))
return
if(H.on_fire)
//the fire tries to damage the exposed clothes and items
@@ -1972,7 +1972,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "on_fire", /datum/mood_event/on_fire)
/datum/species/proc/CanIgniteMob(mob/living/carbon/human/H)
if(H.has_trait(TRAIT_NOFIRE))
if(HAS_TRAIT(H, TRAIT_NOFIRE))
return FALSE
return TRUE
@@ -23,7 +23,7 @@
if(ishuman(H) && !fly)
fly = new
fly.Grant(H)
H.add_trait(TRAIT_HOLY, SPECIES_TRAIT)
ADD_TRAIT(H, TRAIT_HOLY, SPECIES_TRAIT)
/datum/species/angel/on_species_loss(mob/living/carbon/human/H)
if(fly)
@@ -36,7 +36,7 @@
H.dna.species.mutant_bodyparts -= "wings"
H.dna.features["wings"] = "None"
H.update_body()
H.remove_trait(TRAIT_HOLY, SPECIES_TRAIT)
REMOVE_TRAIT(H, TRAIT_HOLY, SPECIES_TRAIT)
..()
/datum/species/angel/spec_life(mob/living/carbon/human/H)
@@ -74,10 +74,10 @@
/datum/species/golem/adamantine/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
C.add_trait(TRAIT_ANTIMAGIC, SPECIES_TRAIT)
ADD_TRAIT(C, TRAIT_ANTIMAGIC, SPECIES_TRAIT)
/datum/species/golem/adamantine/on_species_loss(mob/living/carbon/C)
C.remove_trait(TRAIT_ANTIMAGIC, SPECIES_TRAIT)
REMOVE_TRAIT(C, TRAIT_ANTIMAGIC, SPECIES_TRAIT)
..()
//The suicide bombers of golemkind
@@ -175,10 +175,10 @@
/datum/species/golem/silver/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
C.add_trait(TRAIT_HOLY, SPECIES_TRAIT)
ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
/datum/species/golem/silver/on_species_loss(mob/living/carbon/C)
C.remove_trait(TRAIT_HOLY, SPECIES_TRAIT)
REMOVE_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
..()
//Harder to stun, deals more damage, but it's even slower
@@ -698,10 +698,10 @@
/datum/species/golem/cloth/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
C.add_trait(TRAIT_HOLY, SPECIES_TRAIT)
ADD_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
/datum/species/golem/cloth/on_species_loss(mob/living/carbon/C)
C.remove_trait(TRAIT_HOLY, SPECIES_TRAIT)
REMOVE_TRAIT(C, TRAIT_HOLY, SPECIES_TRAIT)
..()
/datum/species/golem/cloth/check_roundstart_eligible()
@@ -768,7 +768,7 @@
/obj/structure/cloth_pile/proc/revive()
if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime
return
if(cloth_golem.suiciding || cloth_golem.has_trait(TRAIT_NOCLONE))
if(cloth_golem.suiciding || HAS_TRAIT(cloth_golem, TRAIT_NOCLONE))
QDEL_NULL(cloth_golem)
return
@@ -594,7 +594,7 @@
/datum/species/jelly/stargazer/proc/link_mob(mob/living/M)
if(QDELETED(M) || M.stat == DEAD)
return FALSE
if(M.has_trait(TRAIT_MINDSHIELD)) //mindshield implant, no dice
if(HAS_TRAIT(M, TRAIT_MINDSHIELD)) //mindshield implant, no dice
return FALSE
if(M in linked_mobs)
return FALSE
@@ -9,12 +9,12 @@
/mob/living/carbon/human/Unconscious(amount, updating = 1, ignore_canunconscious = 0)
amount = dna.species.spec_stun(src,amount)
if(has_trait(TRAIT_HEAVY_SLEEPER))
if(HAS_TRAIT(src, TRAIT_HEAVY_SLEEPER))
amount *= rand(1.25, 1.3)
return ..()
/mob/living/carbon/human/Sleeping(amount, updating = 1, ignore_sleepimmune = 0)
if(has_trait(TRAIT_HEAVY_SLEEPER))
if(HAS_TRAIT(src, TRAIT_HEAVY_SLEEPER))
amount *= rand(1.25, 1.3)
return ..()
@@ -663,7 +663,7 @@ generate/load female uniform sprites matching all previously decided variables
else
. += "-no_marking"
if(has_trait(TRAIT_HUSK))
if(HAS_TRAIT(src, TRAIT_HUSK))
. += "-husk"
/mob/living/carbon/human/load_limb_from_cache()
@@ -705,7 +705,7 @@ generate/load female uniform sprites matching all previously decided variables
add_overlay(HD.get_limb_icon())
update_damage_overlays()
if(HD && !(has_trait(TRAIT_HUSK)))
if(HD && !(HAS_TRAIT(src, TRAIT_HUSK)))
// lipstick
if(lip_style && (LIPS in dna.species.species_traits))
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[lip_style]", -BODY_LAYER)
@@ -119,7 +119,7 @@
cuff_resist(I)
/mob/living/carbon/monkey/proc/should_target(var/mob/living/L)
if(has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(src, TRAIT_PACIFISM))
return FALSE
if(enemies[L])
@@ -143,7 +143,7 @@
pickupTimer = 0
else
INVOKE_ASYNC(src, .proc/walk2derpless, pickupTarget.loc)
if(Adjacent(pickupTarget) || Adjacent(pickupTarget.loc)) // next to target
if(Adjacent(pickupTarget) || Adjacent(pickupTarget.loc)) // next to target
drop_all_held_items() // who cares about these items, i want that one!
if(isturf(pickupTarget.loc)) // on floor
equip_item(pickupTarget)
@@ -167,7 +167,7 @@
battle_screech()
retaliate(L)
return TRUE
else
else
bodyDisposal = locate(/obj/machinery/disposal/) in around
if(bodyDisposal)
target = L
@@ -81,7 +81,7 @@
adjust_bodytemperature(min((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR, BODYTEMP_HEATING_MAX))
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !has_trait(TRAIT_RESISTHEAT))
if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT && !HAS_TRAIT(src, TRAIT_RESISTHEAT))
switch(bodytemperature)
if(360 to 400)
throw_alert("temp", /obj/screen/alert/hot, 1)
@@ -96,7 +96,7 @@
else
apply_damage(HEAT_DAMAGE_LEVEL_2, BURN)
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !has_trait(TRAIT_RESISTCOLD))
else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !HAS_TRAIT(src, TRAIT_RESISTCOLD))
if(!istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
switch(bodytemperature)
if(200 to 260)
@@ -147,7 +147,7 @@
threatcount += 4 //trigger look_for_perp() since they're nonhuman and very likely hostile
//mindshield implants imply trustworthyness
if(has_trait(TRAIT_MINDSHIELD))
if(HAS_TRAIT(src, TRAIT_MINDSHIELD))
threatcount -= 1
return threatcount
@@ -19,7 +19,7 @@
if(!HD) //Decapitated
return
if(has_trait(TRAIT_HUSK))
if(HAS_TRAIT(src, TRAIT_HUSK))
return
var/hair_hidden = 0
+2 -2
View File
@@ -101,14 +101,14 @@
if(EFFECT_SLUR)
slurring = max(slurring,(effect * hit_percent))
if(EFFECT_STUTTER)
if((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) // stun is usually associated with stutter
if((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) // stun is usually associated with stutter
stuttering = max(stuttering,(effect * hit_percent))
if(EFFECT_EYE_BLUR)
blur_eyes(effect * hit_percent)
if(EFFECT_DROWSY)
drowsyness = max(drowsyness,(effect * hit_percent))
if(EFFECT_JITTER)
if((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE))
if((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE))
jitteriness = max(jitteriness,(effect * hit_percent))
return 1
+1 -1
View File
@@ -126,7 +126,7 @@
/mob/living/proc/handle_traits()
//Eyes
if(eye_blind) //blindness, heals slowly over time
if(!stat && !(has_trait(TRAIT_BLIND)))
if(!stat && !(HAS_TRAIT(src, TRAIT_BLIND)))
eye_blind = max(eye_blind-1,0)
if(client && !eye_blind)
clear_alert("blind")
+5 -5
View File
@@ -170,7 +170,7 @@
return 1
if(isliving(M))
var/mob/living/L = M
if(L.has_trait(TRAIT_PUSHIMMUNE))
if(HAS_TRAIT(L, TRAIT_PUSHIMMUNE))
return 1
//If they're a human, and they're not in help intent, block pushing
if(ishuman(M) && (M.a_intent != INTENT_HELP))
@@ -306,7 +306,7 @@
/mob/living/pointed(atom/A as mob|obj|turf in view())
if(incapacitated())
return FALSE
if(has_trait(TRAIT_DEATHCOMA))
if(HAS_TRAIT(src, TRAIT_DEATHCOMA))
return FALSE
if(!..())
return FALSE
@@ -889,7 +889,7 @@
/mob/living/rad_act(amount)
. = ..()
if(!amount || (amount < RAD_MOB_SKIN_PROTECTION) || has_trait(TRAIT_RADIMMUNE))
if(!amount || (amount < RAD_MOB_SKIN_PROTECTION) || HAS_TRAIT(src, TRAIT_RADIMMUNE))
return
amount -= RAD_BACKGROUND_RADIATION // This will always be at least 1 because of how skin protection is calculated
@@ -905,7 +905,7 @@
. = ..()
if(.)
return
if((magic && has_trait(TRAIT_ANTIMAGIC)) || (holy && has_trait(TRAIT_HOLY)))
if((magic && HAS_TRAIT(src, TRAIT_ANTIMAGIC)) || (holy && HAS_TRAIT(src, TRAIT_HOLY)))
return src
/mob/living/proc/fakefireextinguish()
@@ -988,7 +988,7 @@
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
//Robots, animals and brains have their own version so don't worry about them
/mob/living/proc/update_canmove()
var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_DEATHCOMA))
var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (HAS_TRAIT(src, TRAIT_DEATHCOMA))
var/move_and_fall = stat == SOFT_CRIT && !pulledby
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
var/buckle_lying = !(buckled && !buckled.buckle_lying)
+9 -9
View File
@@ -137,11 +137,11 @@
user.start_pulling(src, supress_message)
return
if(!(status_flags & CANPUSH) || has_trait(TRAIT_PUSHIMMUNE))
if(!(status_flags & CANPUSH) || HAS_TRAIT(src, TRAIT_PUSHIMMUNE))
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
return FALSE
if(user.has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='notice'>You don't want to risk hurting [src]!</span>")
return FALSE
@@ -204,7 +204,7 @@
M.Feedstop()
return // can't attack while eating!
if(has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(src, TRAIT_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
@@ -221,7 +221,7 @@
M.visible_message("<span class='notice'>\The [M] [M.friendly] [src]!</span>")
return FALSE
else
if(M.has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(M, TRAIT_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
@@ -240,7 +240,7 @@
return FALSE
if (M.a_intent == INTENT_HARM)
if(M.has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(M, TRAIT_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
@@ -266,7 +266,7 @@
return FALSE
else
if(L.has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(L, TRAIT_PACIFISM))
to_chat(L, "<span class='notice'>You don't want to hurt anyone!</span>")
return
@@ -291,7 +291,7 @@
grabbedby(M)
return FALSE
if("harm")
if(M.has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(M, TRAIT_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
M.do_attack_animation(src)
@@ -315,7 +315,7 @@
SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage)
if(tesla_shock && (flags_1 & TESLA_IGNORE_1))
return FALSE
if(has_trait(TRAIT_SHOCKIMMUNE))
if(HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
return FALSE
if(shock_damage > 0)
if(!illusion)
@@ -385,7 +385,7 @@
//called when the mob receives a bright flash
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
if(get_eye_protection() < intensity && (override_blindness_check || !(has_trait(TRAIT_BLIND))))
if(get_eye_protection() < intensity && (override_blindness_check || !(HAS_TRAIT(src, TRAIT_BLIND))))
overlay_fullscreen("flash", type)
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
return TRUE
+1 -1
View File
@@ -301,7 +301,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
return 1
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
if(has_trait(TRAIT_MUTE))
if(HAS_TRAIT(src, TRAIT_MUTE))
return 0
if(is_muzzled())
@@ -15,7 +15,7 @@
grabbedby(M)
if("harm", "disarm")
if(M.has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(M, TRAIT_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt [src]!</span>")
return
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
@@ -29,7 +29,7 @@
/mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == INTENT_HARM)
if(user.has_trait(TRAIT_PACIFISM))
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='notice'>You don't want to hurt [src]!</span>")
return FALSE
..(user, 1)
@@ -343,7 +343,7 @@
/mob/living/simple_animal/bot/medbot/proc/assess_patient(mob/living/carbon/C)
//Time to see if they need medical help!
if(C.stat == DEAD || (C.has_trait(TRAIT_FAKEDEATH)))
if(C.stat == DEAD || (HAS_TRAIT(C, TRAIT_FAKEDEATH)))
return FALSE //welp too late for them!
if(!(loc == C.loc) && !(isturf(C.loc) && isturf(loc)))
@@ -421,7 +421,7 @@
soft_reset()
return
if(C.stat == DEAD || (C.has_trait(TRAIT_FAKEDEATH)))
if(C.stat == DEAD || (HAS_TRAIT(C, TRAIT_FAKEDEATH)))
var/list/messagevoice = list("No! Stay with me!" = 'sound/voice/medbot/no.ogg',"Live, damnit! LIVE!" = 'sound/voice/medbot/live.ogg',"I...I've never lost a patient before. Not today, I mean." = 'sound/voice/medbot/lost.ogg')
var/message = pick(messagevoice)
speak(message)
@@ -343,7 +343,7 @@
/mob/living/simple_animal/hostile/construct/harvester/AttackingTarget()
if(iscarbon(target))
var/mob/living/carbon/C = target
if(C.has_trait(TRAIT_NODISMEMBER))
if(HAS_TRAIT(C, TRAIT_NODISMEMBER))
return ..() //ATTACK!
var/list/parts = list()
var/undismembermerable_limbs = 0
@@ -43,7 +43,7 @@
// Changeling egg can survive in aliens!
var/mob/living/carbon/C = target
if(C.stat == DEAD)
if(C.has_trait(TRAIT_XENO_HOST))
if(HAS_TRAIT(C, TRAIT_XENO_HOST))
to_chat(src, "<span class='userdanger'>A foreign presence repels us from this body. Perhaps we should try to infest another?</span>")
return
Infect(target)
@@ -558,7 +558,7 @@ Difficulty: Very Hard
H.regenerate_limbs()
H.regenerate_organs()
H.revive(1,0)
H.add_trait(TRAIT_NOCLONE, MAGIC_TRAIT) //Free revives, but significantly limits your options for reviving except via the crystal
ADD_TRAIT(H, TRAIT_NOCLONE, MAGIC_TRAIT) //Free revives, but significantly limits your options for reviving except via the crystal
H.grab_ghost(force = TRUE)
/obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans
@@ -721,7 +721,7 @@ Difficulty: Very Hard
if(isliving(A) && holder_animal)
var/mob/living/L = A
L.notransform = 1
L.add_trait(TRAIT_MUTE, STASIS_MUTE)
ADD_TRAIT(L, TRAIT_MUTE, STASIS_MUTE)
L.status_flags |= GODMODE
L.mind.transfer_to(holder_animal)
var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession
@@ -731,7 +731,7 @@ Difficulty: Very Hard
/obj/structure/closet/stasis/dump_contents(var/kill = 1)
STOP_PROCESSING(SSobj, src)
for(var/mob/living/L in src)
L.remove_trait(TRAIT_MUTE, STASIS_MUTE)
REMOVE_TRAIT(L, TRAIT_MUTE, STASIS_MUTE)
L.status_flags &= ~GODMODE
L.notransform = 0
if(holder_animal)
+27 -27
View File
@@ -15,7 +15,7 @@
return 0
/mob/living/proc/Stun(amount, updating = TRUE, ignore_canstun = FALSE) //Can't go below remaining duration
if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStun()
@@ -26,7 +26,7 @@
return S
/mob/living/proc/SetStun(amount, updating = TRUE, ignore_canstun = FALSE) //Sets remaining duration
if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
var/datum/status_effect/incapacitating/stun/S = IsStun()
if(amount <= 0)
if(S)
@@ -41,7 +41,7 @@
return S
/mob/living/proc/AdjustStun(amount, updating = TRUE, ignore_canstun = FALSE) //Adds to remaining duration
if(((status_flags & CANSTUN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canstun)
if(((status_flags & CANSTUN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canstun)
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStun()
@@ -63,7 +63,7 @@
return 0
/mob/living/proc/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Can't go below remaining duration
if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown)
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canknockdown)
if(absorb_stun(amount, ignore_canknockdown))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
@@ -74,7 +74,7 @@
return K
/mob/living/proc/SetKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Sets remaining duration
if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown)
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canknockdown)
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(amount <= 0)
if(K)
@@ -89,7 +89,7 @@
return K
/mob/living/proc/AdjustKnockdown(amount, updating = TRUE, ignore_canknockdown = FALSE) //Adds to remaining duration
if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown)
if(((status_flags & CANKNOCKDOWN) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canknockdown)
if(absorb_stun(amount, ignore_canknockdown))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
@@ -141,7 +141,7 @@
/////////////////////////////////// DISABILITIES ////////////////////////////////////
/mob/living/proc/add_quirk(quirk, spawn_effects) //separate proc due to the way these ones are handled
if(has_trait(quirk))
if(HAS_TRAIT(src, quirk))
return
if(!SSquirks || !SSquirks.quirks[quirk])
return
@@ -161,42 +161,42 @@
/////////////////////////////////// TRAIT PROCS ////////////////////////////////////
/mob/living/proc/cure_blind(list/sources)
remove_trait(TRAIT_BLIND, sources)
if(!has_trait(TRAIT_BLIND))
REMOVE_TRAIT(src, TRAIT_BLIND, sources)
if(!HAS_TRAIT(src, TRAIT_BLIND))
adjust_blindness(-1)
/mob/living/proc/become_blind(source)
if(!has_trait(TRAIT_BLIND))
if(!HAS_TRAIT(src, TRAIT_BLIND))
blind_eyes(1)
add_trait(TRAIT_BLIND, source)
ADD_TRAIT(src, TRAIT_BLIND, source)
/mob/living/proc/cure_nearsighted(list/sources)
remove_trait(TRAIT_NEARSIGHT, sources)
if(!has_trait(TRAIT_NEARSIGHT))
REMOVE_TRAIT(src, TRAIT_NEARSIGHT, sources)
if(!HAS_TRAIT(src, TRAIT_NEARSIGHT))
clear_fullscreen("nearsighted")
/mob/living/proc/become_nearsighted(source)
if(!has_trait(TRAIT_NEARSIGHT))
if(!HAS_TRAIT(src, TRAIT_NEARSIGHT))
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
add_trait(TRAIT_NEARSIGHT, source)
ADD_TRAIT(src, TRAIT_NEARSIGHT, source)
/mob/living/proc/cure_husk(list/sources)
remove_trait(TRAIT_HUSK, sources)
if(!has_trait(TRAIT_HUSK))
remove_trait(TRAIT_DISFIGURED, "husk")
REMOVE_TRAIT(src, TRAIT_HUSK, sources)
if(!HAS_TRAIT(src, TRAIT_HUSK))
REMOVE_TRAIT(src, TRAIT_DISFIGURED, "husk")
update_body()
return TRUE
/mob/living/proc/become_husk(source)
if(!has_trait(TRAIT_HUSK))
add_trait(TRAIT_DISFIGURED, "husk")
if(!HAS_TRAIT(src, TRAIT_HUSK))
ADD_TRAIT(src, TRAIT_DISFIGURED, "husk")
update_body()
. = TRUE
add_trait(TRAIT_HUSK, source)
ADD_TRAIT(src, TRAIT_HUSK, source)
/mob/living/proc/cure_fakedeath(list/sources)
remove_trait(TRAIT_FAKEDEATH, sources)
remove_trait(TRAIT_DEATHCOMA, sources)
REMOVE_TRAIT(src, TRAIT_FAKEDEATH, sources)
REMOVE_TRAIT(src, TRAIT_DEATHCOMA, sources)
if(stat != DEAD)
tod = null
update_stat()
@@ -206,15 +206,15 @@
return
if(!silent)
emote("deathgasp")
add_trait(TRAIT_FAKEDEATH, source)
add_trait(TRAIT_DEATHCOMA, source)
ADD_TRAIT(src, TRAIT_FAKEDEATH, source)
ADD_TRAIT(src, TRAIT_DEATHCOMA, source)
tod = STATION_TIME_TIMESTAMP("hh:mm:ss")
update_stat()
/mob/living/proc/unignore_slowdown(list/sources)
remove_trait(TRAIT_IGNORESLOWDOWN, sources)
REMOVE_TRAIT(src, TRAIT_IGNORESLOWDOWN, sources)
update_movespeed(FALSE)
/mob/living/proc/ignore_slowdown(source)
add_trait(TRAIT_IGNORESLOWDOWN, source)
ADD_TRAIT(src, TRAIT_IGNORESLOWDOWN, source)
update_movespeed(FALSE)
+8 -8
View File
@@ -28,7 +28,7 @@
return 0
/mob/living/proc/Unconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Can't go below remaining duration
if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious)
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canunconscious)
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
if(U)
U.duration = max(world.time + amount, U.duration)
@@ -37,7 +37,7 @@
return U
/mob/living/proc/SetUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Sets remaining duration
if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious)
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canunconscious)
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
if(amount <= 0)
if(U)
@@ -49,7 +49,7 @@
return U
/mob/living/proc/AdjustUnconscious(amount, updating = TRUE, ignore_canunconscious = FALSE) //Adds to remaining duration
if(((status_flags & CANUNCONSCIOUS) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canunconscious)
if(((status_flags & CANUNCONSCIOUS) && !HAS_TRAIT(src, TRAIT_STUNIMMUNE)) || ignore_canunconscious)
var/datum/status_effect/incapacitating/unconscious/U = IsUnconscious()
if(U)
U.duration += amount
@@ -72,7 +72,7 @@
return 0
/mob/living/proc/Sleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Can't go below remaining duration
if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
S.duration = max(world.time + amount, S.duration)
@@ -81,7 +81,7 @@
return S
/mob/living/proc/SetSleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Sets remaining duration
if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(amount <= 0)
if(S)
@@ -93,7 +93,7 @@
return S
/mob/living/proc/AdjustSleeping(amount, updating = TRUE, ignore_sleepimmune = FALSE) //Adds to remaining duration
if((!has_trait(TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
if((!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE)) || ignore_sleepimmune)
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
S.duration += amount
@@ -170,7 +170,7 @@
blind_minimum = 1
if(isliving(src))
var/mob/living/L = src
if(L.has_trait(TRAIT_BLIND))
if(HAS_TRAIT(L, TRAIT_BLIND))
blind_minimum = 1
eye_blind = max(eye_blind+amount, blind_minimum)
if(!eye_blind)
@@ -191,7 +191,7 @@
blind_minimum = 1
if(isliving(src))
var/mob/living/L = src
if(L.has_trait(TRAIT_BLIND))
if(HAS_TRAIT(L, TRAIT_BLIND))
blind_minimum = 1
eye_blind = blind_minimum
if(!eye_blind)