[Ready] Refactors stuns and status effects. (#17579)

* Fixes reviver runtime

* Confusion status effect

* Dizzy status effect

* Drowsiness status effect

* decaying -> transient

* Drunkenness status effect

* why use timer when SSfastprocessing work good

* stuns (mostly)

* weaken and immobalise

* stun/weaken times

* update_flags redundancies.

* Slowed()

* Silence + fixes transient decay

* Jittery

* sleeping

* Paralyze -> weaken

* Cult sluring

* paralyse

* Stammer

* slurring + projectile cleanups

* losebreath

* Hallucination

* forgor this

* eyeblurry

* eye blind

* Druggy

* affected didn't like my spacing

* review pass

* second review pass

* some cleanups

* documentation and signal framework

* confusion fix

* Fixes spec_stun

* rejuv fix

* removes a TODO

* conflicted myself

* fixes

* self review

* review

* removes TODOs

* adminfreeze

* TM fixes

* hallucination fix + others

* tones down alchol and runtime fixes

* confusion overlay suggestion

* more fixes

* runtime fix

* losebreath fix

* clamp => directional bounded sum

* steel review

* oops

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

* reduces the dizziness cycle rate

* borg hotfix

* sanctified decursening

Co-authored-by: mochi <1496804+dearmochi@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Charlie
2022-05-24 16:35:26 +01:00
committed by GitHub
co-authored by SteelSlayer mochi
parent b32fb92770
commit 0f7a8707ef
311 changed files with 2268 additions and 2155 deletions
+3 -3
View File
@@ -70,7 +70,7 @@
italics = TRUE
sound_vol *= 0.5
if(sleeping || stat == UNCONSCIOUS)
if(stat == UNCONSCIOUS)
hear_sleep(multilingual_to_message(message_pieces))
return 0
@@ -118,7 +118,7 @@
if(!client)
return
if(sleeping || stat == UNCONSCIOUS) //If unconscious or sleeping
if(stat == UNCONSCIOUS) //If unconscious or sleeping
hear_sleep(multilingual_to_message(message_pieces))
return
@@ -179,7 +179,7 @@
to_chat(src, heard)
/mob/proc/hear_holopad_talk(list/message_pieces, verb = "says", mob/speaker = null, obj/effect/overlay/holo_pad_hologram/H)
if(sleeping || stat == UNCONSCIOUS)
if(stat == UNCONSCIOUS)
hear_sleep(multilingual_to_message(message_pieces))
return
@@ -12,11 +12,11 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if(INTENT_HELP)
AdjustSleeping(-5)
AdjustSleeping(-10 SECONDS)
StopResting()
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
AdjustParalysis(-6 SECONDS)
AdjustStunned(-6 SECONDS)
AdjustWeakened(-6 SECONDS)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
if(INTENT_GRAB)
@@ -82,19 +82,19 @@
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.apply_effect(5, WEAKEN, H.run_armor_check(null, MELEE))
H.apply_effect(10 SECONDS, WEAKEN, H.run_armor_check(null, MELEE))
else
L.Weaken(5)
L.Weaken(10 SECONDS)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
else
Weaken(2, 1, 1)
Weaken(4 SECONDS, TRUE)
toggle_leap(0)
pounce_cooldown = world.time + pounce_cooldown_time
else if(A.density && !A.CanPass(src))
visible_message("<span class ='danger'>[src] smashes into [A]!</span>", "<span class ='alertalien'>[src] smashes into [A]!</span>")
Weaken(2, 1, 1)
Weaken(4 SECONDS, TRUE)
if(leaping)
leaping = 0
@@ -119,7 +119,7 @@
message = "<B>\The [src]</B> jumps!"
m_type = 1
if("collapse")
Paralyse(2)
Paralyse(4 SECONDS)
message = "<B>\The [src]</B> collapses!"
m_type = 2
if("flip")
@@ -60,7 +60,7 @@
if(3.0)
b_loss += 30
if(prob(50) && !shielded)
Paralyse(1)
Paralyse(2 SECONDS)
AdjustEarDamage(15, 60)
take_overall_damage(b_loss, f_loss)
@@ -7,7 +7,7 @@
adjustBruteLoss(15)
var/hitverb = "punched"
if(mob_size < MOB_SIZE_LARGE)
Paralyse(1)
Paralyse(2 SECONDS)
spawn(0)
step_away(src, user, 15)
sleep(1)
@@ -27,7 +27,7 @@
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
if((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien.
Paralyse(2)
Paralyse(4 SECONDS)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
@@ -40,7 +40,7 @@
if(INTENT_DISARM)
if(!lying)
if(prob(5))//Very small chance to push an alien down.
Paralyse(2)
Paralyse(4 SECONDS)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
add_attack_logs(M, src, "Pushed over")
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
@@ -11,7 +11,7 @@
act = lowertext(act)
switch(act)
if("me")
if(silent)
if(HAS_TRAIT(src, TRAIT_MUTE))
return
if(src.client)
if(check_mute(client.ckey, MUTE_IC))
@@ -106,7 +106,7 @@
message = "<B>[src]</B> hisses softly."
m_type = 1
if("collapse")
Paralyse(2)
Paralyse(4 SECONDS)
message = text("<B>[]</B> collapses!", src)
m_type = 2
if("help")
@@ -57,7 +57,7 @@
if(3.0)
b_loss += 30
if(prob(50))
Paralyse(1)
Paralyse(2 SECONDS)
AdjustEarDamage(15, 60)
adjustBruteLoss(b_loss)
@@ -7,7 +7,7 @@
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
"<span class='userdanger'>[M] has kicked [src]!</span>")
if((stat != DEAD) && (damage > 4.9))
Paralyse(rand(5,10))
Paralyse(rand(10 SECONDS, 20 SECONDS))
adjustBruteLoss(damage)
updatehealth()
@@ -25,7 +25,7 @@
..(user, TRUE)
adjustBruteLoss(5 + rand(1, 9))
spawn(0)
Paralyse(1)
Paralyse(2 SECONDS)
step_away(src, user, 15)
sleep(3)
step_away(src, user, 15)
@@ -16,7 +16,7 @@
death()
return
if(paralysis || sleeping || getOxyLoss() > 50 || (health <= HEALTH_THRESHOLD_CRIT && check_death_method()))
if(IsParalyzed() || IsSleeping() || getOxyLoss() > 50 || (health <= HEALTH_THRESHOLD_CRIT && check_death_method()))
if(stat == CONSCIOUS)
KnockOut()
create_debug_log("fell unconscious, trigger reason: [reason]")
@@ -16,7 +16,7 @@
icon_state = "larva[state]_cuff"
else if(stat == UNCONSCIOUS || lying || resting)
icon_state = "larva[state]_sleep"
else if(stunned)
else if(IsStunned())
icon_state = "larva[state]_stun"
else
icon_state = "larva[state]"
@@ -151,7 +151,7 @@
src.loc = target
target.equip_to_slot_if_possible(src, slot_wear_mask, FALSE, TRUE)
if(!sterile)
M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
M.Paralyse(MAX_IMPREGNATION_TIME * 10 / 6) //something like 25 ticks = 20 seconds with the default settings
GoIdle() //so it doesn't jump the people that tear it off
+21 -23
View File
@@ -99,13 +99,13 @@
to_chat(src, "<span class='warning'>The muzzle prevents you from vomiting!</span>")
return FALSE
if(stun)
Stun(4)
Stun(8 SECONDS)
if(nutrition < 100 && !blood)
if(message)
visible_message("<span class='warning'>[src] dry heaves!</span>", \
"<span class='userdanger'>You try to throw up, but there's nothing your stomach!</span>")
if(stun)
Weaken(10)
Weaken(20 SECONDS)
else
if(message)
visible_message("<span class='danger'>[src] throws up!</span>", \
@@ -168,19 +168,18 @@
//Stun
var/should_stun = (!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN)
if(should_stun)
Stun(2)
Stun(4 SECONDS)
//Jitter and other fluff.
AdjustJitter(1000)
do_jitter_animation(jitteriness)
AdjustStuttering(2)
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 20)
AdjustJitter(2000 SECONDS)
AdjustStuttering(4 SECONDS)
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 2 SECONDS)
return shock_damage
///Called slightly after electrocute act to reduce jittering and apply a secondary stun.
/mob/living/carbon/proc/secondary_shock(should_stun)
AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less
AdjustJitter(-2000 SECONDS, bound_lower = 20 SECONDS) //Still jittery, but vastly less
if(should_stun)
Weaken(3)
Weaken(6 SECONDS)
/mob/living/carbon/swap_hand()
var/obj/item/item_in_hand = src.get_active_hand()
@@ -231,12 +230,12 @@
var/mob/living/carbon/human/H = src
if(H.w_uniform)
H.w_uniform.add_fingerprint(M)
AdjustSleeping(-5)
if(sleeping == 0)
AdjustSleeping(-10 SECONDS)
if(!AmountSleeping())
StopResting()
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
AdjustParalysis(-6 SECONDS)
AdjustStunned(-6 SECONDS)
AdjustWeakened(-6 SECONDS)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(!player_logged)
M.visible_message( \
@@ -390,8 +389,8 @@
E.receive_damage(rand(12, 16) + extra_damage, 1)
if(E.damage > E.min_bruised_damage)
AdjustEyeBlind(damage)
AdjustEyeBlurry(damage * rand(3, 6))
AdjustEyeBlind(damage STATUS_EFFECT_CONSTANT)
AdjustEyeBlurry(damage * rand(6 SECONDS, 12 SECONDS))
if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2)
if(!E.is_robotic())
@@ -571,7 +570,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
if(isliving(hit_atom))
var/mob/living/L = hit_atom
L.adjustBruteLoss(60)
L.Weaken(3)
L.Weaken(6 SECONDS)
shake_camera(L, 4, 3)
hit_something = TRUE
if(isturf(hit_atom))
@@ -593,7 +592,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
hurt = FALSE*/
if(hit_atom.density && isturf(hit_atom))
if(hurt)
Weaken(1)
Weaken(2 SECONDS)
take_organ_damage(10)
if(iscarbon(hit_atom) && hit_atom != src)
var/mob/living/carbon/victim = hit_atom
@@ -602,8 +601,8 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
if(hurt)
victim.take_organ_damage(10)
take_organ_damage(10)
victim.Weaken(1)
Weaken(1)
victim.Weaken(2 SECONDS)
Weaken(2 SECONDS)
visible_message("<span class='danger'>[src] crashes into [victim], knocking them both over!</span>", "<span class='userdanger'>You violently crash into [victim]!</span>")
playsound(src, 'sound/weapons/punch1.ogg', 50, 1)
@@ -862,7 +861,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
/mob/living/carbon/resist_fire()
fire_stacks -= 5
Weaken(3, TRUE, 1) //We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy.
Weaken(3, TRUE) //We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy.
update_canmove()
spin(32, 2)
visible_message("<span class='danger'>[src] rolls on the floor, trying to put [p_them()]self out!</span>",
@@ -1040,7 +1039,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
W.plane = initial(W.plane)
/mob/living/carbon/proc/slip(description, stun, weaken, tilesSlipped, walkSafely, slipAny, slipVerb = "slip")
/mob/living/carbon/proc/slip(description, weaken, tilesSlipped, walkSafely, slipAny, slipVerb = "slip")
if(flying || buckled || (walkSafely && m_intent == MOVE_INTENT_WALK))
return FALSE
@@ -1063,7 +1062,6 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
playsound(loc, 'sound/misc/slip.ogg', 50, 1, -3)
// Something something don't run with scissors
moving_diagonally = 0 //If this was part of diagonal move slipping will stop it.
Stun(stun)
Weaken(weaken)
return TRUE
@@ -60,11 +60,10 @@
visible_message("<span class='danger'>[M] has shocked [src]!</span>", "<span class='userdanger'>[M] has shocked you!</span>")
do_sparks(5, TRUE, src)
var/power = M.powerlevel + rand(0,3)
var/power = (M.powerlevel + rand(0,3)) STATUS_EFFECT_CONSTANT
Stun(power)
if(stuttering < power)
stuttering = power
if (prob(stunprob) && M.powerlevel >= 8)
Stuttering(power)
if(prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth("slime attack")
return 1
@@ -27,7 +27,4 @@
var/dreaming = 0 //How many dream images we have left to send
var/nightmare = 0
/// The world.time after which the mob can hallucinate again.
var/next_hallucination = 0
blood_volume = BLOOD_VOLUME_NORMAL
@@ -449,7 +449,7 @@
message = "<B>[src]</B> attempts a flip and crashes to the floor!"
SpinAnimation(5,1)
sleep(3)
Weaken(2)
Weaken(4 SECONDS)
else
message = "<B>[src]</B> does a flip!"
SpinAnimation(5,1)
@@ -459,8 +459,8 @@
if(prob(5))
spin(32, 1)
to_chat(src, "<span class='warning'>You spin too much!</span>")
Dizzy(12)
Confused(12)
Dizzy(24 SECONDS)
Confused(24 SECONDS)
else
spin(20, 1)
@@ -500,9 +500,9 @@
if("faint", "faints")
message = "<B>[src]</B> faints."
if(sleeping)
if(IsSleeping())
return //Can't faint while asleep
AdjustSleeping(2)
AdjustSleeping(4 SECONDS)
m_type = 1
if("cough", "coughs")
@@ -842,7 +842,7 @@
m_type = 1
if("collapse", "collapses")
Paralyse(2)
Paralyse(4 SECONDS)
message = "<B>[src]</B> collapses!"
m_type = 2
if(miming)
@@ -109,12 +109,12 @@
msg += "<span class='warning'>[p_they(TRUE)] [p_are()] [bicon(handcuffed)] handcuffed!</span>\n"
//Jitters
switch(jitteriness)
if(300 to INFINITY)
switch(AmountJitter())
if(600 SECONDS to INFINITY)
msg += "<span class='warning'><B>[p_they(TRUE)] [p_are()] convulsing violently!</B></span>\n"
if(200 to 300)
if(400 SECONDS to 600 SECONDS)
msg += "<span class='warning'>[p_they(TRUE)] [p_are()] extremely jittery.</span>\n"
if(100 to 200)
if(200 SECONDS to 400 SECONDS)
msg += "<span class='warning'>[p_they(TRUE)] [p_are()] twitching ever so slightly.</span>\n"
@@ -248,7 +248,7 @@
burn_loss = brute_loss //Damage gets reduced from 120 to up to 60 combined brute+burn
if(check_ear_prot() < HEARING_PROTECTION_TOTAL)
AdjustEarDamage(30, 120)
Weaken(20 SECONDS_TO_LIFE_CYCLES - (bomb_armor * 1.6 / 10) SECONDS_TO_LIFE_CYCLES) //Between ~4 and ~20 seconds of knockdown depending on bomb armor
Weaken(20 SECONDS - (bomb_armor * 1.6 / 10) SECONDS) //Between ~4 and ~20 seconds of knockdown depending on bomb armor
if(EXPLODE_LIGHT)
brute_loss = 30
@@ -256,7 +256,7 @@
brute_loss = 15 * (2 - round(bomb_armor * 0.01, 0.05)) //Reduced from 30 to up to 15
if(check_ear_prot() < HEARING_PROTECTION_TOTAL)
AdjustEarDamage(15, 60)
Weaken(16 SECONDS_TO_LIFE_CYCLES - (bomb_armor * 1.6 / 10) SECONDS_TO_LIFE_CYCLES) //Between no knockdown to ~16 seconds depending on bomb armor
Weaken(16 SECONDS - (bomb_armor * 1.6 / 10) SECONDS) //Between no knockdown to ~16 seconds depending on bomb armor
valid_limbs = list("l_hand", "l_foot", "r_hand", "r_foot")
limb_loss_chance = 25
@@ -1635,7 +1635,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
if(H.health <= HEALTH_THRESHOLD_CRIT)
H.adjustOxyLoss(-15 * cpr_modifier)
H.SetLoseBreath(0)
H.AdjustParalysis(-1)
H.AdjustParalysis(-2 SECONDS)
H.updatehealth("cpr")
visible_message("<span class='danger'>[src] performs CPR on [H.name]!</span>", "<span class='notice'>You perform CPR on [H.name].</span>")
@@ -489,8 +489,8 @@ emp_act
if(prob(I.force))
visible_message("<span class='combat danger'>[src] has been knocked down!</span>", \
"<span class='combat userdanger'>[src] has been knocked down!</span>")
apply_effect(5, WEAKEN, armor)
AdjustConfused(15)
apply_effect(10 SECONDS, WEAKEN, armor)
AdjustConfused(30 SECONDS)
if(prob(I.force + ((100 - health)/2)) && src != user && I.damtype == BRUTE)
SSticker.mode.remove_revolutionary(mind)
@@ -510,7 +510,7 @@ emp_act
if(stat == CONSCIOUS && I.force && prob(I.force + 10))
visible_message("<span class='combat danger'>[src] has been knocked down!</span>", \
"<span class='combat userdanger'>[src] has been knocked down!</span>")
apply_effect(5, WEAKEN, armor)
apply_effect(10 SECONDS, WEAKEN, armor)
if(bloody)
if(wear_suit)
@@ -642,7 +642,7 @@ emp_act
else
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_selected))
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
apply_effect(5, WEAKEN, run_armor_check(affecting, MELEE))
apply_effect(10 SECONDS, WEAKEN, run_armor_check(affecting, MELEE))
add_attack_logs(M, src, "Alien tackled")
visible_message("<span class='danger'>[M] has tackled down [src]!</span>")
@@ -693,9 +693,9 @@ emp_act
switch(M.damtype)
if("brute")
if(M.force > 35) // durand and other heavy mechas
Paralyse(1)
Paralyse(2 SECONDS)
else if(M.force > 20 && !IsWeakened()) // lightweight mechas like gygax
Weaken(2)
Weaken(4 SECONDS)
update |= affecting.receive_damage(dmg, 0)
playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
if("fire")
@@ -68,7 +68,7 @@
if(!HAS_TRAIT(src, TRAIT_NOPAIN))
emote("scream")
custom_emote(1, "collapses!")
Weaken(5) //can't emote while weakened, apparently.
Weaken(10 SECONDS) //can't emote while weakened, apparently.
/mob/living/carbon/human/proc/handle_grasp()
+15 -94
View File
@@ -97,25 +97,7 @@
SetEyeBlurry(0)
else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
EyeBlind(2)
EyeBlurry(2)
else
//blindness
if(HAS_TRAIT(src, TRAIT_BLIND)) // Disabled-blind, doesn't get better on its own
else if(eye_blind) // Blindness, heals slowly over time
AdjustEyeBlind(-1)
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold) && eye_blurry) //resting your eyes with a blindfold heals blurry eyes faster
AdjustEyeBlurry(-3)
//blurry sight
if(vision.is_bruised()) // Vision organs impaired? Permablurry.
EyeBlurry(2)
if(eye_blurry) // Blurry eyes heal slowly
AdjustEyeBlurry(-1)
EyeBlind(4 SECONDS)
if(getBrainLoss() >= 60 && stat != DEAD)
if(prob(3))
@@ -560,7 +542,7 @@
if(satiety < 0)
satiety++
if(prob(round(-satiety/40)))
Jitter(5)
Jitter(10 SECONDS)
hunger_rate = 3 * hunger_drain
hunger_rate *= physiology.hunger_mod
adjust_nutrition(-hunger_rate)
@@ -603,67 +585,6 @@
handle_trace_chems()
/mob/living/carbon/human/handle_drunk()
var/slur_start = 30 //12u ethanol, 30u whiskey FOR HUMANS
var/confused_start = 40
var/brawl_start = 30
var/blur_start = 75
var/vomit_start = 60
var/pass_out = 90
var/spark_start = 50 //40u synthanol
var/collapse_start = 75
var/braindamage_start = 120
var/alcohol_strength = drunk
var/sober_str = !HAS_TRAIT(src, TRAIT_ALCOHOL_TOLERANCE) ? 1 : 2
alcohol_strength /= sober_str
var/obj/item/organ/internal/liver/L
if(!ismachineperson(src))
L = get_int_organ(/obj/item/organ/internal/liver)
if(L)
alcohol_strength *= L.alcohol_intensity
else
alcohol_strength *= 5
if(alcohol_strength >= slur_start) //slurring
Slur(drunk)
if(mind)
if(alcohol_strength >= brawl_start) //the drunken martial art
if(!istype(mind.martial_art, /datum/martial_art/drunk_brawling))
var/datum/martial_art/drunk_brawling/F = new
F.teach(src, TRUE)
else if(alcohol_strength < brawl_start) //removing the art
if(istype(mind.martial_art, /datum/martial_art/drunk_brawling))
mind.martial_art.remove(src)
if(alcohol_strength >= confused_start && prob(33)) //confused walking
if(!confused)
Confused(1)
AdjustConfused(3 / sober_str)
if(alcohol_strength >= blur_start) //blurry eyes
EyeBlurry(10 / sober_str)
if(!ismachineperson(src)) //stuff only for non-synthetics
if(alcohol_strength >= vomit_start) //vomiting
if(prob(8))
fakevomit()
if(alcohol_strength >= pass_out)
Paralyse(5 / sober_str)
Drowsy(30 / sober_str)
if(L)
L.receive_damage(0.1, 1)
adjustToxLoss(0.1)
else //stuff only for synthetics
if(alcohol_strength >= spark_start && prob(25))
do_sparks(3, 1, src)
if(alcohol_strength >= collapse_start && prob(10))
emote("collapse")
do_sparks(3, 1, src)
if(alcohol_strength >= braindamage_start && prob(10))
adjustBrainLoss(1)
if(!has_booze())
AdjustDrunk(-0.5)
/mob/living/carbon/human/proc/has_booze() //checks if the human has ethanol or its subtypes inside
for(var/A in reagents.reagent_list)
var/datum/reagent/R = A
@@ -682,8 +603,8 @@
return
if(getBrainLoss() >= 100) // braindeath
AdjustLoseBreath(10, bound_lower = 0, bound_upper = 25)
Weaken(30)
AdjustLoseBreath(20 SECONDS, bound_lower = 0, bound_upper = 50 SECONDS)
Weaken(60 SECONDS)
if(!check_death_method())
if(health <= HEALTH_THRESHOLD_DEAD)
@@ -695,12 +616,12 @@
if(health <= HEALTH_THRESHOLD_CRIT)
if(prob(5))
emote(pick("faint", "collapse", "cry", "moan", "gasp", "shudder", "shiver"))
AdjustStuttering(5, bound_lower = 0, bound_upper = 5)
SetStuttering(10 SECONDS)
EyeBlurry(5)
if(prob(7))
AdjustConfused(2)
AdjustConfused(4 SECONDS)
if(prob(5))
Paralyse(2)
Paralyse(4 SECONDS)
switch(health)
if(-INFINITY to -100)
adjustOxyLoss(1)
@@ -711,12 +632,12 @@
if(prob(health * -0.2))
var/datum/disease/D = new /datum/disease/critical/heart_failure
ForceContractDisease(D)
Paralyse(5)
Paralyse(10 SECONDS)
if(-99 to -80)
adjustOxyLoss(1)
if(prob(4))
to_chat(src, "<span class='userdanger'>Your chest hurts...</span>")
Paralyse(2)
Paralyse(4 SECONDS)
var/datum/disease/D = new /datum/disease/critical/heart_failure
ForceContractDisease(D)
if(-79 to -50)
@@ -729,9 +650,9 @@
ForceContractDisease(D)
if(prob(6))
to_chat(src, "<span class='userdanger'>You feel [pick("horrible pain", "awful", "like shit", "absolutely awful", "like death", "like you are dying", "nothing", "warm", "sweaty", "tingly", "really, really bad", "horrible")]!</span>")
Weaken(3)
Weaken(6 SECONDS)
if(prob(3))
Paralyse(2)
Paralyse(4 SECONDS)
if(-49 to 0)
adjustOxyLoss(1)
if(prob(3))
@@ -739,7 +660,7 @@
ForceContractDisease(D)
if(prob(5))
to_chat(src, "<span class='userdanger'>You feel [pick("terrible", "awful", "like shit", "sick", "numb", "cold", "sweaty", "tingly", "horrible")]!</span>")
Weaken(3)
Weaken(6 SECONDS)
/mob/living/carbon/human/update_health_hud()
if(!client)
@@ -863,7 +784,7 @@
var/temp = PULSE_NORM
if(blood_volume <= BLOOD_VOLUME_BAD)//how much blood do we have
temp = PULSE_THREADY //not enough :(
temp = PULSE_THREADY //not enough :( ) fuck you bracket colouriser
if(HAS_TRAIT(src, TRAIT_FAKEDEATH))
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
@@ -1009,8 +930,8 @@
adjustBrainLoss(3)
else if(prob(10))
adjustBrainLoss(1)
Weaken(5)
AdjustLoseBreath(20, bound_lower = 0, bound_upper = 25)
Weaken(10 SECONDS)
AdjustLoseBreath(40 SECONDS, bound_lower = 0, bound_upper = 50 SECONDS)
adjustOxyLoss(20)
+2 -2
View File
@@ -100,7 +100,7 @@
var/obj/item/organ/internal/L = get_organ_slot("lungs")
if((breathes && !L) || breathes && L && (L.status & ORGAN_DEAD))
return FALSE
if(getOxyLoss() > 10 || losebreath >= 4)
if(getOxyLoss() > 10 || AmountLoseBreath() >= 8 SECONDS)
emote("gasp")
return FALSE
if(mind)
@@ -142,7 +142,7 @@
if(S.speaking && S.speaking.flags & NO_STUTTER)
continue
if(silent || HAS_TRAIT(src, TRAIT_MUTE))
if(HAS_TRAIT(src, TRAIT_MUTE))
S.message = ""
if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
@@ -416,7 +416,9 @@
return TRUE
/datum/species/proc/spec_stun(mob/living/carbon/human/H, amount)
. = stun_mod * H.physiology.stun_mod * amount
. = amount
if(!H.frozen) //admin freeze has no breaks
. = stun_mod * H.physiology.stun_mod * amount
/datum/species/proc/spec_electrocute_act(mob/living/carbon/human/H, shock_damage, source, siemens_coeff = 1, flags = NONE)
return
@@ -505,7 +507,7 @@
if((target.stat != DEAD) && damage >= user.dna.species.punchstunthreshold)
target.visible_message("<span class='danger'>[user] has weakened [target]!</span>", \
"<span class='userdanger'>[user] has weakened [target]!</span>")
target.apply_effect(4, WEAKEN, armor_block)
target.apply_effect(8 SECONDS, WEAKEN, armor_block)
target.forcesay(GLOB.hit_appends)
else if(target.lying)
target.forcesay(GLOB.hit_appends)
@@ -525,7 +527,7 @@
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_selected))
var/randn = rand(1, 100)
if(randn <= 25)
target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, MELEE))
target.apply_effect(4 SECONDS, WEAKEN, target.run_armor_check(affecting, MELEE))
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>")
add_attack_logs(user, target, "Pushed over", ATKLOG_ALL)
@@ -116,7 +116,7 @@
if(/obj/item/projectile/energy/floramut)
if(prob(15))
H.rad_act(rand(30, 80))
H.Weaken(5)
H.Weaken(10 SECONDS)
H.visible_message("<span class='warning'>[H] writhes in pain as [H.p_their()] vacuoles boil.</span>", "<span class='userdanger'>You writhe in pain as your vacuoles boil!</span>", "<span class='italics'>You hear the crunching of leaves.</span>")
if(prob(80))
randmutb(H)
@@ -183,7 +183,7 @@
for(var/mob/living/carbon/human/H in contents)
H.adjustBruteLoss(COCOON_HARM_AMOUNT)
H.adjustFireLoss(COCOON_HARM_AMOUNT)
H.AdjustWeakened(5)
H.AdjustWeakened(10 SECONDS)
for(var/mob/living/carbon/human/H in contents)
H.remove_status_effect(STATUS_EFFECT_COCOONED)
@@ -151,8 +151,8 @@
var/chosen_limb = missing_limbs[limb_select]
H.visible_message("<span class='notice'>[H] begins to hold still and concentrate on [H.p_their()] missing [limb_select]...</span>", "<span class='notice'>You begin to focus on regrowing your missing [limb_select]... (This will take [round(SLIMEPERSON_REGROWTHDELAY/10)] seconds, and you must hold still.)</span>")
if(do_after(H, SLIMEPERSON_REGROWTHDELAY, FALSE, H, extra_checks = list(CALLBACK(H, /mob.proc/IsStunned)), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned
if(H.incapacitated(ignore_lying = TRUE, extra_checks = list(CALLBACK(H, /mob.proc/IsStunned)), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned
if(do_after(H, SLIMEPERSON_REGROWTHDELAY, FALSE, H, extra_checks = list(CALLBACK(H, /mob/living.proc/IsStunned)), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned
if(H.incapacitated(ignore_lying = TRUE, extra_checks = list(CALLBACK(H, /mob/living.proc/IsStunned)), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned
to_chat(H, "<span class='warning'>You cannot regenerate missing limbs in your current state.</span>")
return
@@ -96,7 +96,7 @@
add_attack_logs(user, C, "tail whipped")
if(user.restrained())
if(prob(50))
user.Weaken(5)
user.Weaken(10 SECONDS)
user.visible_message("<span class='danger'>[user] loses [user.p_their()] balance!</span>", "<span class='danger'>You lose your balance!</span>")
return
if(user.getStaminaLoss() >= 60) //Bit higher as you don't need to start, just would need to keep going with the tail lash.
@@ -1,15 +0,0 @@
/mob/living/carbon/human/SetStunned(amount, updating = 1, force = 0)
amount = dna.species.spec_stun(src, amount)
return ..()
/mob/living/carbon/human/SetWeakened(amount, updating = 1, force = 0)
amount = dna.species.spec_stun(src, amount)
return ..()
/mob/living/carbon/human/SetParalysis(amount, updating = 1, force = 0)
amount = dna.species.spec_stun(src, amount)
return ..()
/mob/living/carbon/human/SetSleeping(amount, updating = 1, no_alert = FALSE)
amount = dna.species.spec_stun(src, amount)
return ..()
+7 -90
View File
@@ -63,11 +63,10 @@
var/datum/gas_mixture/breath
if(health <= HEALTH_THRESHOLD_CRIT && check_death_method())
AdjustLoseBreath(1)
AdjustLoseBreath(2 SECONDS)
//Suffocate
if(losebreath > 0)
AdjustLoseBreath(-1)
if(AmountLoseBreath())
if(prob(75))
emote("gasp")
if(istype(loc, /obj/))
@@ -153,7 +152,7 @@
if(!co2overloadtime)
co2overloadtime = world.time
else if(world.time - co2overloadtime > 120)
Paralyse(3)
Paralyse(6 SECONDS)
adjustOxyLoss(3)
if(world.time - co2overloadtime > 300)
adjustOxyLoss(8)
@@ -174,9 +173,9 @@
//TRACE GASES
if(breath.sleeping_agent)
if(SA_partialpressure > SA_para_min)
Paralyse(3)
Paralyse(6 SECONDS)
if(SA_partialpressure > SA_sleep_min)
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
AdjustSleeping(4 SECONDS, bound_lower = 0, bound_upper = 20 SECONDS)
else if(SA_partialpressure > 0.01)
if(prob(20))
emote(pick("giggle","laugh"))
@@ -253,7 +252,7 @@
M.adjustBruteLoss(5)
adjust_nutrition(10)
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
//this updates all special effects: only stamina for now
/mob/living/carbon/handle_status_effects()
..()
if(stam_regen_start_time <= world.time)
@@ -263,91 +262,9 @@
setStaminaLoss(0, FALSE)
update_health_hud()
var/restingpwr = 1 + 4 * resting
//Dizziness
if(dizziness)
var/client/C = client
var/pixel_x_diff = 0
var/pixel_y_diff = 0
var/temp
var/saved_dizz = dizziness
if(C)
var/oldsrc = src
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70 // This shit is annoying at high strength
src = null
spawn(0)
if(C)
temp = amplitude * sin(0.008 * saved_dizz * world.time)
pixel_x_diff += temp
C.pixel_x += temp
temp = amplitude * cos(0.008 * saved_dizz * world.time)
pixel_y_diff += temp
C.pixel_y += temp
sleep(3)
if(C)
temp = amplitude * sin(0.008 * saved_dizz * world.time)
pixel_x_diff += temp
C.pixel_x += temp
temp = amplitude * cos(0.008 * saved_dizz * world.time)
pixel_y_diff += temp
C.pixel_y += temp
sleep(3)
if(C)
C.pixel_x -= pixel_x_diff
C.pixel_y -= pixel_y_diff
src = oldsrc
AdjustDizzy(-restingpwr)
if(drowsyness)
AdjustDrowsy(-restingpwr)
EyeBlurry(2)
if(prob(5))
AdjustSleeping(1)
Paralyse(5)
//Jitteryness
if(jitteriness)
do_jitter_animation(jitteriness)
AdjustJitter(-restingpwr)
if(hallucination)
handle_hallucinations()
AdjustHallucinate(-2)
// Keep SSD people asleep
if(player_logged)
Sleeping(2)
/mob/living/carbon/handle_sleeping()
if(..())
if(mind?.has_antag_datum(/datum/antagonist/vampire))
if(istype(loc, /obj/structure/closet/coffin))
adjustBruteLoss(-1, FALSE)
adjustFireLoss(-1, FALSE)
adjustToxLoss(-1)
handle_dreams()
adjustStaminaLoss(-10)
var/comfort = 1
if(istype(buckled, /obj/structure/bed))
var/obj/structure/bed/bed = buckled
comfort+= bed.comfort
for(var/obj/item/bedsheet/bedsheet in range(loc,0))
if(bedsheet.loc != loc) //bedsheets in your backpack/neck don't give you comfort
continue
comfort+= bedsheet.comfort
break //Only count the first bedsheet
if(drunk)
comfort += 1 //Aren't naps SO much better when drunk?
AdjustDrunk(-0.2*comfort) //reduce drunkenness while sleeping.
if(comfort > 1 && prob(3))//You don't heal if you're just sleeping on the floor without a blanket.
adjustBruteLoss(-1 * comfort, FALSE)
adjustFireLoss(-1 * comfort)
if(prob(10) && health && health_hud_override != HEALTH_HUD_OVERRIDE_CRIT)
emote("snore")
return sleeping
Sleeping(4 SECONDS)
/mob/living/carbon/update_health_hud(shown_health_amount)
if(!client)
@@ -194,7 +194,7 @@
to_chat(user, "<span class='notice'>You begin the recruitment of [target].</span>")
user.visible_message("<span class='danger'>[user] leans over towards [target], whispering excitedly as [user.p_they()] give[user.p_s()] a speech.</span>")
to_chat(target, "<span class='danger'>You feel yourself agreeing with [user], and a surge of loyalty begins building.</span>")
target.Weaken(12)
target.Weaken(24 SECONDS)
sleep(20)
if(ismindshielded(target))
to_chat(user, "<span class='notice'>[target.p_they(TRUE)] are enslaved by Nanotrasen. You feel [target.p_their()] interest in your cause wane and disappear.</span>")
@@ -6,7 +6,7 @@
death()
create_debug_log("died of damage, trigger reason: [reason]")
return
if(paralysis || sleeping || (check_death_method() && getOxyLoss() > 50) || HAS_TRAIT(src, TRAIT_FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT && check_death_method())
if(IsParalyzed() || IsSleeping() || (check_death_method() && getOxyLoss() > 50) || HAS_TRAIT(src, TRAIT_FAKEDEATH) || health <= HEALTH_THRESHOLD_CRIT && check_death_method())
if(stat == CONSCIOUS)
KnockOut()
create_debug_log("fell unconscious, trigger reason: [reason]")
+1 -2
View File
@@ -97,8 +97,7 @@
if(DROWSY)
Drowsy(effect * blocked)
if(JITTER)
if(status_flags & CANSTUN)
Jitter(effect * blocked)
Jitter(effect * blocked)
updatehealth("apply effect")
return TRUE
+3 -3
View File
@@ -103,6 +103,6 @@
/mob/living/proc/delayed_gib()
visible_message("<span class='danger'><b>[src]</b> starts convulsing violently!</span>", "You feel as if your body is tearing itself apart!")
Weaken(15)
do_jitter_animation(1000, -1)
addtimer(CALLBACK(src, .proc/gib), rand(20, 100))
Weaken(30 SECONDS)
do_jitter_animation(1000, -1) // jitter until they are gibbed
addtimer(CALLBACK(src, .proc/gib), rand(2 SECONDS, 10 SECONDS))
+3 -38
View File
@@ -117,52 +117,17 @@
if(incapacitated())
stop_pulling()
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
//this updates all special effects: mainly stamina
/mob/living/proc/handle_status_effects() // We check for the status effect in this proc as opposed to the procs below to avoid excessive proc call overhead
if(stunned)
AdjustStunned(-1, updating = 1, force = 1)
if(weakened)
AdjustWeakened(-1, updating = 1, force = 1)
if(stuttering)
stuttering = max(stuttering - 1, 0)
if(silent)
AdjustSilence(-1)
if(druggy)
AdjustDruggy(-1)
if(slurring)
AdjustSlur(-1)
if(paralysis)
AdjustParalysis(-1, updating = 1, force = 1)
if(sleeping)
handle_sleeping()
if(slowed)
AdjustSlowed(-1)
if(drunk)
handle_drunk()
if(cultslurring)
AdjustCultSlur(-1)
if(confused)
AdjustConfused(-1)
return
/mob/living/proc/update_damage_hud()
return
/mob/living/proc/handle_sleeping()
AdjustSleeping(-1)
return sleeping
/mob/living/proc/handle_drunk()
AdjustDrunk(-1)
return drunk
/mob/living/proc/handle_disabilities()
//Eyes
if(HAS_TRAIT(src, TRAIT_BLIND) || stat) //blindness from disability or unconsciousness doesn't get better on its own
EyeBlind(1)
else if(eye_blind) //blindness, heals slowly over time
AdjustEyeBlind(-1)
else if(eye_blurry) //blurry eyes heal slowly
AdjustEyeBlurry(-1)
EyeBlind(2 SECONDS)
// Gives a mob the vision of being dead
/mob/living/proc/grant_death_vision()
+15 -21
View File
@@ -445,13 +445,15 @@
setBrainLoss(0)
setStaminaLoss(0)
SetSleeping(0)
SetParalysis(0, 1, 1)
SetStunned(0, 1, 1)
SetWeakened(0, 1, 1)
SetParalysis(0, TRUE)
SetStunned(0, TRUE)
SetWeakened(0, TRUE)
SetSlowed(0)
SetImmobilized(0)
SetLoseBreath(0)
SetDizzy(0)
SetJitter(0)
SetStuttering(0)
SetConfused(0)
SetDrowsy(0)
radiation = 0
@@ -511,14 +513,13 @@
return
/mob/living/proc/remove_CC(should_update_canmove = TRUE)
SetWeakened(0, FALSE)
SetStunned(0, FALSE)
SetParalysis(0, FALSE)
SetSleeping(0, FALSE)
SetWeakened(0)
SetStunned(0)
SetParalysis(0)
SetImmobilized(0)
SetSleeping(0)
setStaminaLoss(0)
SetSlowed(0)
if(should_update_canmove)
update_canmove()
/mob/living/proc/UpdateDamageIcon()
return
@@ -726,7 +727,7 @@
/mob/living/proc/Exhaust()
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
Weaken(5)
Weaken(10 SECONDS)
/mob/living/proc/get_visible_name()
return name
@@ -916,8 +917,9 @@
if(isturf(loc))
var/turf/T = loc
. += T.slowdown
if(slowed)
. += 10
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(S)
. += S.slowdown_value
if(forced_look)
. += 3
if(ignorewalk)
@@ -925,7 +927,7 @@
else
switch(m_intent)
if(MOVE_INTENT_RUN)
if(drowsyness > 0)
if(get_drowsiness() > 0)
. += 6
. += GLOB.configuration.movement.base_run_speed
if(MOVE_INTENT_WALK)
@@ -1027,14 +1029,6 @@
GLOB.dead_mob_list += src
. = ..()
switch(var_name)
if("weakened")
SetWeakened(var_value)
if("stunned")
SetStunned(var_value)
if("paralysis")
SetParalysis(var_value)
if("sleeping")
SetSleeping(var_value)
if("maxHealth")
updatehealth()
if("resize")
+1 -1
View File
@@ -138,7 +138,7 @@
step_away(src,M,15)
switch(M.damtype)
if("brute")
Paralyse(1)
Paralyse(2 SECONDS)
take_overall_damage(rand(M.force/2, M.force))
playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
if("fire")
+1 -1
View File
@@ -8,6 +8,6 @@
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
//This causes instant sleep and tags a player as SSD. See life.dm for furthering SSD.
if(mind.active)
Sleeping(2)
Sleeping(4 SECONDS)
player_logged = 1
last_logout = world.time
+3 -3
View File
@@ -71,21 +71,21 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key)
S.message = "[uppertext(S.message)]!!!"
verb = pick("yells", "roars", "hollers")
if(slurring)
if(AmountSluring())
if(robot)
S.message = slur(S.message, list("@", "!", "#", "$", "%", "&", "?"))
else
S.message = slur(S.message)
verb = "slurs"
if(stuttering)
if(AmountStuttering())
if(robot)
S.message = robostutter(S.message)
else
S.message = stutter(S.message)
verb = "stammers"
if(cultslurring)
if(AmountCultSlurring())
S.message = cultslur(S.message)
verb = "slurs"
@@ -37,9 +37,6 @@
else
adjustOxyLoss(-1)
if(stunned)
AdjustStunned(-1, updating = 1, force = 1)
var/area/my_area = get_area(src)
if(!lacks_power())
+2 -2
View File
@@ -230,7 +230,7 @@
set category = "pAI Commands"
set name = "Unfold Chassis"
if(stat || sleeping || paralysis || IsWeakened())
if(stat || IsSleeping() || IsParalyzed() || IsWeakened())
return
if(loc != card)
@@ -265,7 +265,7 @@
set category = "pAI Commands"
set name = "Collapse Chassis"
if(stat || sleeping || paralysis || IsWeakened())
if(stat || IsSleeping() || IsParalyzed() || IsWeakened())
return
if(loc == card)
@@ -49,12 +49,12 @@
if(!gripped_item && proximity && target && ishuman(target))
H = target
if(H.lying)
H.AdjustSleeping(-5)
if(H.sleeping == 0)
H.AdjustSleeping(-10 SECONDS)
if(!H.IsSleeping())
H.StopResting()
H.AdjustParalysis(-3)
H.AdjustStunned(-3)
H.AdjustWeakened(-3)
H.AdjustParalysis(-6 SECONDS)
H.AdjustStunned(-6 SECONDS)
H.AdjustWeakened(-6 SECONDS)
playsound(user.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
user.visible_message( \
"<span class='notice'>[user] shakes [H] trying to wake [H.p_them()] up!</span>",\
@@ -133,10 +133,10 @@
weaponlock_time = 120
/mob/living/silicon/robot/update_canmove(delay_action_updates = 0)
if(paralysis || stunned || IsWeakened() || buckled || lockcharge || stat)
canmove = 0
if(IsParalyzed() || IsStunned() || IsWeakened() || buckled || lockcharge || stat)
canmove = FALSE
else
canmove = 1
canmove = TRUE
update_transform()
if(!delay_action_updates)
update_action_buttons_icon()
@@ -987,7 +987,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
/mob/living/silicon/robot/update_icons()
overlays.Cut()
if(stat != DEAD && !(paralysis || stunned || IsWeakened() || low_power_mode)) //Not dead, not stunned.
if(stat != DEAD && !(IsParalyzed() || IsStunned() || IsWeakened() || low_power_mode)) //Not dead, not stunned.
if(custom_panel in custom_eye_names)
overlays += "eyes-[custom_panel]"
else
@@ -1,6 +1,6 @@
// No args for restraints because robots don't have those
/mob/living/silicon/robot/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, ignore_lying = FALSE)
if(stat || lockcharge || IsWeakened() || stunned || paralysis || !is_component_functioning("actuator"))
if(stat || lockcharge || IsWeakened() || IsStunned() || IsParalyzed() || !is_component_functioning("actuator"))
return TRUE
/mob/living/silicon/robot/has_vision(information_only = FALSE)
@@ -14,7 +14,7 @@
death()
create_debug_log("died of damage, trigger reason: [reason]")
return
if(!is_component_functioning("actuator") || !is_component_functioning("power cell") || paralysis || sleeping || resting || stunned || IsWeakened() || getOxyLoss() > maxHealth * 0.5)
if(!is_component_functioning("actuator") || !is_component_functioning("power cell") || IsParalyzed() || IsSleeping() || resting || IsStunned() || IsWeakened() || getOxyLoss() > maxHealth * 0.5)
if(stat == CONSCIOUS)
KnockOut()
update_headlamp()
@@ -38,31 +38,6 @@
diag_hud_set_health()
update_health_hud()
/mob/living/silicon/robot/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
. = STATUS_UPDATE_CANMOVE
if((!!amount) == (!!stunned)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
if(status_flags & CANSTUN || force)
stunned = max(amount, 0)
if(updating)
update_stat()
else
return STATUS_UPDATE_NONE
/mob/living/silicon/robot/SetWeakened(amount, updating = 1, force = 0)
. = STATUS_UPDATE_CANMOVE
if((!!amount) == (!!weakened)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
if(status_flags & CANWEAKEN || force)
weakened = max(amount, 0)
if(updating)
update_stat()
else
return STATUS_UPDATE_NONE
/mob/living/silicon/robot/update_revive(updating = TRUE)
. = ..(updating)
if(.)
+4 -5
View File
@@ -170,12 +170,12 @@
/mob/living/silicon/emp_act(severity)
..()
switch(severity)
if(1)
if(EMP_HEAVY)
take_organ_damage(20)
Stun(8)
if(2)
Stun(16 SECONDS)
if(EMP_LIGHT)
take_organ_damage(10)
Stun(3)
Stun(6 SECONDS)
flash_eyes(affect_silicon = 1)
to_chat(src, "<span class='danger'>*BZZZT*</span>")
to_chat(src, "<span class='warning'>Warning: Electromagnetic pulse detected.</span>")
@@ -228,7 +228,6 @@
/mob/living/silicon/apply_effect(effect = 0, effecttype = STUN, blocked = 0)
return FALSE //The only effect that can hit them atm is flashes and they still directly edit so this works for now
/proc/islinked(mob/living/silicon/robot/bot, mob/living/silicon/ai/ai)
if(!istype(bot) || !istype(ai))
return 0
@@ -286,7 +286,7 @@
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
if(!Adjacent(target) || !isturf(target.loc) || target.weakened < 2)
if(!Adjacent(target) || !isturf(target.loc) || target.AmountWeakened() < 4 SECONDS)
back_to_hunt()
return
@@ -313,7 +313,7 @@
back_to_idle()
return
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.weakened < 2)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountWeakened() < 4 SECONDS)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
back_to_hunt()
return
else
@@ -547,7 +547,7 @@
return
if(iscarbon(A))
var/mob/living/carbon/C = A
if(!C.stunned || arrest_type)
if(!C.IsStunned() || arrest_type)
stun_attack(A)
else if(C.canBeHandcuffed() && !C.handcuffed)
cuff(A)
@@ -573,9 +573,8 @@
spawn(2)
icon_state = "[lasercolor]ed209[on]"
var/threat = C.assess_threat(src)
C.SetStuttering(5)
C.Stun(5)
C.Weaken(5)
C.SetStuttering(10 SECONDS)
C.Weaken(10 SECONDS)
add_attack_logs(src, C, "stunned")
if(declare_arrests)
var/area/location = get_area(src)
@@ -17,7 +17,7 @@
var/stun_chance = 50
var/spam_flag = 0
var/frustration_number = 15
/mob/living/simple_animal/bot/secbot/griefsky/toy //A toy version of general griefsky!
name = "Genewul Giftskee"
desc = "An adorable looking secbot with four toy swords taped to its arms"
@@ -47,13 +47,13 @@
/mob/living/simple_animal/bot/secbot/griefsky/emag_act(mob/user)
..()
light_color = LIGHT_COLOR_PURE_RED //if you see a red one. RUN!!
/mob/living/simple_animal/bot/secbot/griefsky/Crossed(atom/movable/AM, oldloc)
..()
if(ismob(AM) && AM == target)
var/mob/living/carbon/C = AM
visible_message("[src] flails his swords and pushes [C] out of it's way!" )
C.Weaken(2)
C.Weaken(4 SECONDS)
/mob/living/simple_animal/bot/secbot/griefsky/New()
..()
@@ -90,8 +90,8 @@
var/threat = C.assess_threat(src)
if(ishuman(C))
C.apply_damage(dmg, BRUTE)
if(prob(stun_chance))
C.Weaken(5)
if(prob(stun_chance))
C.Weaken(10 SECONDS)
if(dmg)
add_attack_logs(src, C, "sliced")
if(declare_arrests)
@@ -136,9 +136,9 @@
frustration++
else
frustration = 0
else
else
back_to_idle()
speak("You fool")
speak("You fool")
else
back_to_idle()
@@ -212,7 +212,7 @@
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1, 0)
else
..()
/mob/living/simple_animal/bot/secbot/griefsky/proc/special_retaliate_after_attack(mob/user) //allows special actions to take place after being attacked.
return
@@ -221,7 +221,7 @@
return
if(prob(block_chance_melee))
visible_message("[src] deflects [user]'s attack with his energy swords!")
playsound(loc, 'sound/weapons/blade1.ogg', 50, TRUE, -1)
playsound(loc, 'sound/weapons/blade1.ogg', 50, TRUE, -1)
return TRUE
/mob/living/simple_animal/bot/secbot/griefsky/attack_hand(mob/living/carbon/human/H)
@@ -132,7 +132,7 @@
if(emagged <= 1)
honk_attack(A)
else
if(!C.stunned || arrest_type) //originaly was paralisysed in tg ported as stun
if(!C.IsStunned() || arrest_type)
stun_attack(A)
..()
else if(!spam_flag) //honking at the ground
@@ -178,11 +178,10 @@
var/mob/living/carbon/human/H = C
if(H.check_ear_prot() >= HEARING_PROTECTION_MAJOR)
return
C.stuttering = 20 //stammer
C.SetStuttering(40 SECONDS) //stammer
C.AdjustEarDamage(0, 5) //far less damage than the H.O.N.K.
C.Jitter(50)
C.Weaken(5)
C.Stun(5) // Paralysis from tg ported as stun
C.Jitter(100 SECONDS)
C.Weaken(10 SECONDS)
if(client) //prevent spam from players..
spam_flag = TRUE
if(emagged <= 1) //HONK once, then leave
@@ -195,8 +194,8 @@
C.visible_message("<span class='danger'>[src] has honked [C]!</span>",\
"<span class='userdanger'>[src] has honked you!</span>")
else
C.stuttering = 20
C.Stun(10)
C.Stuttering(40 SECONDS)
C.Stun(20 SECONDS)
addtimer(CALLBACK(src, .proc/spam_flag_false), cooldowntime)
@@ -321,7 +320,7 @@
"[C] trips over [src] and falls!", \
"[C] topples over [src]!", \
"[C] leaps out of [src]'s way!")]</span>")
C.Weaken(5)
C.Weaken(10 SECONDS)
playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 1, -1)
if(!client)
speak("Honk!")
@@ -301,19 +301,6 @@
if(mode == BOT_HEALING)
return
if(stunned)
icon_state = "medibota"
stunned--
oldpatient = patient
patient = null
mode = BOT_IDLE
if(stunned <= 0)
update_icon()
stunned = 0
return
if(frustration > 8)
oldpatient = patient
soft_reset()
@@ -554,11 +541,6 @@
return 1
return 0
/mob/living/simple_animal/bot/medbot/bullet_act(obj/item/projectile/Proj)
if(Proj.flag == "taser")
stunned = min(stunned+10,20)
..()
/mob/living/simple_animal/bot/medbot/explode()
on = 0
visible_message("<span class='userdanger'>[src] blows apart!</span>")
@@ -673,17 +673,16 @@
// called when bot bumps into anything
/mob/living/simple_animal/bot/mulebot/Bump(atom/obs)
if(wires.is_cut(WIRE_MOB_AVOIDANCE)) // usually just bumps, but if avoidance disabled knock over mobs
var/mob/M = obs
if(ismob(M))
if(istype(M,/mob/living/silicon/robot))
visible_message("<span class='danger'>[src] bumps into [M]!</span>")
var/mob/living/L = obs
if(ismob(L))
if(istype(L,/mob/living/silicon/robot))
visible_message("<span class='danger'>[src] bumps into [L]!</span>")
else
if(!paicard)
add_attack_logs(src, M, "Knocked down")
visible_message("<span class='danger'>[src] knocks over [M]!</span>")
M.stop_pulling()
M.Stun(8)
M.Weaken(5)
add_attack_logs(src, L, "Knocked down")
visible_message("<span class='danger'>[src] knocks over [L]!</span>")
L.stop_pulling()
L.Weaken(16 SECONDS)
return ..()
/mob/living/simple_animal/bot/mulebot/proc/RunOver(mob/living/carbon/human/H)
@@ -219,7 +219,7 @@
return
if(iscarbon(A))
var/mob/living/carbon/C = A
if(!C.stunned || arrest_type)
if(!C.IsStunned() || arrest_type)
stun_attack(A)
else if(C.canBeHandcuffed() && !C.handcuffed)
cuff(A)
@@ -261,9 +261,8 @@
var/threat = C.assess_threat(src)
if(ishuman(C) && harmbaton) // Bots with harmbaton enabled become shitcurity. - Dave
C.apply_damage(10, BRUTE)
C.SetStuttering(5)
C.Stun(5)
C.Weaken(5)
C.SetStuttering(10 SECONDS)
C.Weaken(10 SECONDS)
add_attack_logs(src, C, "stunned")
if(declare_arrests)
var/area/location = get_area(src)
@@ -334,7 +333,7 @@
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
if( !Adjacent(target) || !isturf(target.loc) || target.weakened < 2 )
if( !Adjacent(target) || !isturf(target.loc) || target.AmountWeakened() < 4 SECONDS)
back_to_hunt()
return
@@ -361,7 +360,7 @@
back_to_idle()
return
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.weakened < 2)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountWeakened() < 4 SECONDS)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
back_to_hunt()
return
else //Try arresting again if the target escapes.
@@ -461,7 +460,7 @@
"[C] trips over [src] and falls!", \
"[C] topples over [src]!", \
"[C] leaps out of [src]'s way!")]</span>")
C.Weaken(2)
C.Weaken(4 SECONDS)
return
..()
@@ -289,10 +289,6 @@
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
/mob/living/simple_animal/hostile/construct/behemoth/Life(seconds, times_fired)
weakened = 0
return ..()
/////////////////////////////Harvester/////////////////////////
@@ -162,7 +162,7 @@
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
Weaken(30)
Weaken(60 SECONDS)
icon_state = icon_dead
spawn(rand(20,50))
if(!stat && M)
@@ -48,7 +48,7 @@
var/mob/living/L = .
if(istype(L))
if(prob(15))
L.Stun(1)
L.Stun(2 SECONDS)
L.visible_message("<span class='danger'>\the [src] scares \the [L]!</span>")
@@ -38,6 +38,6 @@
if(. && iscarbon(target))
var/mob/living/carbon/C = target
if(prob(12))
C.Weaken(3)
C.Weaken(6 SECONDS)
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", \
"<span class='userdanger'>\The [src] knocks you down!</span>")
@@ -209,7 +209,7 @@
if(STAGE_HAUNT)
if(prob(5))
H.AdjustEyeBlurry(1)
H.AdjustEyeBlurry(2 SECONDS)
if(prob(5))
H.playsound_local(src,'sound/spookoween/insane_low_laugh.ogg', 1)
@@ -226,7 +226,7 @@
if(STAGE_SPOOK)
if(prob(4))
H.slip("???", 5, 2)
H.slip("???", 10 SECONDS)
to_chat(H, "<span class='warning'>The floor shifts underneath you!</span>")
if(prob(3))
@@ -254,7 +254,7 @@
if(STAGE_TORMENT)
if(prob(5))
H.slip("???", 5, 2)
H.slip("???", 10 SECONDS)
to_chat(H, "<span class='warning'>The floor shifts underneath you!</span>")
if(prob(5))
@@ -279,7 +279,7 @@
to_chat(H, "<font face='Comic Sans MS'><i>!?REHTOMKNOH eht esiarp uoy oD</i></font>")
to_chat(H, "<span class='warning'>Something grabs your foot!</span>")
H.playsound_local(src,'sound/hallucinations/i_see_you1.ogg', 25)
H.Stun(10)
H.Stun(20 SECONDS)
if(prob(5))
to_chat(H, "<font face='Comic Sans MS'><i>!KNOH ?od nottub siht seod tahW</i></font>")
@@ -320,7 +320,7 @@
manifested = TRUE
Manifest()
to_chat(H, "<span class='userdanger'>You feel the floor closing in on your feet!</span>")
H.Weaken(30)
H.Weaken(60 SECONDS)
H.emote("scream")
H.adjustBruteLoss(10)
if(!eating)
@@ -42,5 +42,5 @@
if(.)
if(prob(15) && iscarbon(target))
var/mob/living/carbon/C = target
C.Weaken(3)
C.Weaken(6 SECONDS)
C.visible_message("<span class='danger'>\the [src] knocks down \the [C]!</span>")
@@ -78,7 +78,7 @@
icon_state = initial(icon_state)
if(prob(15) && iscarbon(target))
var/mob/living/carbon/C = target
C.Weaken(2)
C.Weaken(4 SECONDS)
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", "<span class='userdanger'>\The [src] knocks you down!</span>")
/mob/living/simple_animal/hostile/mimic/crate/proc/trigger()
@@ -189,7 +189,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
. = ..()
if(knockdown_people && . && prob(15) && iscarbon(target))
var/mob/living/carbon/C = target
C.Weaken(2)
C.Weaken(4 SECONDS)
C.visible_message("<span class='danger'>\The [src] knocks down \the [C]!</span>", "<span class='userdanger'>\The [src] knocks you down!</span>")
/mob/living/simple_animal/hostile/mimic/copy/Aggro()
@@ -184,7 +184,7 @@
if((!QDELETED(spawner) && spawner.faction_check_mob(L)) || L.stat == DEAD)
continue
visible_message("<span class='danger'>[src] grabs hold of [L]!</span>")
L.Stun(5)
L.Stun(10 SECONDS)
L.adjustBruteLoss(rand(10,15))
latched = TRUE
if(!latched)
@@ -194,7 +194,7 @@
continue
var/turf/T = get_turf(L.loc)
if(T && (T in targets))
L.EyeBlind(4)
L.EyeBlind(8 SECONDS)
return
/mob/living/simple_animal/hostile/statue/sentience_act()
@@ -189,8 +189,7 @@
if(isliving(AM) && !isterrorspider(AM))
var/mob/living/M = AM
to_chat(M, "<span class='userdanger'>You get stuck in [src] for a moment.</span>")
M.Stun(4) // 8 seconds.
M.Weaken(4) // 8 seconds.
M.Weaken(8 SECONDS)
if(iscarbon(M))
web_special_ability(M)
addtimer(CALLBACK(src, .proc/after_carbon_crossed, M), 7 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
@@ -32,7 +32,7 @@
if(L.reagents.has_reagent("terror_black_toxin", 100))
return ..()
var/inject_target = pick("chest", "head")
if(L.stunned || L.can_inject(null, FALSE, inject_target, FALSE))
if(L.IsStunned() || L.can_inject(null, FALSE, inject_target, FALSE))
L.reagents.add_reagent("terror_black_toxin", 30) // inject our special poison
visible_message("<span class='danger'>[src] buries its long fangs deep into the [inject_target] of [target]!</span>")
else
@@ -24,11 +24,11 @@
// total damage: 4, human health 150 until crit, = 37.5 ticks, = 75s = 1m15s until death
update_flags |= M.adjustToxLoss(4, FALSE)
update_flags |= M.EyeBlurry(6, FALSE)
M.Confused(6)
M.Confused(12 SECONDS)
else
// bitten 4 or more times, whole body goes into shock/death
// total damage: 8, human health 150 until crit, = 18.75 ticks, = 37s until death
update_flags |= M.adjustToxLoss(8, FALSE)
update_flags |= M.EyeBlurry(6, FALSE)
update_flags |= M.Paralyse(5, FALSE)
M.Paralyse(10 SECONDS)
return ..() | update_flags
@@ -87,9 +87,8 @@
..()
return
var/inject_target = pick("chest","head")
if(L.stunned || L.can_inject(null, FALSE, inject_target, FALSE))
if(L.eye_blurry < 60)
L.AdjustEyeBlurry(10)
if(L.IsStunned() || L.can_inject(null, FALSE, inject_target, FALSE))
L.AdjustEyeBlurry(20 SECONDS, 0, 120 SECONDS)
// instead of having a venom that only lasts seconds, we just add the eyeblur directly.
visible_message("<span class='danger'>[src] buries its fangs deep into the [inject_target] of [target]!</span>")
else
@@ -102,6 +101,5 @@
/obj/structure/spider/terrorweb/green/web_special_ability(mob/living/carbon/C)
if(istype(C))
if(C.eye_blurry < 60)
C.AdjustEyeBlurry(30)
C.AdjustEyeBlurry(60 SECONDS, 0, 120 SECONDS)
@@ -41,7 +41,6 @@
if(prob(15))
visible_message("<span class='danger'>[src] rams into [L], knocking [L.p_them()] to the floor!</span>")
do_attack_animation(L)
L.Weaken(5)
L.Stun(5)
L.Weaken(10 SECONDS)
else
..()
@@ -41,7 +41,7 @@
return
var/inject_target = pick("chest","head")
L.attack_animal(src)
if(L.stunned || L.paralysis || L.can_inject(null, FALSE, inject_target, FALSE))
if(L.IsStunned() || L.IsParalyzed() || L.can_inject(null, FALSE, inject_target, FALSE))
if(!IsTSInfected(L) && ishuman(L))
visible_message("<span class='danger'>[src] buries its long fangs deep into the [inject_target] of [L]!</span>")
new /obj/item/organ/internal/body_egg/terror_eggs(L)
@@ -50,8 +50,7 @@
walk_away(src,L,2,1)
else if(prob(25))
visible_message("<span class='danger'>[src] pounces on [L]!</span>")
L.Weaken(5)
L.Stun(5)
L.Weaken(10 SECONDS)
/proc/IsTSInfected(mob/living/carbon/C) // Terror AI requires this
if(C.get_int_organ(/obj/item/organ/internal/body_egg))
@@ -42,5 +42,5 @@
if(. && iscarbon(target))
var/mob/living/carbon/C = target
if(prob(15))
C.Weaken(3)
C.Weaken(6 SECONDS)
C.visible_message("<span class='danger'>\the [src] knocks down \the [C]!</span>")
@@ -87,7 +87,7 @@
if(prob(grasp_pull_chance))
dir = get_dir(src,L) //staaaare
step(L,get_dir(L,src)) //reel them in
L.Weaken(3) //you can't get away now~
L.Weaken(6 SECONDS) //you can't get away now~
if(grasping.len < max_grasps)
grasping:
@@ -156,7 +156,7 @@
if(stat == DEAD)
. += "<span class='deadsay'>Upon closer examination, [p_they()] appear[p_s()] to be dead.</span>"
return
if(sleeping)
if(IsSleeping())
. += "<span class='notice'>Upon closer examination, [p_they()] appear[p_s()] to be asleep.</span>"
/mob/living/simple_animal/updatehealth(reason = "none given")
@@ -188,9 +188,9 @@
death()
create_debug_log("died of damage, trigger reason: [reason]")
else
if(sleeping && (stat == CONSCIOUS))
if(IsSleeping() && (stat == CONSCIOUS))
KnockOut()
if(!sleeping)
else
WakeUp()
create_debug_log("woke up, trigger reason: [reason]")
med_hud_set_status()
@@ -541,7 +541,7 @@
. |= pcollar.GetAccess()
/mob/living/simple_animal/update_canmove(delay_action_updates = 0)
if(paralysis || stunned || IsWeakened() || stat || resting)
if(IsParalyzed() || IsStunned() || IsWeakened() || stat || resting)
drop_r_hand()
drop_l_hand()
canmove = 0
@@ -16,7 +16,7 @@
switch(act) //Alphabetical please
if("me")
if(silent)
if(HAS_TRAIT(src, TRAIT_MUTE))
return
if(src.client)
if(check_mute(client.ckey, MUTE_IC))
+468 -260
View File
@@ -1,20 +1,9 @@
//Here are the procs used to modify status effects of a mob.
// We use these to automatically apply their effects when they are changed, as
// opposed to setting them manually and having to either wait for the next `Life`
// or update by hand
// The `updating` argument is only available on effects that cause a visual/physical effect on the mob itself
// when applied, such as Stun, Weaken, and Jitter - stuff like Blindness, which has a client-side effect,
// lacks this argument.
// Ideally, code should only read the vars in this file, and not ever directly
// modify them
// If you want a mob type to ignore a given status effect, just override the corresponding
// `SetSTATE` proc - since all of the other procs are wrappers around that,
// calling them will have no effect
// BOOLEAN STATES
/*
@@ -26,49 +15,70 @@
// STATUS EFFECTS
// All of these decrement over time - at a rate of 1 per life cycle unless otherwise noted
// All of these are handed by a status_effect in `debuffs.dm` their durations are measured in deciseconds, so the seconds define is used wherever possible, even with decimal seconds values.
// Status effects sorted alphabetically:
/*
* Confused *
* Confused() *
Movement is scrambled
* Dizzy *
The screen goes all warped
* Dizzy() *
The screen shifts in random directions slightly.
* Drowsy
You begin to yawn, and have a chance of incrementing "Paralysis"
* Druggy *
* Druggy() *
A trippy overlay appears.
* Drunk *
Essentially what your "BAC" is - the higher it is, the more alcohol you have in you
* EyeBlind *
* Drunk() *
Gives you a wide variety of negative effects related to being drunk, all scaling up with alcohol consumption.
* EyeBlind() *
You cannot see. Prevents EyeBlurry from healing naturally.
* EyeBlurry *
* EyeBlurry() *
A hazy overlay appears on your screen.
* Hallucination *
* Hallucinate() *
Your character will imagine various effects happening to them, vividly.
* Jitter *
* Immobilize()
Your character cannot walk, however they can act.
* Jitter() *
Your character will visibly twitch. Higher values amplify the effect.
* LoseBreath *
* LoseBreath() *
Your character is unable to breathe.
* Paralysis *
* Paralysis() *
Your character is knocked out.
* Silent *
* Silence() *
Your character is unable to speak.
* Sleeping *
* Sleeping() *
Your character is asleep.
* Slowed *
Your character moves slower.
* Slurring *
* Slowed() *
Your character moves slower. The amount of slowdown is variable, defaulting to 10, which is a massive amount.
* Slurring() *
Your character cannot enunciate clearly.
* CultSlurring *
* CultSlurring() *
Your character cannot enunciate clearly while mumbling about elder codes.
* Stunned *
* Stun() *
Your character is unable to move, and drops stuff in their hands. They keep standing, though.
* Stuttering *
* Stuttering() *
Your character stutters parts of their messages.
* Weakened *
Your character collapses, but is still conscious.
* Weaken() *
Your character collapses, but is still conscious. does not need to be called in tandem with Stun().
*/
#define RETURN_STATUS_EFFECT_STRENGTH(T) \
var/datum/status_effect/transient/S = has_status_effect(T);\
return S ? S.strength : 0
#define SET_STATUS_EFFECT_STRENGTH(T, A) \
A = max(A, 0);\
if(A) {;\
var/datum/status_effect/transient/S = has_status_effect(T);\
if(!S) {;\
apply_status_effect(T, A);\
} else {;\
S.strength = A;\
};\
} else {;\
remove_status_effect(T);\
}
#define IS_STUN_IMMUNE(source, ignore_canstun) ((source.status_flags & GODMODE) || (!ignore_canstun && !(source.status_flags & CANSTUN)))
/mob/living
// Booleans
@@ -78,27 +88,6 @@
STATUS EFFECTS
*/
/mob // On `/mob` for now, to support legacy code
var/confused = 0
var/cultslurring = 0
var/dizziness = 0
var/drowsyness = 0
var/druggy = 0
var/drunk = 0
var/eye_blind = 0
var/eye_blurry = 0
var/hallucination = 0
var/jitteriness = 0
var/losebreath = 0
var/paralysis = 0
var/silent = 0
var/sleeping = 0
var/slowed = 0
var/slurring = 0
var/stunned = 0
var/stuttering = 0
var/weakened = 0
// RESTING
/mob/living/proc/StartResting(updating = 1)
@@ -118,311 +107,526 @@
// SCALAR STATUS EFFECTS
// CONFUSED
/**
* Returns current amount of [confusion][/datum/status_effect/decaying/confusion], 0 if none.
*/
/mob/living/proc/get_confusion()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_CONFUSION)
/mob/living/Confused(amount)
SetConfused(max(confused, amount))
/**
* Sets [confusion][/datum/status_effect/decaying/confusion] if it's higher than zero.
*/
/mob/living/proc/SetConfused(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_CONFUSION, amount)
/mob/living/SetConfused(amount)
confused = max(amount, 0)
/**
* Sets [confusion][/datum/status_effect/decaying/confusion] if it's higher than current.
*/
/mob/living/proc/Confused(amount)
SetConfused(max(get_confusion(), amount))
/mob/living/AdjustConfused(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(confused, amount, bound_lower, bound_upper)
SetConfused(new_value)
/**
* Sets [confusion][/datum/status_effect/decaying/confusion] to current amount + given, clamped between lower and higher bounds.
*
* Arguments:
* * amount - Amount to add. Can be negative to reduce duration.
* * bound_lower - Minimum bound to set at least to. Defaults to 0.
* * bound_upper - Maximum bound to set up to. Defaults to infinity.
*/
/mob/living/proc/AdjustConfused(amount, bound_lower = 0, bound_upper = INFINITY)
SetConfused(directional_bounded_sum(get_confusion(), amount, bound_lower, bound_upper))
// DIZZY
/mob/living/Dizzy(amount)
SetDizzy(max(dizziness, amount))
/**
* Returns current amount of [dizziness][/datum/status_effect/decaying/dizziness], 0 if none.
*/
/mob/living/proc/get_dizziness()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DIZZINESS)
/mob/living/SetDizzy(amount)
dizziness = max(amount, 0)
/**
* Sets [dizziness][/datum/status_effect/decaying/dizziness] if it's higher than zero.
*/
/mob/living/proc/SetDizzy(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DIZZINESS, amount)
/mob/living/AdjustDizzy(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(dizziness, amount, bound_lower, bound_upper)
SetDizzy(new_value)
/**
* Sets [dizziness][/datum/status_effect/decaying/dizziness] if it's higher than current.
*/
/mob/living/proc/Dizzy(amount)
SetDizzy(max(get_dizziness(), amount))
/**
* Sets [dizziness][/datum/status_effect/decaying/dizziness] to current amount + given, clamped between lower and higher bounds.
*
* Arguments:
* * amount - Amount to add. Can be negative to reduce duration.
* * bound_lower - Minimum bound to set at least to. Defaults to 0.
* * bound_upper - Maximum bound to set up to. Defaults to infinity.
*/
/mob/living/proc/AdjustDizzy(amount, bound_lower = 0, bound_upper = INFINITY)
SetDizzy(directional_bounded_sum(get_dizziness(), amount, bound_lower, bound_upper))
// DROWSY
/mob/living/Drowsy(amount)
SetDrowsy(max(drowsyness, amount))
/**
* Returns current amount of [drowsiness][/datum/status_effect/decaying/drowsiness], 0 if none.
*/
/mob/living/proc/get_drowsiness()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DROWSINESS)
/mob/living/SetDrowsy(amount)
drowsyness = max(amount, 0)
/**
* Sets [drowsiness][/datum/status_effect/decaying/drowsiness] if it's higher than zero.
*/
/mob/living/proc/SetDrowsy(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DROWSINESS, amount)
/mob/living/AdjustDrowsy(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(drowsyness, amount, bound_lower, bound_upper)
SetDrowsy(new_value)
/**
* Sets [drowsiness][/datum/status_effect/decaying/drowsiness] if it's higher than current.
*/
/mob/living/proc/Drowsy(amount)
SetDrowsy(max(get_drowsiness(), amount))
/**
* Sets [drowsiness][/datum/status_effect/decaying/drowsiness] to current amount + given, clamped between lower and higher bounds.
*
* Arguments:
* * amount - Amount to add. Can be negative to reduce duration.
* * bound_lower - Minimum bound to set at least to. Defaults to 0.
* * bound_upper - Maximum bound to set up to. Defaults to infinity.
*/
/mob/living/proc/AdjustDrowsy(amount, bound_lower = 0, bound_upper = INFINITY)
SetDrowsy(directional_bounded_sum(get_drowsiness(), amount, bound_lower, bound_upper))
// DRUNK
/mob/living/Drunk(amount)
SetDrunk(max(drunk, amount))
/**
* Returns current amount of [drunkenness][/datum/status_effect/decaying/drunkenness], 0 if none.
*/
/mob/living/proc/get_drunkenness()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DRUNKENNESS)
/mob/living/SetDrunk(amount)
drunk = max(amount, 0)
/**
* Sets [drunkenness][/datum/status_effect/decaying/drunkenness] if it's higher than zero.
*/
/mob/living/proc/SetDrunk(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DRUNKENNESS, amount)
/mob/living/AdjustDrunk(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(drunk, amount, bound_lower, bound_upper)
SetDrunk(new_value)
/**
* Sets [drunkenness][/datum/status_effect/decaying/drunkenness] if it's higher than current.
*/
/mob/living/proc/Drunk(amount)
SetDrunk(max(get_drunkenness(), amount))
/**
* Sets [drunkenness][/datum/status_effect/decaying/drunkenness] to current amount + given, clamped between lower and higher bounds.
*
* Arguments:
* * amount - Amount to add. Can be negative to reduce duration.
* * bound_lower - Minimum bound to set at least to. Defaults to 0.
* * bound_upper - Maximum bound to set up to. Defaults to infinity.
*/
/mob/living/proc/AdjustDrunk(amount, bound_lower = 0, bound_upper = INFINITY)
SetDrunk(directional_bounded_sum(get_drunkenness(), amount, bound_lower, bound_upper))
// DRUGGY
/mob/living/Druggy(amount, updating = TRUE)
return SetDruggy(max(druggy, amount), updating)
/mob/living/proc/AmountDruggy()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DRUGGED)
/mob/living/SetDruggy(amount, updating = TRUE)
. = STATUS_UPDATE_DRUGGY
if((!!amount) == (!!druggy)) // We're not changing from + to 0 or vice versa
. = STATUS_UPDATE_NONE
updating = FALSE
druggy = max(amount, 0)
// We transitioned to/from 0, so update the druggy overlays
if(updating)
update_druggy_effects()
/mob/living/proc/Druggy(amount)
SetDruggy(max(AmountDruggy(), amount))
/mob/living/AdjustDruggy(amount, bound_lower = 0, bound_upper = INFINITY, updating = TRUE)
var/new_value = directional_bounded_sum(druggy, amount, bound_lower, bound_upper)
return SetDruggy(new_value, updating)
/mob/living/proc/SetDruggy(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_DRUGGED, amount)
/mob/living/proc/AdjustDruggy(amount, bound_lower = 0, bound_upper = INFINITY)
SetDruggy(directional_bounded_sum(AmountDruggy(), amount, bound_lower, bound_upper))
// EYE_BLIND
/mob/living/proc/AmountBlinded()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_BLINDED)
/mob/living/EyeBlind(amount, updating = TRUE)
return SetEyeBlind(max(eye_blind, amount), updating)
/mob/living/proc/EyeBlind(amount)
SetEyeBlind(max(AmountBlinded(), amount))
/mob/living/SetEyeBlind(amount, updating = TRUE)
. = STATUS_UPDATE_BLIND
if((!!amount) == (!!eye_blind)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
eye_blind = max(amount, 0)
// We transitioned to/from 0, so update the eye blind overlays
if(updating)
update_blind_effects()
/mob/living/proc/SetEyeBlind(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_BLINDED, amount)
/mob/living/AdjustEyeBlind(amount, bound_lower = 0, bound_upper = INFINITY, updating = TRUE)
var/new_value = directional_bounded_sum(eye_blind, amount, bound_lower, bound_upper)
return SetEyeBlind(new_value, updating)
/mob/living/proc/AdjustEyeBlind(amount, bound_lower = 0, bound_upper = INFINITY, updating = TRUE)
SetEyeBlind(directional_bounded_sum(AmountBlinded(), amount, bound_lower, bound_upper))
// EYE_BLURRY
/mob/living/proc/AmountEyeBlurry()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_BLURRY_EYES)
/mob/living/EyeBlurry(amount, updating = TRUE)
return SetEyeBlurry(max(eye_blurry, amount), updating)
/mob/living/proc/EyeBlurry(amount)
SetEyeBlurry(max(AmountEyeBlurry(), amount))
/mob/living/SetEyeBlurry(amount, updating = TRUE)
. = STATUS_UPDATE_BLURRY
//if they're both above max or equal that means we won't change the blur filter
if(amount > MAX_EYE_BLURRY_FILTER_SIZE / EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER && eye_blurry > MAX_EYE_BLURRY_FILTER_SIZE / EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER || eye_blurry == amount)
updating = FALSE
. = STATUS_UPDATE_NONE
/mob/living/proc/SetEyeBlurry(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_BLURRY_EYES, amount)
eye_blurry = max(amount, 0)
if(updating)
update_blurry_effects()
/mob/living/AdjustEyeBlurry(amount, bound_lower = 0, bound_upper = INFINITY, updating = TRUE)
var/new_value = directional_bounded_sum(eye_blurry, amount, bound_lower, bound_upper)
return SetEyeBlurry(new_value, updating)
/mob/living/proc/AdjustEyeBlurry(amount, bound_lower = 0, bound_upper = INFINITY)
SetEyeBlurry(directional_bounded_sum(AmountEyeBlurry(), amount, bound_lower, bound_upper))
// HALLUCINATION
/mob/living/proc/AmountHallucinate()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_HALLUCINATION)
/mob/living/Hallucinate(amount)
SetHallucinate(max(hallucination, amount))
/mob/living/proc/Hallucinate(amount)
SetHallucinate(max(AmountHallucinate(), amount))
/mob/living/SetHallucinate(amount)
hallucination = max(amount, 0)
/mob/living/proc/SetHallucinate(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_HALLUCINATION, amount)
/mob/living/AdjustHallucinate(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(hallucination, amount, bound_lower, bound_upper)
SetHallucinate(new_value)
/mob/living/proc/AdjustHallucinate(amount, bound_lower = 0, bound_upper = INFINITY)
SetHallucinate(directional_bounded_sum(AmountHallucinate(), amount, bound_lower, bound_upper))
// JITTER
/mob/living/proc/AmountJitter()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_JITTER)
/mob/living/Jitter(amount, force = 0)
SetJitter(max(jitteriness, amount), force)
/mob/living/proc/Jitter(amount, ignore_canstun = FALSE)
SetJitter(max(AmountJitter(), amount), ignore_canstun)
/mob/living/SetJitter(amount, force = 0)
/mob/living/proc/SetJitter(amount, ignore_canstun = FALSE)
// Jitter is also associated with stun
if(status_flags & CANSTUN || force)
jitteriness = max(amount, 0)
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_JITTER, amount)
/mob/living/AdjustJitter(amount, bound_lower = 0, bound_upper = INFINITY, force = 0)
var/new_value = directional_bounded_sum(jitteriness, amount, bound_lower, bound_upper)
SetJitter(new_value, force)
/mob/living/proc/AdjustJitter(amount, bound_lower = 0, bound_upper = INFINITY, force = 0)
SetJitter(directional_bounded_sum(AmountJitter(), amount, bound_lower, bound_upper), force)
// LOSE_BREATH
/mob/living/LoseBreath(amount)
SetLoseBreath(max(losebreath, amount))
/mob/living/proc/AmountLoseBreath()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_LOSE_BREATH)
/mob/living/SetLoseBreath(amount)
/mob/living/proc/LoseBreath(amount)
SetLoseBreath(max(AmountLoseBreath(), amount))
/mob/living/proc/SetLoseBreath(amount)
if(HAS_TRAIT(src, TRAIT_NOBREATH))
losebreath = 0
return FALSE
losebreath = max(amount, 0)
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_LOSE_BREATH, amount)
/mob/living/AdjustLoseBreath(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(losebreath, amount, bound_lower, bound_upper)
SetLoseBreath(new_value)
/mob/living/proc/AdjustLoseBreath(amount, bound_lower = 0, bound_upper = INFINITY)
SetLoseBreath(directional_bounded_sum(AmountLoseBreath(), amount, bound_lower, bound_upper))
// PARALYSE
/mob/living/proc/IsParalyzed()
return has_status_effect(STATUS_EFFECT_PARALYZED)
/mob/living/Paralyse(amount, updating = 1, force = 0)
return SetParalysis(max(paralysis, amount), updating, force)
/mob/living/proc/AmountParalyzed()
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed()
if(P)
return P.duration - world.time
return 0
/mob/living/SetParalysis(amount, updating = 1, force = 0)
. = STATUS_UPDATE_STAT
if((!!amount) == (!!paralysis)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
if(status_flags & CANPARALYSE || force)
paralysis = max(amount, 0)
if(updating)
update_canmove()
update_stat("paralysis")
/mob/living/proc/Paralyse(amount, ignore_canstun = FALSE)
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed()
if(P)
P.duration = max(world.time + amount, P.duration)
else if(amount > 0)
P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount)
return P
/mob/living/AdjustParalysis(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0)
var/new_value = directional_bounded_sum(paralysis, amount, bound_lower, bound_upper)
return SetParalysis(new_value, updating, force)
/mob/living/proc/SetParalysis(amount, ignore_canstun = FALSE)
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
var/datum/status_effect/incapacitating/paralyzed/P = IsParalyzed()
if(P)
P.duration = world.time + amount
else if(amount > 0)
P = apply_status_effect(STATUS_EFFECT_PARALYZED, amount)
return P
/mob/living/proc/AdjustParalysis(amount, bound_lower = 0, bound_upper = INFINITY, ignore_canstun = FALSE)
return SetParalysis(directional_bounded_sum(AmountParalyzed(), amount, bound_lower, bound_upper), ignore_canstun)
// SILENT
/mob/living/proc/AmountSilenced()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_SILENCED)
/mob/living/Silence(amount)
SetSilence(max(silent, amount))
/mob/living/proc/Silence(amount)
SetSilence(max(amount, AmountSilenced()))
/mob/living/SetSilence(amount)
silent = max(amount, 0)
/mob/living/proc/SetSilence(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_SILENCED, amount)
/mob/living/AdjustSilence(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(silent, amount, bound_lower, bound_upper)
SetSilence(new_value)
/mob/living/proc/AdjustSilence(amount, bound_lower = 0, bound_upper = INFINITY)
SetSilence(directional_bounded_sum(AmountSilenced(), amount, bound_lower, bound_upper))
// SLEEPING
/mob/living/proc/IsSleeping()
return has_status_effect(STATUS_EFFECT_SLEEPING)
/mob/living/Sleeping(amount, updating = 1, no_alert = FALSE)
return SetSleeping(max(sleeping, amount), updating, no_alert)
/mob/living/proc/AmountSleeping() //How many deciseconds remain in our sleep
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
return S.duration - world.time
return 0
/mob/living/SetSleeping(amount, updating = 1, no_alert = FALSE)
/mob/living/proc/Sleeping(amount, ignore_canstun = FALSE)
if(status_flags & GODMODE)
return
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
S.duration = max(world.time + amount, S.duration)
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount)
return S
/mob/living/proc/SetSleeping(amount, ignore_canstun = FALSE)
if(frozen) // If the mob has been admin frozen, sleeping should not be changeable
return
. = STATUS_UPDATE_STAT
if((!!amount) == (!!sleeping)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
sleeping = max(amount, 0)
if(updating)
update_sleeping_effects(no_alert)
update_stat("sleeping")
update_canmove()
if(status_flags & GODMODE)
return
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(amount <= 0 && S)
qdel(S)
if(S)
S.duration = amount + world.time
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_SLEEPING, amount)
return S
/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, no_alert = FALSE)
var/new_value = directional_bounded_sum(sleeping, amount, bound_lower, bound_upper)
return SetSleeping(new_value, updating, no_alert)
/mob/living/proc/PermaSleeping() /// used for admin freezing.
var/datum/status_effect/incapacitating/sleeping/S = IsSleeping()
if(S)
S.duration = -1
else
S = apply_status_effect(STATUS_EFFECT_SLEEPING, -1)
return S
/mob/living/proc/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY)
SetSleeping(directional_bounded_sum(AmountSleeping(), amount, bound_lower, bound_upper))
// SLOWED
/mob/living/proc/IsSlowed()
return has_status_effect(STATUS_EFFECT_SLOWED)
/mob/living/Slowed(amount, updating = 1)
SetSlowed(max(slowed, amount), updating)
/mob/living/proc/Slowed(amount, _slowdown_value)
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(S)
S.duration = max(world.time + amount, S.duration)
S.slowdown_value = _slowdown_value
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_SLOWED, amount, _slowdown_value)
return S
/mob/living/SetSlowed(amount, updating = 1)
slowed = max(amount, 0)
/mob/living/proc/SetSlowed(amount, _slowdown_value)
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(amount <= 0 || _slowdown_value <= 0)
if(S)
qdel(S)
else
if(S)
S.duration = amount
S.slowdown_value = _slowdown_value
else
S = apply_status_effect(STATUS_EFFECT_SLOWED, amount, _slowdown_value)
return S
/mob/living/AdjustSlowed(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1)
var/new_value = directional_bounded_sum(slowed, amount, bound_lower, bound_upper)
SetSlowed(new_value, updating)
/mob/living/proc/AdjustSlowedDuration(amount)
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(S)
S.duration += amount
/mob/living/proc/AdjustSlowedIntensity(intensity)
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(S)
S.slowdown_value += intensity
// SLURRING
/mob/living/proc/AmountSluring()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_SLURRING)
/mob/living/Slur(amount)
SetSlur(max(slurring, amount))
/mob/living/proc/Slur(amount)
SetSlur(max(AmountSluring(), amount))
/mob/living/SetSlur(amount)
slurring = max(amount, 0)
/mob/living/proc/SetSlur(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_SLURRING, amount)
if(slurring && drunk)
throw_alert("drunk", /obj/screen/alert/drunk)
sound_environment_override = SOUND_ENVIRONMENT_PSYCHOTIC
else
clear_alert("drunk")
sound_environment_override = SOUND_ENVIRONMENT_NONE
/mob/living/AdjustSlur(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(slurring, amount, bound_lower, bound_upper)
SetSlur(new_value)
/mob/living/proc/AdjustSlur(amount, bound_lower = 0, bound_upper = INFINITY)
SetSlur(directional_bounded_sum(AmountSluring(), amount, bound_lower, bound_upper))
// CULTSLURRING
/mob/living/proc/AmountCultSlurring()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_CULT_SLUR)
/mob/living/CultSlur(amount)
SetCultSlur(max(cultslurring, amount))
/mob/living/proc/CultSlur(amount)
SetCultSlur(max(AmountCultSlurring(), amount))
/mob/living/SetCultSlur(amount)
cultslurring = max(amount, 0)
/mob/living/proc/SetCultSlur(amount)
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_CULT_SLUR, amount)
/mob/living/AdjustCultSlur(amount, bound_lower = 0, bound_upper = INFINITY)
var/new_value = directional_bounded_sum(cultslurring, amount, bound_lower, bound_upper)
SetCultSlur(new_value)
/mob/living/proc/AdjustCultSlur(amount, bound_lower = 0, bound_upper = INFINITY)
SetCultSlur(directional_bounded_sum(AmountCultSlurring(), amount, bound_lower, bound_upper))
// STUN
/* STUN */
/mob/living/proc/IsStunned() //If we're stunned
return has_status_effect(STATUS_EFFECT_STUN)
/mob/living/Stun(amount, updating = 1, force = 0)
return SetStunned(max(stunned, amount), updating, force)
/mob/living/proc/AmountStun() //How many deciseconds remain in our stun
var/datum/status_effect/incapacitating/stun/S = IsStunned()
if(S)
return S.duration - world.time
return 0
/mob/living/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
. = STATUS_UPDATE_CANMOVE
if((!!amount) == (!!stunned)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
/mob/living/proc/Stun(amount, ignore_canstun = FALSE) //Can't go below remaining duration
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStunned()
if(S)
S.duration = max(world.time + amount, S.duration)
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_STUN, amount)
return S
if(status_flags & CANSTUN || force)
if(absorb_stun(amount, force))
return STATUS_UPDATE_NONE
stunned = max(amount, 0)
if(updating)
update_canmove()
/mob/living/proc/SetStunned(amount, ignore_canstun = FALSE) //Sets remaining duration
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStunned()
if(amount <= 0)
if(S)
qdel(S)
else
return STATUS_UPDATE_NONE
if(absorb_stun(amount, ignore_canstun))
return
if(S)
S.duration = world.time + amount
else
S = apply_status_effect(STATUS_EFFECT_STUN, amount)
return S
/mob/living/AdjustStunned(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0)
var/new_value = directional_bounded_sum(stunned, amount, bound_lower, bound_upper)
return SetStunned(new_value, updating, force)
/mob/living/proc/AdjustStunned(amount, ignore_canstun = FALSE) //Adds to remaining duration
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/stun/S = IsStunned()
if(S)
S.duration += amount
else if(amount > 0)
S = apply_status_effect(STATUS_EFFECT_STUN, amount)
return S
/mob/living/proc/IsImmobilized()
return has_status_effect(STATUS_EFFECT_IMMOBILIZED)
/mob/living/proc/Immobilize(amount, ignore_canstun = FALSE)
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(I)
I.duration = max(world.time + amount, I.duration)
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount)
return I
/mob/living/proc/SetImmobilized(amount, ignore_canstun = FALSE) //Sets remaining duration
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(amount <= 0)
if(I)
qdel(I)
else
if(absorb_stun(amount, ignore_canstun))
return
if(I)
I.duration = world.time + amount
else
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount)
return I
/mob/living/proc/AdjustImmobilized(amount, ignore_canstun = FALSE) //Adds to remaining duration
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/immobilized/I = IsImmobilized()
if(I)
I.duration += amount
else if(amount > 0)
I = apply_status_effect(STATUS_EFFECT_IMMOBILIZED, amount)
return I
// STUTTERING
/mob/living/proc/AmountStuttering()
RETURN_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_STAMMER)
/mob/living/Stuttering(amount, force = 0)
SetStuttering(max(stuttering, amount), force)
/mob/living/proc/Stuttering(amount, ignore_canstun = FALSE)
SetStuttering(max(AmountStuttering(), amount), ignore_canstun)
/mob/living/SetStuttering(amount, force = 0)
//From mob/living/apply_effect: "Stuttering is often associated with Stun"
if(status_flags & CANSTUN || force)
stuttering = max(amount, 0)
/mob/living/proc/SetStuttering(amount, ignore_canstun = FALSE)
if(IS_STUN_IMMUNE(src, ignore_canstun)) //Often applied with a stun
return
SET_STATUS_EFFECT_STRENGTH(STATUS_EFFECT_STAMMER, amount)
/mob/living/AdjustStuttering(amount, bound_lower = 0, bound_upper = INFINITY, force = 0)
var/new_value = directional_bounded_sum(stuttering, amount, bound_lower, bound_upper)
SetStuttering(new_value, force)
/mob/living/proc/AdjustStuttering(amount, bound_lower = 0, bound_upper = INFINITY, ignore_canstun = FALSE)
SetStuttering(directional_bounded_sum(AmountStuttering(), amount, bound_lower, bound_upper), ignore_canstun)
// WEAKEN
/mob/living/Weaken(amount, updating = 1, force = 0)
return SetWeakened(max(weakened, amount), updating, force)
/mob/living/proc/IsWeakened()
return has_status_effect(STATUS_EFFECT_WEAKENED)
/mob/living/SetWeakened(amount, updating = 1, force = 0)
. = STATUS_UPDATE_CANMOVE
if((!!amount) == (!!weakened)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
if(status_flags & CANWEAKEN || force)
if(absorb_stun(amount, force))
return STATUS_UPDATE_NONE
weakened = max(amount, 0)
if(updating)
update_canmove() //updates lying, canmove and icons
/mob/living/proc/AmountWeakened() //How many deciseconds remain in our Weakened status effect
var/datum/status_effect/incapacitating/weakened/P = IsWeakened(FALSE)
if(P)
return P.duration - world.time
return 0
/mob/living/proc/Weaken(amount, ignore_canstun = FALSE) //Can't go below remaining duration
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/weakened/P = IsWeakened(FALSE)
if(P)
P.duration = max(world.time + amount, P.duration)
else if(amount > 0)
P = apply_status_effect(STATUS_EFFECT_WEAKENED, amount)
return P
/mob/living/proc/SetWeakened(amount, ignore_canstun = FALSE) //Sets remaining duration
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
var/datum/status_effect/incapacitating/weakened/P = IsWeakened(FALSE)
if(amount <= 0)
if(P)
qdel(P)
else
return STATUS_UPDATE_NONE
if(absorb_stun(amount, ignore_canstun))
return
if(P)
P.duration = world.time + amount
else
P = apply_status_effect(STATUS_EFFECT_WEAKENED, amount)
return P
/mob/living/AdjustWeakened(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1, force = 0)
var/new_value = directional_bounded_sum(weakened, amount, bound_lower, bound_upper)
return SetWeakened(new_value, updating, force)
/mob/living/proc/AdjustWeakened(amount, ignore_canstun = FALSE) //Adds to remaining duration
if(IS_STUN_IMMUNE(src, ignore_canstun))
return
if(absorb_stun(amount, ignore_canstun))
return
var/datum/status_effect/incapacitating/weakened/P = IsWeakened(FALSE)
if(P)
P.duration += amount
else if(amount > 0)
P = apply_status_effect(STATUS_EFFECT_WEAKENED, amount)
return P
//
// DISABILITIES
@@ -434,6 +638,7 @@
var/val_change = !HAS_TRAIT(src, TRAIT_BLIND)
. = val_change ? STATUS_UPDATE_BLIND : STATUS_UPDATE_NONE
ADD_TRAIT(src, TRAIT_BLIND, source)
EyeBlind(2 SECONDS)
if(val_change && updating)
update_blind_effects()
@@ -536,3 +741,6 @@
/mob/living/proc/reset_shocked()
flags_2 &= ~ SHOCKED_2
#undef RETURN_STATUS_EFFECT_STRENGTH
#undef SET_STATUS_EFFECT_STRENGTH
+1 -1
View File
@@ -18,7 +18,7 @@
var/text_output = from.generate_taste_message(taste_sensitivity)
// We dont want to spam the same message over and over again at the
// person. Give it a bit of a buffer.
if(hallucination > 50 && prob(25))
if(AmountHallucinate() > 50 SECONDS && prob(25))
text_output = pick("spiders","dreams","nightmares","the future","the past","victory",\
"defeat","pain","bliss","revenge","poison","time","space","death","life","truth","lies","justice","memory",\
"regrets","your soul","suffering","music","noise","blood","hunger","the american way")
+17 -37
View File
@@ -12,13 +12,13 @@
var/atom/movable/plane_master_controller/game_plane_master_controller = hud_used?.plane_master_controllers[PLANE_MASTERS_GAME]
if(!game_plane_master_controller)
return
if(eye_blurry)
game_plane_master_controller.add_filter("eye_blur", 1, gauss_blur_filter(clamp(eye_blurry * EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER, 0.6, MAX_EYE_BLURRY_FILTER_SIZE)))
if(AmountEyeBlurry())
game_plane_master_controller.add_filter("eye_blur", 1, gauss_blur_filter(clamp(AmountEyeBlurry() * EYE_BLUR_TO_FILTER_SIZE_MULTIPLIER, 0.6, MAX_EYE_BLURRY_FILTER_SIZE)))
else
game_plane_master_controller.remove_filter("eye_blur")
/mob/living/update_druggy_effects()
if(druggy)
if(AmountDruggy())
overlay_fullscreen("high", /obj/screen/fullscreen/high)
throw_alert("high", /obj/screen/alert/high)
sound_environment_override = SOUND_ENVIRONMENT_DRUGGED
@@ -34,7 +34,7 @@
clear_fullscreen("nearsighted")
/mob/living/update_sleeping_effects(no_alert = FALSE)
if(sleeping)
if(IsSleeping())
if(!no_alert)
throw_alert("asleep", /obj/screen/alert/asleep)
else
@@ -50,44 +50,38 @@
// `information_only` is for stuff that's purely informational - like blindness overlays
// This flag exists because certain things like angel statues expect this to be false for dead people
/mob/living/has_vision(information_only = FALSE)
return (information_only && stat == DEAD) || !(eye_blind || HAS_TRAIT(src, TRAIT_BLIND) || stat)
return (information_only && stat == DEAD) || !(AmountBlinded() || HAS_TRAIT(src, TRAIT_BLIND) || stat)
// Whether the mob is capable of talking
/mob/living/can_speak()
if(!(silent || HAS_TRAIT(src, TRAIT_MUTE)))
if(is_muzzled())
var/obj/item/clothing/mask/muzzle/M = wear_mask
if(M.mute >= MUZZLE_MUTE_MUFFLE)
return FALSE
return TRUE
else
if(HAS_TRAIT(src, TRAIT_MUTE))
return FALSE
if(is_muzzled())
var/obj/item/clothing/mask/muzzle/M = wear_mask
if(M.mute >= MUZZLE_MUTE_MUFFLE)
return FALSE
return TRUE
// Whether the mob is capable of standing or not
/mob/living/proc/can_stand()
return !(IsWeakened() || paralysis || stat || HAS_TRAIT(src, TRAIT_FAKEDEATH))
return !(IsWeakened() || IsParalyzed() || stat || HAS_TRAIT(src, TRAIT_FAKEDEATH))
// Whether the mob is capable of actions or not
/mob/living/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, ignore_lying = FALSE, list/extra_checks = list(), use_default_checks = TRUE)
// By default, checks for weakness and stunned get added to the extra_checks list.
// Setting `use_default_checks` to FALSE means that you don't want it checking for these statuses or you are supplying your own checks.
if(use_default_checks)
extra_checks += CALLBACK(src, /mob.proc/IsWeakened)
extra_checks += CALLBACK(src, /mob.proc/IsStunned)
extra_checks += CALLBACK(src, /mob/living.proc/IsWeakened)
extra_checks += CALLBACK(src, /mob/living.proc/IsStunned)
if(stat || paralysis || (!ignore_restraints && restrained()) || (!ignore_lying && lying) || check_for_true_callbacks(extra_checks))
if(stat || IsParalyzed() || (!ignore_restraints && restrained()) || (!ignore_lying && lying) || check_for_true_callbacks(extra_checks))
return TRUE
// wonderful proc names, I know - used to check whether the blur overlay
// should show or not
/mob/living/proc/eyes_blurred()
return eye_blurry
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
/mob/living/update_canmove(delay_action_updates = 0)
var/fall_over = !can_stand()
var/buckle_lying = !(buckled && !buckled.buckle_lying)
if(fall_over || resting || stunned || (buckled && buckle_lying != 0))
if(fall_over || resting || IsStunned() || (buckled && buckle_lying != 0))
drop_r_hand()
drop_l_hand()
else
@@ -98,7 +92,7 @@
else if((fall_over || resting) && !lying)
fall(fall_over)
canmove = !(fall_over || resting || stunned || IsFrozen() || buckled)
canmove = !(fall_over || resting || IsStunned() || IsFrozen() || buckled || IsImmobilized())
density = !lying
if(lying)
if(layer == initial(layer))
@@ -118,20 +112,6 @@
/mob/living/vv_edit_var(var_name, var_value)
. = ..()
switch(var_name)
if("weakened")
SetWeakened(weakened)
if("stunned")
SetStunned(stunned)
if("paralysis")
SetParalysis(paralysis)
if("sleeping")
SetSleeping(sleeping)
if("eye_blind")
SetEyeBlind(eye_blind)
if("eye_blurry")
SetEyeBlurry(eye_blurry)
if("druggy")
SetDruggy(druggy)
if("maxHealth")
updatehealth("var edit")
if("resize")
+1 -1
View File
@@ -92,7 +92,7 @@
if(type & 1 && !has_vision(information_only=TRUE))
return
// Added voice muffling for Issue 41.
if(stat == UNCONSCIOUS || (sleeping > 0 && stat != DEAD))
if(stat == UNCONSCIOUS)
to_chat(src, "<I>... You can almost hear someone talking ...</I>")
else
to_chat(src, msg)
+9 -9
View File
@@ -163,24 +163,24 @@
if(affecting.loc != assailant.loc)
force_down = 0
else
affecting.Weaken(3) //This is being left in the code as an example of adding a new variable to do something in grab code.
affecting.Weaken(6 SECONDS) //This is being left in the code as an example of adding a new variable to do something in grab code.
*/
var/breathing_tube = affecting.get_organ_slot("breathing_tube")
if(state >= GRAB_NECK)
affecting.Stun(5) //It will hamper your voice, being choked and all.
affecting.Stun(10 SECONDS) //It will hamper your voice, being choked and all.
if(isliving(affecting) && !breathing_tube)
var/mob/living/L = affecting
L.adjustOxyLoss(1)
if(state >= GRAB_KILL)
//affecting.apply_effect(STUTTER, 5) //would do this, but affecting isn't declared as mob/living for some stupid reason.
affecting.Stuttering(5) //It will hamper your voice, being choked and all.
affecting.Weaken(5) //Should keep you down unless you get help.
affecting.Stuttering(10 SECONDS) //It will hamper your voice, being choked and all.
affecting.Weaken(10 SECONDS) //Should keep you down unless you get help.
if(!breathing_tube)
affecting.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3)
affecting.AdjustLoseBreath(4 SECONDS, bound_lower = 0, bound_upper = 6 SECONDS)
adjust_position()
@@ -260,7 +260,7 @@
/* else
assailant.visible_message("<span class='warning'>[assailant] pins [affecting] down to the ground (now hands)!</span>")
force_down = 1
affecting.Weaken(3)
affecting.Weaken(6 SECONDS)
step_to(assailant, affecting)
assailant.setDir(EAST) //face the victim
affecting.setDir(SOUTH) //face up //This is an example of a new feature based on the context of the location of the victim.
@@ -285,7 +285,7 @@
affecting.LAssailant = assailant
hud.icon_state = "kill"
hud.name = "kill"
affecting.Stun(10) //10 ticks of ensured grab
affecting.Stun(20 SECONDS) //10 ticks of ensured grab
else if(state < GRAB_UPGRADING)
assailant.visible_message("<span class='danger'>[assailant] starts to tighten [assailant.p_their()] grip on [affecting]'s neck!</span>")
hud.icon_state = "kill1"
@@ -296,7 +296,7 @@
assailant.next_move = world.time + 10
if(!affecting.get_organ_slot("breathing_tube"))
affecting.AdjustLoseBreath(1)
affecting.AdjustLoseBreath(2 SECONDS)
adjust_position()
@@ -377,7 +377,7 @@
if(!force_down)
assailant.visible_message("<span class='danger'>[user] is forcing [affecting] to the ground!</span>")
force_down = 1
affecting.Weaken(3)
affecting.Weaken(6 SECONDS)
affecting.lying = 1
step_to(assailant, affecting)
assailant.setDir(EAST) //face the victim
+2 -2
View File
@@ -404,12 +404,12 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
set name = "Sleep"
set category = "IC"
if(sleeping)
if(IsSleeping())
to_chat(src, "<span class='notice'>You are already sleeping.</span>")
return
else
if(alert(src, "You sure you want to sleep for a while?", "Sleep", "Yes", "No") == "Yes")
SetSleeping(20) //Short nap
SetSleeping(40 SECONDS) //Short nap
/mob/living/verb/lay_down()
set name = "Rest"
+23 -11
View File
@@ -39,6 +39,11 @@
#define MOVEMENT_DELAY_BUFFER 0.75
#define MOVEMENT_DELAY_BUFFER_DELTA 1.25
#define CONFUSION_LIGHT_COEFFICIENT 0.15
#define CONFUSION_HEAVY_COEFFICIENT 0.075
#define CONFUSION_MAX 80 SECONDS
/client/Move(n, direct)
if(world.time < move_delay)
return
@@ -156,17 +161,20 @@
M.other_mobs = null
M.animate_movement = 2
else if(mob.confused)
var/newdir = 0
if(mob.confused > 40)
newdir = pick(GLOB.alldirs)
else if(prob(mob.confused * 1.5))
newdir = angle2dir(dir2angle(direct) + pick(90, -90))
else if(prob(mob.confused * 3))
newdir = angle2dir(dir2angle(direct) + pick(45, -45))
if(newdir)
direct = newdir
n = get_step(mob, direct)
else
var/mob/living/L = mob
if(L)
var/newdir = NONE
var/confusion = L.get_confusion()
if(confusion > CONFUSION_MAX)
newdir = pick(GLOB.alldirs)
else if(prob(confusion * CONFUSION_HEAVY_COEFFICIENT))
newdir = angle2dir(dir2angle(direct) + pick(90, -90))
else if(prob(confusion * CONFUSION_LIGHT_COEFFICIENT))
newdir = angle2dir(dir2angle(direct) + pick(45, -45))
if(newdir)
direct = newdir
n = get_step(mob, direct)
var/prev_pulling_loc = null
if(mob.pulling)
@@ -199,6 +207,10 @@
for(var/obj/O in mob)
O.on_mob_move(direct, mob)
#undef CONFUSION_LIGHT_COEFFICIENT
#undef CONFUSION_HEAVY_COEFFICIENT
#undef CONFUSION_MAX
/mob/proc/SelfMove(turf/n, direct, movetime)
return Move(n, direct, movetime)
+1 -196
View File
@@ -1,56 +1,4 @@
// A bunch of empty procs for all the status procs in living/status_procs.dm, because
// I can't be bothered to deal with all the merge conflicts it would cause to
// typecast every mob in the codebase correctly
/mob/proc/Confused()
return
/mob/proc/SetConfused()
return
/mob/proc/AdjustConfused()
return
/mob/proc/Dizzy()
return
/mob/proc/SetDizzy()
return
/mob/proc/AdjustDizzy()
return
/mob/proc/Drowsy()
return
/mob/proc/SetDrowsy()
return
/mob/proc/AdjustDrowsy()
return
/mob/proc/Drunk()
return
/mob/proc/SetDrunk()
return
/mob/proc/AdjustDrunk()
return
/mob/proc/Druggy()
return
/mob/proc/SetDruggy()
return
/mob/proc/AdjustDruggy()
return
// some legacy code that needs to be moved to /mob/living
/mob/proc/RestoreEars()
return
@@ -58,149 +6,6 @@
/mob/proc/AdjustEarDamage()
return
/mob/proc/EyeBlind()
return
/mob/proc/SetEyeBlind()
return
/mob/proc/AdjustEyeBlind()
return
/mob/proc/EyeBlurry()
return
/mob/proc/SetEyeBlurry()
return
/mob/proc/AdjustEyeBlurry()
return
/mob/proc/Hallucinate()
return
/mob/proc/SetHallucinate()
return
/mob/proc/AdjustHallucinate()
return
/mob/proc/Jitter()
return
/mob/proc/SetJitter()
return
/mob/proc/AdjustJitter()
return
/mob/proc/LoseBreath()
return
/mob/proc/SetLoseBreath()
return
/mob/proc/AdjustLoseBreath()
return
/mob/proc/Paralyse()
return
/mob/proc/SetParalysis()
return
/mob/proc/AdjustParalysis()
return
/mob/proc/Silence()
return
/mob/proc/SetSilence()
return
/mob/proc/AdjustSilence()
return
/mob/proc/Sleeping()
return
/mob/proc/SetSleeping()
return
/mob/proc/AdjustSleeping()
return
/mob/proc/Slowed()
return
/mob/proc/SetSlowed()
return
/mob/proc/AdjustSlowed()
return
/mob/proc/Slur()
return
/mob/proc/SetSlur()
return
/mob/proc/AdjustSlur()
return
/mob/proc/CultSlur()
return
/mob/proc/SetCultSlur()
return
/mob/proc/AdjustCultSlur()
return
/mob/proc/Stun()
return
/mob/proc/IsStunned()
return stunned
/mob/proc/SetStunned()
return
/mob/proc/AdjustStunned()
return
/mob/proc/Stuttering()
return
/mob/proc/SetStuttering()
return
/mob/proc/AdjustStuttering()
return
/mob/proc/IsWeakened()
return weakened
/mob/proc/Weaken()
return
/mob/proc/SetWeakened()
return
/mob/proc/AdjustWeakened()
return
/mob/proc/adjust_bodytemperature(amount, min_temp = 0, max_temp = INFINITY)
if(bodytemperature >= min_temp && bodytemperature <= max_temp)
bodytemperature = clamp(bodytemperature + amount, min_temp, max_temp)
+1 -1
View File
@@ -23,7 +23,7 @@ GLOBAL_LIST_EMPTY(typing_indicator)
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(HAS_TRAIT(H, TRAIT_MUTE) || H.silent)
if(HAS_TRAIT(H, TRAIT_MUTE))
overlays -= GLOB.typing_indicator[bubble_icon]
return