mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 02:57:48 +01:00
Ports over the status effect unification
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
|
||||
if(language && (language.flags & NONVERBAL))
|
||||
if(disabilities & BLIND || blinded) //blind people can't see dumbass
|
||||
if(!can_see()) //blind people can't see dumbass
|
||||
message = stars(message)
|
||||
|
||||
if(!speaker || !(speaker in view(src)))
|
||||
@@ -65,7 +65,7 @@
|
||||
if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src))
|
||||
message = "<b>[message]</b>"
|
||||
|
||||
if(disabilities & DEAF || ear_deaf)
|
||||
if(!can_hear())
|
||||
if(!language || !(language.flags & INNATE)) // INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set
|
||||
if(speaker == src)
|
||||
to_chat(src, "<span class='warning'>You cannot hear yourself speak!</span>")
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
|
||||
if(language && (language.flags & NONVERBAL))
|
||||
if(disabilities & BLIND || blinded) //blind people can't see dumbass
|
||||
if(!can_see()) //blind people can't see dumbass
|
||||
message = stars(message)
|
||||
|
||||
if(!speaker || !(speaker in view(src)))
|
||||
@@ -182,7 +182,7 @@
|
||||
formatted = language.format_message_radio(message, verb)
|
||||
else
|
||||
formatted = "[verb], <span class=\"body\">\"[message]\"</span>"
|
||||
if(disabilities & DEAF || ear_deaf)
|
||||
if(!can_hear())
|
||||
if(prob(20))
|
||||
to_chat(src, "<span class='warning'>You feel your headset vibrate but can hear nothing from it!</span>")
|
||||
else if(track)
|
||||
|
||||
@@ -605,7 +605,7 @@
|
||||
return ..()
|
||||
|
||||
// Can we speak this language, as opposed to just understanding it?
|
||||
/mob/proc/can_speak(datum/language/speaking)
|
||||
/mob/proc/can_speak_language(datum/language/speaking)
|
||||
|
||||
return (universal_speak || (speaking && speaking.flags & INNATE) || speaking in src.languages)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ In all, this is a lot like the monkey code. /N
|
||||
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
sleeping = max(0,sleeping-5)
|
||||
AdjustSleeping(-5)
|
||||
resting = 0
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
|
||||
@@ -96,13 +96,15 @@
|
||||
|
||||
f_loss += 60
|
||||
|
||||
adjustEarDamage(30, 120)
|
||||
AdjustEarDamage(30)
|
||||
AdjustEarDeaf(120)
|
||||
|
||||
if(3.0)
|
||||
b_loss += 30
|
||||
if(prob(50) && !shielded)
|
||||
Paralyse(1)
|
||||
adjustEarDamage(15,60)
|
||||
AdjustEarDamage(15)
|
||||
AdjustEarDeaf(60)
|
||||
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
@@ -298,4 +300,4 @@
|
||||
return initial(pixel_x)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/get_permeability_protection()
|
||||
return 0.8
|
||||
return 0.8
|
||||
|
||||
@@ -57,13 +57,12 @@
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
SetSilence(0)
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain))
|
||||
death()
|
||||
blinded = 1
|
||||
stat = DEAD
|
||||
silent = 0
|
||||
SetSilence(0)
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
@@ -80,7 +79,7 @@
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
AdjustSleeping(-1)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
@@ -98,18 +97,18 @@
|
||||
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
AdjustEyeBlind(-1)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
AdjustEyeBlurry(-1)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
EarDeaf(1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
adjustEarDamage(0,-1)
|
||||
AdjustEarDeaf(-1)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
|
||||
adjustEarDamage(-0.05, 0)
|
||||
AdjustEarDamage(-0.05)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
@@ -123,11 +122,11 @@
|
||||
update_icons()
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
AdjustStuttering(-1)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
AdjustSilence(-1)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
AdjustDruggy(-1)
|
||||
return 1
|
||||
|
||||
@@ -88,13 +88,15 @@
|
||||
|
||||
f_loss += 60
|
||||
|
||||
adjustEarDamage(30,120)
|
||||
AdjustEarDamage(30)
|
||||
AdjustEarDeaf(120)
|
||||
|
||||
if(3.0)
|
||||
b_loss += 30
|
||||
if(prob(50))
|
||||
Paralyse(1)
|
||||
adjustEarDamage(15,60)
|
||||
AdjustEarDamage(15)
|
||||
AdjustEarDeaf(60)
|
||||
|
||||
adjustBruteLoss(b_loss)
|
||||
adjustFireLoss(f_loss)
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
|
||||
if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP
|
||||
blinded = 1
|
||||
silent = 0
|
||||
SetSilence(0)
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if(health < -25 || !get_int_organ(/obj/item/organ/internal/brain))
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
SetSilence(0)
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
@@ -39,7 +39,7 @@
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
else if(sleeping)
|
||||
sleeping = max(sleeping-1, 0)
|
||||
AdjustSleeping(-1)
|
||||
blinded = 1
|
||||
stat = UNCONSCIOUS
|
||||
if( prob(10) && health )
|
||||
@@ -57,32 +57,32 @@
|
||||
if(disabilities & BLIND) //disabled-blind, doesn't get better on its own
|
||||
blinded = 1
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
AdjustEyeBlind(-1)
|
||||
blinded = 1
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
AdjustEyeBlurry(-1)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
EarDeaf(1)
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
adjustEarDamage(0,-1)
|
||||
AdjustEarDeaf(-1)
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold.
|
||||
adjustEarDamage(-0.05,0)
|
||||
AdjustEarDamage(-0.05)
|
||||
|
||||
//Other
|
||||
if(stunned)
|
||||
AdjustStunned(-1)
|
||||
|
||||
if(weakened)
|
||||
weakened = max(weakened-1,0)
|
||||
AdjustWeakened(-1)
|
||||
|
||||
if(stuttering)
|
||||
stuttering = max(stuttering-1, 0)
|
||||
AdjustStuttering(-1)
|
||||
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
AdjustSilence(-1)
|
||||
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
return 1
|
||||
AdjustDruggy(-1)
|
||||
return 1
|
||||
|
||||
@@ -100,8 +100,8 @@ I'm using this for Stat to give it a more nifty interface to work with
|
||||
/mob/living/carbon/brain/can_safely_leave_loc()
|
||||
return 0 //You're not supposed to be ethereal jaunting, brains
|
||||
|
||||
/mob/living/carbon/brain/adjustEarDamage()
|
||||
/mob/living/carbon/brain/SetEarDamage() // no ears to damage or heal
|
||||
return
|
||||
|
||||
/mob/living/carbon/brain/setEarDamage() // no ears to damage or heal
|
||||
return
|
||||
/mob/living/carbon/brain/SetEarDeaf()
|
||||
return
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
/obj/item/organ/internal/brain/surgeryize()
|
||||
if(!owner)
|
||||
return
|
||||
owner.setEarDamage(0,0) //Yeah, didn't you...hear? The ears are totally inside the brain.
|
||||
owner.SetEarDeaf(0)
|
||||
owner.SetEarDamage(0) //Yeah, didn't you...hear? The ears are totally inside the brain.
|
||||
|
||||
/obj/item/organ/internal/brain/xeno
|
||||
name = "xenomorph brain"
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
|
||||
if(stat == DEAD)
|
||||
blinded = 1
|
||||
silent = 0
|
||||
SetSilence(0)
|
||||
else
|
||||
if(!container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)))
|
||||
death()
|
||||
blinded =1
|
||||
silent = 0
|
||||
blinded = 1
|
||||
SetSilence(0)
|
||||
return 1
|
||||
|
||||
. = 1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/mob/living/carbon/brain/Login()
|
||||
..()
|
||||
sleeping = 0
|
||||
SetSleeping(0)
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
src.brainmob.loc = src
|
||||
src.brainmob.container = src
|
||||
src.brainmob.stat = 0
|
||||
src.brainmob.silent = 0
|
||||
src.brainmob.SetSilence(0)
|
||||
dead_mob_list -= src.brainmob
|
||||
|
||||
..()
|
||||
|
||||
@@ -158,13 +158,13 @@
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>" \
|
||||
)
|
||||
jitteriness += 1000 //High numbers for violent convulsions
|
||||
AdjustJitter(1000) //High numbers for violent convulsions
|
||||
do_jitter_animation(jitteriness)
|
||||
stuttering += 2
|
||||
AdjustStuttering(2)
|
||||
if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5))
|
||||
Stun(2)
|
||||
spawn(20)
|
||||
jitteriness = max(jitteriness - 990, 10) //Still jittery, but vastly less
|
||||
AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less
|
||||
if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5))
|
||||
Stun(3)
|
||||
Weaken(3)
|
||||
@@ -268,7 +268,7 @@
|
||||
if(istype(src,/mob/living/carbon/human) && src:w_uniform)
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
AdjustSleeping(-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
AdjustParalysis(-3)
|
||||
@@ -327,8 +327,8 @@
|
||||
E.damage += rand(12, 16)
|
||||
|
||||
if(E.damage > E.min_bruised_damage)
|
||||
eye_blind += damage
|
||||
eye_blurry += damage * rand(3, 6)
|
||||
AdjustEyeBlind(damage)
|
||||
AdjustEyeBlurry(damage * rand(3, 6))
|
||||
|
||||
if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/mob/living/carbon/death(gibbed)
|
||||
losebreath = 0
|
||||
SetLoseBreath(0)
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
|
||||
if(reagents)
|
||||
reagents.death_metabolize(src)
|
||||
|
||||
..(gibbed)
|
||||
..(gibbed)
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
emote("deathgasp") //let the world KNOW WE ARE DEAD
|
||||
|
||||
stat = DEAD
|
||||
dizziness = 0
|
||||
jitteriness = 0
|
||||
SetDizzy(0)
|
||||
SetJitter(0)
|
||||
heart_attack = 0
|
||||
|
||||
//Handle species-specific deaths.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
act = copytext(act, 1, t1)
|
||||
|
||||
var/muzzled = is_muzzled()
|
||||
if(disabilities & MUTE || silent)
|
||||
if(!can_speak())
|
||||
muzzled = 1
|
||||
//var/m_type = 1
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
M = null
|
||||
|
||||
if(M)
|
||||
if(lying || weakened)
|
||||
if(lying)
|
||||
message = "<B>[src]</B> flops and flails around on the floor."
|
||||
else
|
||||
message = "<B>[src]</B> flips in [M]'s general direction."
|
||||
@@ -378,7 +378,7 @@
|
||||
message = "<B>[src]</B> faints."
|
||||
if(src.sleeping)
|
||||
return //Can't faint while asleep
|
||||
src.sleeping += 1
|
||||
AdjustSleeping(1)
|
||||
m_type = 1
|
||||
|
||||
if("cough", "coughs")
|
||||
|
||||
@@ -352,7 +352,8 @@
|
||||
else valid_limbs -= processing_dismember
|
||||
|
||||
if(!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs))
|
||||
adjustEarDamage(30, 120)
|
||||
AdjustEarDamage(30)
|
||||
AdjustEarDeaf(120)
|
||||
if(prob(70) && !shielded)
|
||||
Paralyse(10)
|
||||
|
||||
@@ -376,7 +377,8 @@
|
||||
else valid_limbs -= processing_dismember
|
||||
|
||||
if(!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs))
|
||||
adjustEarDamage(15,60)
|
||||
AdjustEarDamage(15)
|
||||
AdjustEarDeaf(60)
|
||||
if(prob(50) && !shielded)
|
||||
Paralyse(10)
|
||||
|
||||
@@ -491,8 +493,7 @@
|
||||
O.show_message(text("<span class='danger'>The [M.name] has shocked []!</span>", src), 1)
|
||||
|
||||
Weaken(power)
|
||||
if(stuttering < power)
|
||||
stuttering = power
|
||||
Stuttering(power)
|
||||
Stun(power)
|
||||
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
@@ -1728,7 +1729,7 @@
|
||||
if(last_special > world.time)
|
||||
return
|
||||
|
||||
if(stat || paralysis || stunned || weakened || lying || restrained() || buckled)
|
||||
if(!canmove)
|
||||
to_chat(src, "You cannot leap in your current state.")
|
||||
return
|
||||
|
||||
@@ -1782,7 +1783,7 @@
|
||||
if(last_special > world.time)
|
||||
return
|
||||
|
||||
if(stat || paralysis || stunned || weakened || lying)
|
||||
if(!canmove)
|
||||
to_chat(src, "\red You cannot do that in your current state.")
|
||||
return
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ emp_act
|
||||
visible_message("<span class='danger'>[src] has been knocked down!</span>", \
|
||||
"<span class='userdanger'>[src] has been knocked down!</span>")
|
||||
apply_effect(5, WEAKEN, armor)
|
||||
confused += 15
|
||||
AdjustConfused(15)
|
||||
if(prob(I.force + ((100 - health)/2)) && src != user && I.damtype == BRUTE)
|
||||
ticker.mode.remove_revolutionary(mind)
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
|
||||
// If we have the gene for being crazy, have random events.
|
||||
if(dna.GetSEState(HALLUCINATIONBLOCK))
|
||||
if(prob(1) && hallucination < 1)
|
||||
hallucination += 20
|
||||
if(prob(1))
|
||||
Hallucinate(20)
|
||||
|
||||
if(disabilities & COUGHING)
|
||||
if((prob(5) && paralysis <= 1))
|
||||
@@ -111,9 +111,9 @@
|
||||
if(disabilities & NERVOUS)
|
||||
speech_problem_flag = 1
|
||||
if(prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
Stuttering(10)
|
||||
|
||||
if(getBrainLoss() >= 60 && stat != 2)
|
||||
if(getBrainLoss() >= 60 && stat != DEAD)
|
||||
speech_problem_flag = 1
|
||||
if(prob(3))
|
||||
var/list/s1 = list("IM A PONY NEEEEEEIIIIIIIIIGH",
|
||||
@@ -152,8 +152,8 @@
|
||||
|
||||
if(getBrainLoss() >= 100 && stat != 2) //you lapse into a coma and die without immediate aid; RIP. -Fox
|
||||
Weaken(20)
|
||||
losebreath += 10
|
||||
silent += 2
|
||||
AdjustLoseBreath(10)
|
||||
AdjustSilence(2)
|
||||
|
||||
if(getBrainLoss() >= 120 && stat != 2) //they died from stupidity--literally. -Fox
|
||||
visible_message("<span class='alert'><B>[src]</B> goes limp, their facial expression utterly blank.</span>")
|
||||
@@ -281,10 +281,10 @@
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(health <= config.health_threshold_crit)
|
||||
losebreath++
|
||||
AdjustLoseBreath(1)
|
||||
|
||||
if(losebreath > 0)
|
||||
losebreath--
|
||||
if(lose_breath > 0)
|
||||
AdjustLoseBreath(-1)
|
||||
if(prob(10))
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
@@ -695,21 +695,21 @@
|
||||
else
|
||||
overeatduration -= 2
|
||||
|
||||
if(drowsyness)
|
||||
drowsyness--
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if(drowsy)
|
||||
AdjustDrowsy(-1)
|
||||
EyeBlurry(2)
|
||||
if(prob(5))
|
||||
sleeping += 1
|
||||
AdjustSleeping(1)
|
||||
Paralyse(5)
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
AdjustConfused(-1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
if(resting)
|
||||
dizziness = max(0, dizziness - 15)
|
||||
jitteriness = max(0, jitteriness - 15)
|
||||
AdjustDizzy(-15)
|
||||
AdjustJitter(-15)
|
||||
else
|
||||
dizziness = max(0, dizziness - 3)
|
||||
jitteriness = max(0, jitteriness - 3)
|
||||
AdjustDizzy(-3)
|
||||
AdjustJitter(-3)
|
||||
|
||||
if(species && species.flags & NO_INTORGANS) return
|
||||
|
||||
@@ -744,8 +744,7 @@
|
||||
alcohol_strength *= 5
|
||||
|
||||
if(alcohol_strength >= slur_start) //slurring
|
||||
if(!slurring) slurring = 1
|
||||
slurring = drunk
|
||||
Slur(drunk)
|
||||
if(alcohol_strength >= brawl_start) //the drunken martial art
|
||||
if(!istype(martial_art, /datum/martial_art/drunk_brawling))
|
||||
var/datum/martial_art/drunk_brawling/F = new
|
||||
@@ -754,18 +753,17 @@
|
||||
if(istype(martial_art, /datum/martial_art/drunk_brawling))
|
||||
martial_art.remove(src)
|
||||
if(alcohol_strength >= confused_start && prob(33)) //confused walking
|
||||
if(!confused) confused = 1
|
||||
confused = max(confused+(3/sober_str),0)
|
||||
if(!confused) Confused(1)
|
||||
AdjustConfused(3/sober_str)
|
||||
if(alcohol_strength >= blur_start) //blurry eyes
|
||||
eye_blurry = max(eye_blurry, 10/sober_str)
|
||||
drowsyness = max(drowsyness, 0)
|
||||
EyeBlurry(10/sober_str)
|
||||
if(!isSynthetic()) //stuff only for non-synthetics
|
||||
if(alcohol_strength >= vomit_start) //vomiting
|
||||
if(prob(8))
|
||||
fakevomit()
|
||||
if(alcohol_strength >= pass_out)
|
||||
Paralyse(5 / sober_str)
|
||||
drowsyness = max(drowsyness, 30/sober_str)
|
||||
Paralyse(5/sober_str)
|
||||
Drowsy(30/sober_str)
|
||||
if(L)
|
||||
L.take_damage(0.1, 1)
|
||||
adjustToxLoss(0.1)
|
||||
@@ -837,14 +835,14 @@
|
||||
vision = get_int_organ(species.vision_organ)
|
||||
|
||||
if(!species.vision_organ) // Presumably if a species has no vision organs, they see via some other means.
|
||||
eye_blind = 0
|
||||
SetEyeBlind(0)
|
||||
blinded = 0
|
||||
eye_blurry = 0
|
||||
SetEyeBlurry(0)
|
||||
|
||||
else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind.
|
||||
eye_blind = 1
|
||||
EyeBlind(1)
|
||||
blinded = 1
|
||||
eye_blurry = 1
|
||||
EyeBlurry(1)
|
||||
|
||||
else
|
||||
//blindness
|
||||
@@ -852,34 +850,34 @@
|
||||
blinded = 1
|
||||
|
||||
else if(eye_blind) // Blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
AdjustEyeBlind(-1)
|
||||
blinded = 1
|
||||
|
||||
else if(istype(glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) //resting your eyes with a blindfold heals blurry eyes faster
|
||||
eye_blurry = max(eye_blurry-3, 0)
|
||||
AdjustEyeBlurry(-3)
|
||||
blinded = 1
|
||||
|
||||
//blurry sight
|
||||
if(vision.is_bruised()) // Vision organs impaired? Permablurry.
|
||||
eye_blurry = 1
|
||||
EyeBlurry(1)
|
||||
|
||||
if(eye_blurry) // Blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
AdjustEyeBlurry(-1)
|
||||
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
EarDeaf(1)
|
||||
|
||||
else if(ear_deaf) //deafness, heals slowly over time
|
||||
adjustEarDamage(0,-1)
|
||||
AdjustEarDeaf(-1)
|
||||
|
||||
else if(istype(l_ear, /obj/item/clothing/ears/earmuffs) || istype(r_ear, /obj/item/clothing/ears/earmuffs)) //resting your ears with earmuffs heals ear damage faster
|
||||
adjustEarDamage(-0.15,0)
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
AdjustEarDamage(-0.15)
|
||||
EarDeaf(1)
|
||||
|
||||
else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs
|
||||
adjustEarDamage(-0.05,0)
|
||||
AdjustEarDamage(-0.05)
|
||||
|
||||
if(flying)
|
||||
animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING)
|
||||
@@ -896,7 +894,7 @@
|
||||
|
||||
else //dead
|
||||
blinded = 1
|
||||
silent = 0
|
||||
SetSilence(0)
|
||||
|
||||
|
||||
/mob/living/carbon/human/handle_vision()
|
||||
@@ -995,8 +993,8 @@
|
||||
|
||||
if(shock_stage >= 30)
|
||||
if(shock_stage == 30) custom_emote(1,"is having trouble keeping their eyes open.")
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
stuttering = max(stuttering, 5)
|
||||
EyeBlurry(2)
|
||||
Stuttering(5)
|
||||
|
||||
if(shock_stage == 40)
|
||||
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
|
||||
@@ -1183,8 +1181,7 @@
|
||||
if(!heart_attack)
|
||||
return
|
||||
else
|
||||
if(losebreath < 3)
|
||||
losebreath += 2
|
||||
AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3)
|
||||
adjustOxyLoss(5)
|
||||
adjustBruteLoss(1)
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
|
||||
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
H.sleeping = min(H.sleeping+2, 10)
|
||||
H.AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
spawn(0)
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
if(SA_pp > atmos_requirements["sa_para"]) // Enough to make us paralysed for a bit
|
||||
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > atmos_requirements["sa_sleep"]) // Enough to make us sleep as well
|
||||
H.sleeping = max(H.sleeping + 2, 10)
|
||||
H.AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
spawn(0)
|
||||
@@ -509,7 +509,7 @@
|
||||
if(tinted_weldhelh)
|
||||
H.overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
|
||||
if(H.tinttotal >= TINT_BLIND)
|
||||
H.eye_blind = max(H.eye_blind, 1)
|
||||
H.EyeBlind(1)
|
||||
else
|
||||
H.clear_fullscreen("tint")
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
if(health <= config.health_threshold_crit)
|
||||
losebreath++
|
||||
AdjustLoseBreath(1)
|
||||
|
||||
if(losebreath > 0)
|
||||
losebreath--
|
||||
if(lose_breath > 0)
|
||||
AdjustLoseBreath(-1)
|
||||
if(prob(10))
|
||||
spawn emote("gasp")
|
||||
if(istype(loc, /obj/))
|
||||
@@ -165,7 +165,7 @@
|
||||
if(SA_partialpressure > SA_para_min)
|
||||
Paralyse(3)
|
||||
if(SA_partialpressure > SA_sleep_min)
|
||||
sleeping = max(sleeping+2, 10)
|
||||
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_partialpressure > 0.01)
|
||||
if(prob(20))
|
||||
spawn(0) emote(pick("giggle","laugh"))
|
||||
@@ -319,30 +319,27 @@
|
||||
C.pixel_x -= pixel_x_diff
|
||||
C.pixel_y -= pixel_y_diff
|
||||
src = oldsrc
|
||||
dizziness = max(dizziness - restingpwr, 0)
|
||||
AdjustDizzy(-restingpwr)
|
||||
|
||||
if(drowsyness)
|
||||
drowsyness = max(drowsyness - restingpwr, 0)
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if(drowsy)
|
||||
AdjustDrowsy(-restingpwr)
|
||||
EyeBlurry(2)
|
||||
if(prob(5))
|
||||
sleeping += 1
|
||||
AdjustSleeping(1)
|
||||
Paralyse(5)
|
||||
|
||||
if(confused)
|
||||
confused = max(0, confused - 1)
|
||||
AdjustConfused(-1)
|
||||
|
||||
//Jitteryness
|
||||
if(jitteriness)
|
||||
do_jitter_animation(jitteriness)
|
||||
jitteriness = max(jitteriness - restingpwr, 0)
|
||||
AdjustJitter(-restingpwr)
|
||||
|
||||
if(hallucination)
|
||||
spawn handle_hallucinations()
|
||||
|
||||
if(hallucination<=2)
|
||||
hallucination = 0
|
||||
else
|
||||
hallucination -= 2
|
||||
AdjustHallucinate(-2)
|
||||
|
||||
/mob/living/carbon/handle_sleeping()
|
||||
if(..())
|
||||
@@ -352,8 +349,8 @@
|
||||
spawn(0)
|
||||
emote("snore")
|
||||
// Keep SSD people asleep
|
||||
if(player_logged && sleeping < 2)
|
||||
sleeping = 2
|
||||
if(player_logged)
|
||||
Sleeping(2)
|
||||
return sleeping
|
||||
|
||||
|
||||
|
||||
@@ -208,25 +208,25 @@
|
||||
if(src.stuttering) src.stuttering = 0
|
||||
|
||||
if(src.eye_blind)
|
||||
src.eye_blind = 0
|
||||
src.SetEyeBlind(0)
|
||||
src.blinded = 1
|
||||
|
||||
if(src.ear_deaf > 0) src.ear_deaf = 0
|
||||
if(src.ear_deaf > 0) SetEarDeaf(0)
|
||||
if(src.ear_damage < 25)
|
||||
src.ear_damage = 0
|
||||
SetEarDamage(0)
|
||||
|
||||
src.density = !( src.lying )
|
||||
|
||||
if(src.disabilities & BLIND)
|
||||
src.blinded = 1
|
||||
if(src.disabilities & DEAF)
|
||||
src.ear_deaf = 1
|
||||
EarDeaf(1)
|
||||
|
||||
if(src.eye_blurry > 0)
|
||||
src.eye_blurry = 0
|
||||
SetEyeBlurry(0)
|
||||
|
||||
if(src.druggy > 0)
|
||||
src.druggy = 0
|
||||
SetDruggy(0)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -57,17 +57,16 @@
|
||||
rad_damage = max(effect * ((100-run_armor_check(null, "rad", "Your clothes feel warm.", "Your clothes feel warm."))/100),0)
|
||||
radiation += rad_damage
|
||||
if(SLUR)
|
||||
slurring = max(slurring,(effect * blocked))
|
||||
Slur(effect * blocked)
|
||||
if(STUTTER)
|
||||
if(status_flags & CANSTUN) // stun is usually associated with stutter
|
||||
stuttering = max(stuttering,(effect * blocked))
|
||||
Stuttering(effect * blocked)
|
||||
if(EYE_BLUR)
|
||||
eye_blurry = max(eye_blurry,(effect * blocked))
|
||||
EyeBlurry(effect * blocked)
|
||||
if(DROWSY)
|
||||
drowsyness = max(drowsyness,(effect * blocked))
|
||||
Drowsy(effect * blocked)
|
||||
if(JITTER)
|
||||
if(status_flags & CANSTUN)
|
||||
jitteriness = max(jitteriness,(effect * blocked))
|
||||
Jitter(effect * blocked)
|
||||
updatehealth()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -136,17 +136,17 @@
|
||||
|
||||
/mob/living/proc/handle_silent()
|
||||
if(silent)
|
||||
silent = max(silent-1, 0)
|
||||
AdjustSilence(-1)
|
||||
return silent
|
||||
|
||||
/mob/living/proc/handle_drugged()
|
||||
if(druggy)
|
||||
druggy = max(druggy-1, 0)
|
||||
AdjustDruggy(-1)
|
||||
return druggy
|
||||
|
||||
/mob/living/proc/handle_slurring()
|
||||
if(slurring)
|
||||
slurring = max(slurring-1, 0)
|
||||
AdjustSlur(-1)
|
||||
return slurring
|
||||
|
||||
/mob/living/proc/handle_paralysed()
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
/mob/living/proc/handle_slowed()
|
||||
if(slowed)
|
||||
slowed = max(slowed-1, 0)
|
||||
AdjustSlowed(-1)
|
||||
return slowed
|
||||
|
||||
/mob/living/proc/handle_drunk()
|
||||
@@ -175,19 +175,20 @@
|
||||
/mob/living/proc/handle_disabilities()
|
||||
//Eyes
|
||||
if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own
|
||||
eye_blind = max(eye_blind, 1)
|
||||
EyeBlind(1)
|
||||
else if(eye_blind) //blindness, heals slowly over time
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
AdjustEyeBlind(-1)
|
||||
else if(eye_blurry) //blurry eyes heal slowly
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
AdjustEyeBlurry(-1)
|
||||
|
||||
//Ears
|
||||
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
|
||||
setEarDamage(-1, max(ear_deaf, 1))
|
||||
EarDeaf(1)
|
||||
else
|
||||
// deafness heals slowly over time, unless ear_damage is over 100
|
||||
if(ear_damage < 100)
|
||||
adjustEarDamage(-0.05,-1)
|
||||
AdjustEarDamage(-0.05)
|
||||
AdjustEarDeaf(-1)
|
||||
|
||||
//this handles hud updates. Calls update_vision() and handle_hud_icons()
|
||||
/mob/living/proc/handle_regular_hud_updates()
|
||||
|
||||
@@ -261,19 +261,6 @@
|
||||
var/obj/item/organ/external/def_zone = ran_zone(t)
|
||||
return def_zone
|
||||
|
||||
|
||||
//damage/heal the mob ears and adjust the deaf amount
|
||||
/mob/living/adjustEarDamage(damage, deaf)
|
||||
ear_damage = max(0, ear_damage + damage)
|
||||
ear_deaf = max(0, ear_deaf + deaf)
|
||||
|
||||
//pass a negative argument to skip one of the variable
|
||||
/mob/living/setEarDamage(damage, deaf)
|
||||
if(damage >= 0)
|
||||
ear_damage = damage
|
||||
if(deaf >= 0)
|
||||
ear_deaf = deaf
|
||||
|
||||
// heal ONE external organ, organ gets randomly selected from damaged ones.
|
||||
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
|
||||
adjustBruteLoss(-brute)
|
||||
@@ -328,8 +315,8 @@
|
||||
dead_mob_list -= src
|
||||
living_mob_list |= src
|
||||
mob_list |= src
|
||||
setEarDamage(-1,0)
|
||||
timeofdeath = 0
|
||||
SetEarDeaf(0)
|
||||
timeofdeath = null
|
||||
|
||||
/mob/living/proc/rejuvenate()
|
||||
var/mob/living/carbon/human/human_mob = null //Get this declared for use later.
|
||||
@@ -344,22 +331,30 @@
|
||||
SetParalysis(0)
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
slowed = 0
|
||||
losebreath = 0
|
||||
dizziness = 0
|
||||
jitteriness = 0
|
||||
confused = 0
|
||||
drowsyness = 0
|
||||
SetSlowed(0)
|
||||
SetLoseBreath(0)
|
||||
SetDizzy(0)
|
||||
SetJitter(0)
|
||||
SetConfused(0)
|
||||
SetDrowsy(0)
|
||||
radiation = 0
|
||||
druggy = 0
|
||||
hallucination = 0
|
||||
SetDruggy(0)
|
||||
SetHallucinate(0)
|
||||
blinded = 0
|
||||
nutrition = 400
|
||||
bodytemperature = 310
|
||||
disabilities = 0
|
||||
blinded = 0
|
||||
eye_blind = 0
|
||||
eye_blurry = 0
|
||||
setEarDamage(0,0)
|
||||
CureBlind()
|
||||
CureNearsighted()
|
||||
CureMute()
|
||||
CureDeaf()
|
||||
CureTourettes()
|
||||
CureEpilepsy()
|
||||
CureCoughing()
|
||||
CureNervous()
|
||||
SetEyeBlind(0)
|
||||
SetEyeBlurry(0)
|
||||
SetEarDamage(0)
|
||||
SetEarDeaf(0)
|
||||
heal_overall_damage(1000, 1000)
|
||||
ExtinguishMob()
|
||||
fire_stacks = 0
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot.
|
||||
var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this.
|
||||
|
||||
var/hallucination = 0 //Directly affects how long a mob will hallucinate for
|
||||
|
||||
|
||||
var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out.
|
||||
|
||||
@@ -32,7 +30,6 @@
|
||||
|
||||
var/update_slimes = 1
|
||||
var/implanting = 0 //Used for the mind-slave implant
|
||||
var/silent = 0 //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU.
|
||||
var/floating = 0
|
||||
var/mob_size = MOB_SIZE_HUMAN
|
||||
var/nightvision = 0
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
if(!key) //key and mind have become seperated. I believe this is for when a staff member aghosts.
|
||||
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(sleeping < 2 && mind.active)
|
||||
sleeping = 2
|
||||
player_logged = 1
|
||||
if(mind.active)
|
||||
Sleeping(2)
|
||||
player_logged = 1
|
||||
|
||||
@@ -82,7 +82,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client)
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && T.z == z_level && !isdeaf(M))
|
||||
if(T && T.z == z_level && M.can_hear())
|
||||
M << voice
|
||||
else
|
||||
only_listener << voice
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/silicon/Login()
|
||||
sleeping = 0
|
||||
SetSleeping(0)
|
||||
if(mind && ticker && ticker.mode)
|
||||
ticker.mode.remove_revolutionary(mind, 1)
|
||||
ticker.mode.remove_cultist(mind, 1)
|
||||
@@ -9,4 +9,4 @@
|
||||
ticker.mode.remove_thrall(mind, 0)
|
||||
ticker.mode.remove_shadowling(mind)
|
||||
ticker.mode.remove_abductor(mind)
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
if(sleeping)
|
||||
Paralyse(3)
|
||||
sleeping--
|
||||
AdjustSleeping(-1)
|
||||
|
||||
if(resting)
|
||||
Weaken(5)
|
||||
@@ -90,7 +90,7 @@
|
||||
stat = UNCONSCIOUS
|
||||
|
||||
if(!paralysis > 0)
|
||||
eye_blind = 0
|
||||
SetEyeBlind(0)
|
||||
|
||||
else
|
||||
stat = CONSCIOUS
|
||||
@@ -98,7 +98,7 @@
|
||||
diag_hud_set_health()
|
||||
diag_hud_set_status()
|
||||
else //dead
|
||||
eye_blind = 1
|
||||
SetEyeBlind(0)
|
||||
|
||||
//update the state of modules and components here
|
||||
if(stat != CONSCIOUS)
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
//Silicon mob language procs
|
||||
|
||||
/mob/living/silicon/can_speak(datum/language/speaking)
|
||||
/mob/living/silicon/can_speak_language(datum/language/speaking)
|
||||
return universal_speak || (speaking in src.speech_synthesizer_langs) //need speech synthesizer support to vocalize a language
|
||||
|
||||
/mob/living/silicon/add_language(var/language, var/can_speak=1)
|
||||
@@ -355,8 +355,8 @@
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
|
||||
/mob/living/silicon/adjustEarDamage()
|
||||
/mob/living/silicon/SetEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/silicon/setEarDamage()
|
||||
return
|
||||
/mob/living/silicon/SetEarDeaf()
|
||||
return
|
||||
|
||||
@@ -118,11 +118,11 @@
|
||||
for(var/atom/check in check_list)
|
||||
for(var/mob/living/M in viewers(world.view + 1, check) - src)
|
||||
if(M.client && CanAttack(M) && !M.has_unlimited_silicon_privilege)
|
||||
if(!M.eye_blind)
|
||||
if(M.can_see())
|
||||
return M
|
||||
for(var/obj/mecha/M in view(world.view + 1, check)) //assuming if you can see them they can see you
|
||||
if(M.occupant && M.occupant.client)
|
||||
if(!M.occupant.eye_blind)
|
||||
if(M.occupant.can_see())
|
||||
return M.occupant
|
||||
return null
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
continue
|
||||
var/turf/T = get_turf(L.loc)
|
||||
if(T && T in targets)
|
||||
L.eye_blind = max(L.eye_blind, 4)
|
||||
L.EyeBlind(4)
|
||||
return
|
||||
|
||||
//Toggle Night Vision
|
||||
|
||||
@@ -706,8 +706,8 @@
|
||||
/mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/adjustEarDamage()
|
||||
/mob/living/simple_animal/SetEarDamage()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/setEarDamage()
|
||||
return
|
||||
/mob/living/simple_animal/SetEarDeaf()
|
||||
return
|
||||
|
||||
@@ -0,0 +1,522 @@
|
||||
//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
|
||||
|
||||
/*
|
||||
* EyesBlocked
|
||||
Your eyes are covered somehow
|
||||
* EarsBlocked
|
||||
Your ears are covered somehow
|
||||
* Resting
|
||||
You are lying down of your own volition
|
||||
* Flying
|
||||
For some reason or another you can move while not touching the ground
|
||||
*/
|
||||
|
||||
|
||||
// STATUS EFFECTS
|
||||
// All of these decrement over time - at a rate of 1 per life cycle unless otherwise noted
|
||||
// Status effects sorted alphabetically:
|
||||
/*
|
||||
* Confused *
|
||||
Movement is scrambled
|
||||
* Dizzy *
|
||||
The screen goes all warped
|
||||
* Drowsy
|
||||
You begin to yawn, and have a chance of incrementing "Paralysis"
|
||||
* Druggy *
|
||||
A trippy overlay appears.
|
||||
* Drunk *
|
||||
Essentially what your "BAC" is - the higher it is, the more alcohol you have in you
|
||||
* EarDamage *
|
||||
Doesn't do much, but if it's 25+, you go deaf. Heals much slower than other statuses - 0.05 normally
|
||||
* EarDeaf *
|
||||
You cannot hear. Prevents EarDamage from healing naturally.
|
||||
* EyeBlind *
|
||||
You cannot see. Prevents EyeBlurry from healing naturally.
|
||||
* EyeBlurry *
|
||||
A hazy overlay appears on your screen.
|
||||
* Hallucination *
|
||||
Your character will imagine various effects happening to them, vividly.
|
||||
* Jitter *
|
||||
Your character will visibly twitch. Higher values amplify the effect.
|
||||
* LoseBreath *
|
||||
Your character is unable to breathe.
|
||||
* Paralysis *
|
||||
Your character is knocked out.
|
||||
* Silent *
|
||||
Your character is unable to speak.
|
||||
* Sleeping *
|
||||
Your character is asleep.
|
||||
* Slowed *
|
||||
Your character moves slower.
|
||||
* Slurring *
|
||||
Your character cannot enunciate clearly.
|
||||
* Stunned *
|
||||
Your character is unable to move, and drops stuff in their hands. They keep standing, though.
|
||||
* Stuttering *
|
||||
Your character stutters parts of their messages.
|
||||
* Weakened *
|
||||
Your character collapses, but is still conscious.
|
||||
*/
|
||||
|
||||
// DISABILITIES
|
||||
// These are more permanent than the above.
|
||||
// Disabilities sorted alphabetically
|
||||
/*
|
||||
* Blind (32)
|
||||
Can't see. EyeBlind does not heal when this is active.
|
||||
* Coughing (4)
|
||||
Cough occasionally, causing you to drop your items
|
||||
* Deaf (128)
|
||||
Can't hear. EarDeaf does not heal when this is active
|
||||
* Epilepsy (2)
|
||||
Occasionally go "Epileptic", causing you to become very twitchy, drop all items, and fall to the floor
|
||||
* Mute (64)
|
||||
Cannot talk.
|
||||
* Nearsighted (1)
|
||||
My glasses! I can't see without my glasses! (Nearsighted overlay when not wearing prescription eyewear)
|
||||
* Nervous (16)
|
||||
Occasionally begin to stutter.
|
||||
* Tourettes (8)
|
||||
SHIT (say bad words, and drop stuff occasionally)
|
||||
*/
|
||||
|
||||
/mob/living
|
||||
|
||||
// Booleans
|
||||
var/resting = FALSE
|
||||
|
||||
/*
|
||||
STATUS EFFECTS
|
||||
*/
|
||||
|
||||
/mob // On `/mob` for now, to support legacy code
|
||||
var/confused = 0
|
||||
var/dizziness = 0
|
||||
var/drowsy = 0
|
||||
var/druggy = 0
|
||||
var/drunk = 0
|
||||
var/ear_damage = 0
|
||||
var/ear_deaf = 0
|
||||
var/eye_blind = 0
|
||||
var/eye_blurry = 0
|
||||
var/hallucination = 0
|
||||
var/jitteriness = 0
|
||||
var/lose_breath = 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
|
||||
|
||||
/mob/living
|
||||
// Bitfields
|
||||
var/disabilities = 0
|
||||
|
||||
// RESTING
|
||||
|
||||
/mob/living/proc/StartResting(updating = 1)
|
||||
var/val_change = !resting
|
||||
resting = TRUE
|
||||
if(updating && val_change)
|
||||
update_canmove()
|
||||
|
||||
/mob/living/proc/StopResting(updating = 1)
|
||||
var/val_change = !!resting
|
||||
resting = FALSE
|
||||
if(updating && val_change)
|
||||
update_canmove()
|
||||
|
||||
/mob/living/proc/StartFlying()
|
||||
var/val_change = !flying
|
||||
flying = TRUE
|
||||
if(val_change)
|
||||
update_animations()
|
||||
|
||||
/mob/living/proc/StopFlying()
|
||||
var/val_change = !!flying
|
||||
flying = FALSE
|
||||
if(val_change)
|
||||
update_animations()
|
||||
|
||||
|
||||
// SCALAR STATUS EFFECTS
|
||||
|
||||
// CONFUSED
|
||||
|
||||
/mob/living/Confused(amount)
|
||||
SetConfused(max(confused, amount))
|
||||
|
||||
/mob/living/SetConfused(amount)
|
||||
confused = max(amount, 0)
|
||||
|
||||
/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)
|
||||
|
||||
// DIZZY
|
||||
|
||||
/mob/living/Dizzy(amount)
|
||||
SetDizzy(max(dizziness, amount))
|
||||
|
||||
/mob/living/SetDizzy(amount)
|
||||
dizziness = max(amount, 0)
|
||||
|
||||
/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)
|
||||
|
||||
// DROWSY
|
||||
|
||||
/mob/living/Drowsy(amount)
|
||||
SetDrowsy(max(drowsy, amount))
|
||||
|
||||
/mob/living/SetDrowsy(amount)
|
||||
drowsy = max(amount, 0)
|
||||
|
||||
/mob/living/AdjustDrowsy(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
var/new_value = directional_bounded_sum(drowsy, amount, bound_lower, bound_upper)
|
||||
SetDrowsy(new_value)
|
||||
|
||||
// DRUNK
|
||||
|
||||
/mob/living/Drunk(amount)
|
||||
SetDrunk(max(drunk, amount))
|
||||
|
||||
/mob/living/SetDrunk(amount)
|
||||
drunk = max(amount, 0)
|
||||
|
||||
/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)
|
||||
|
||||
// DRUGGY
|
||||
|
||||
/mob/living/Druggy(amount)
|
||||
SetDruggy(max(druggy, amount))
|
||||
|
||||
/mob/living/SetDruggy(amount)
|
||||
var/old_val = druggy
|
||||
druggy = max(amount, 0)
|
||||
// We transitioned to/from 0, so update the druggy overlays
|
||||
if((old_val == 0 || druggy == 0) && (old_val != druggy))
|
||||
update_druggy_effects()
|
||||
|
||||
/mob/living/AdjustDruggy(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
var/new_value = directional_bounded_sum(druggy, amount, bound_lower, bound_upper)
|
||||
SetDruggy(new_value)
|
||||
|
||||
// EAR_DAMAGE
|
||||
|
||||
/mob/living/EarDamage(amount)
|
||||
SetEarDamage(max(ear_damage, amount))
|
||||
|
||||
/mob/living/SetEarDamage(amount)
|
||||
ear_damage = max(amount, 0)
|
||||
|
||||
/mob/living/AdjustEarDamage(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
var/new_value = directional_bounded_sum(ear_damage, amount, bound_lower, bound_upper)
|
||||
SetEarDamage(new_value)
|
||||
|
||||
// EAR_DEAF
|
||||
|
||||
/mob/living/EarDeaf(amount)
|
||||
SetEarDeaf(max(ear_deaf, amount))
|
||||
|
||||
/mob/living/SetEarDeaf(amount)
|
||||
ear_deaf = max(amount, 0)
|
||||
|
||||
/mob/living/AdjustEarDeaf(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
var/new_value = directional_bounded_sum(ear_deaf, amount, bound_lower, bound_upper)
|
||||
SetEarDeaf(new_value)
|
||||
|
||||
// EYE_BLIND
|
||||
|
||||
/mob/living/EyeBlind(amount)
|
||||
SetEyeBlind(max(eye_blind, amount))
|
||||
|
||||
/mob/living/SetEyeBlind(amount)
|
||||
var/old_val = eye_blind
|
||||
eye_blind = max(amount, 0)
|
||||
// We transitioned to/from 0, so update the eye blind overlays
|
||||
if((old_val == 0 || eye_blind == 0) && (old_val != eye_blind))
|
||||
update_blind_effects()
|
||||
|
||||
/mob/living/AdjustEyeBlind(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
var/new_value = directional_bounded_sum(eye_blind, amount, bound_lower, bound_upper)
|
||||
SetEyeBlind(new_value)
|
||||
|
||||
// EYE_BLURRY
|
||||
|
||||
/mob/living/EyeBlurry(amount)
|
||||
SetEyeBlurry(max(eye_blurry, amount))
|
||||
|
||||
/mob/living/SetEyeBlurry(amount)
|
||||
var/old_val = eye_blurry
|
||||
eye_blurry = max(amount, 0)
|
||||
// We transitioned to/from 0, so update the eye blur overlays
|
||||
if((old_val == 0 || eye_blurry == 0) && (old_val != eye_blurry))
|
||||
update_blurry_effects()
|
||||
|
||||
/mob/living/AdjustEyeBlurry(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
var/new_value = directional_bounded_sum(eye_blurry, amount, bound_lower, bound_upper)
|
||||
SetEyeBlurry(new_value)
|
||||
|
||||
// HALLUCINATION
|
||||
|
||||
/mob/living/Hallucinate(amount)
|
||||
SetHallucinate(max(hallucination, amount))
|
||||
|
||||
/mob/living/SetHallucinate(amount)
|
||||
hallucination = max(amount, 0)
|
||||
|
||||
/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)
|
||||
|
||||
// JITTER
|
||||
|
||||
/mob/living/Jitter(amount, force = 0)
|
||||
SetJitter(max(jitteriness, amount), force)
|
||||
|
||||
/mob/living/SetJitter(amount, force = 0)
|
||||
// Jitter is also associated with stun
|
||||
if(status_flags & CANSTUN || force)
|
||||
jitteriness = max(amount, 0)
|
||||
else
|
||||
jitteriness = 0
|
||||
|
||||
/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)
|
||||
|
||||
// LOSE_BREATH
|
||||
|
||||
/mob/living/LoseBreath(amount)
|
||||
SetLoseBreath(max(lose_breath, amount))
|
||||
|
||||
/mob/living/SetLoseBreath(amount)
|
||||
lose_breath = max(amount, 0)
|
||||
|
||||
/mob/living/AdjustLoseBreath(amount, bound_lower = 0, bound_upper = INFINITY)
|
||||
var/new_value = directional_bounded_sum(lose_breath, amount, bound_lower, bound_upper)
|
||||
SetLoseBreath(new_value)
|
||||
|
||||
// PARALYSE
|
||||
|
||||
/mob/living/Paralyse(amount, updating = 1, force = 0)
|
||||
SetParalysis(max(paralysis, amount), updating, force)
|
||||
|
||||
/mob/living/SetParalysis(amount, updating = 1, force = 0)
|
||||
if(status_flags & CANPARALYSE || force)
|
||||
paralysis = max(amount, 0)
|
||||
else
|
||||
paralysis = 0
|
||||
if(updating)
|
||||
update_canmove()
|
||||
update_stat()
|
||||
|
||||
/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)
|
||||
SetParalysis(new_value, updating, force)
|
||||
|
||||
// SILENT
|
||||
|
||||
/mob/living/Silence(amount)
|
||||
SetSilence(max(silent, amount))
|
||||
|
||||
/mob/living/SetSilence(amount)
|
||||
silent = max(amount, 0)
|
||||
|
||||
/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)
|
||||
|
||||
// SLEEPING
|
||||
|
||||
/mob/living/Sleeping(amount, updating = 1)
|
||||
SetSleeping(max(sleeping, amount), updating)
|
||||
|
||||
/mob/living/SetSleeping(amount, updating = 1)
|
||||
sleeping = max(amount, 0)
|
||||
update_sleeping_effects()
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/AdjustSleeping(amount, bound_lower = 0, bound_upper = INFINITY, updating = 1)
|
||||
var/new_value = directional_bounded_sum(sleeping, amount, bound_lower, bound_upper)
|
||||
SetSleeping(new_value, updating)
|
||||
|
||||
// SLOWED
|
||||
|
||||
/mob/living/Slowed(amount, updating = 1)
|
||||
SetSlowed(max(slowed, amount), updating)
|
||||
|
||||
/mob/living/SetSlowed(amount, updating = 1)
|
||||
slowed = max(amount, 0)
|
||||
|
||||
/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)
|
||||
|
||||
// SLURRING
|
||||
|
||||
/mob/living/Slur(amount)
|
||||
SetSlur(max(slurring, amount))
|
||||
|
||||
/mob/living/SetSlur(amount)
|
||||
slurring = max(amount, 0)
|
||||
|
||||
/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)
|
||||
|
||||
// STUN
|
||||
|
||||
/mob/living/Stun(amount, updating = 1, force = 0)
|
||||
SetStunned(max(stunned, amount), updating, force)
|
||||
|
||||
/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"
|
||||
if(status_flags & CANSTUN || force)
|
||||
stunned = max(amount, 0)
|
||||
else if(stunned)
|
||||
stunned = 0
|
||||
if(updating)
|
||||
update_canmove()
|
||||
|
||||
/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)
|
||||
SetStunned(new_value, updating, force)
|
||||
|
||||
// STUTTERING
|
||||
|
||||
|
||||
/mob/living/Stuttering(amount, force = 0)
|
||||
SetStuttering(max(stuttering, amount), force)
|
||||
|
||||
/mob/living/SetStuttering(amount, force = 0)
|
||||
//From mob/living/apply_effect: "Stuttering is often associated with Stun"
|
||||
if(status_flags & CANSTUN || force)
|
||||
stuttering = max(stuttering, 0)
|
||||
else
|
||||
stuttering = 0
|
||||
|
||||
/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)
|
||||
|
||||
// WEAKEN
|
||||
|
||||
/mob/living/Weaken(amount, updating = 1, force = 0)
|
||||
SetWeakened(max(weakened, amount), updating, force)
|
||||
|
||||
/mob/living/SetWeakened(amount, updating = 1, force = 0)
|
||||
if(status_flags & CANWEAKEN || force)
|
||||
weakened = max(amount, 0)
|
||||
else
|
||||
weakened = 0
|
||||
if(updating)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
|
||||
/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)
|
||||
SetWeakened(new_value, updating, force)
|
||||
|
||||
//
|
||||
// DISABILITIES
|
||||
//
|
||||
|
||||
// Blind
|
||||
|
||||
/mob/living/proc/BecomeBlind()
|
||||
var/val_change = !(disabilities & BLIND)
|
||||
disabilities |= BLIND
|
||||
if(val_change)
|
||||
update_blind_effects()
|
||||
|
||||
/mob/living/proc/CureBlind()
|
||||
var/val_change = !!(disabilities & BLIND)
|
||||
disabilities &= ~BLIND
|
||||
if(val_change)
|
||||
update_blind_effects()
|
||||
|
||||
// Coughing
|
||||
|
||||
/mob/living/proc/BecomeCoughing()
|
||||
disabilities |= COUGHING
|
||||
|
||||
/mob/living/proc/CureCoughing()
|
||||
disabilities &= ~COUGHING
|
||||
|
||||
// Deaf
|
||||
|
||||
/mob/living/proc/BecomeDeaf()
|
||||
disabilities |= DEAF
|
||||
|
||||
/mob/living/proc/CureDeaf()
|
||||
disabilities &= ~DEAF
|
||||
|
||||
// Epilepsy
|
||||
|
||||
/mob/living/proc/BecomeEpilepsy()
|
||||
disabilities |= EPILEPSY
|
||||
|
||||
/mob/living/proc/CureEpilepsy()
|
||||
disabilities &= ~EPILEPSY
|
||||
|
||||
// Mute
|
||||
|
||||
/mob/living/proc/BecomeMute()
|
||||
disabilities |= MUTE
|
||||
|
||||
/mob/living/proc/CureMute()
|
||||
disabilities &= ~MUTE
|
||||
|
||||
// Nearsighted
|
||||
|
||||
/mob/living/proc/BecomeNearsighted()
|
||||
var/val_change = !(disabilities & NEARSIGHTED)
|
||||
disabilities |= NEARSIGHTED
|
||||
if(val_change)
|
||||
update_nearsighted_effects()
|
||||
|
||||
/mob/living/proc/CureNearsighted()
|
||||
var/val_change = !!(disabilities & NEARSIGHTED)
|
||||
disabilities &= ~NEARSIGHTED
|
||||
if(val_change)
|
||||
update_nearsighted_effects()
|
||||
|
||||
// Nervous
|
||||
|
||||
/mob/living/proc/BecomeNervous()
|
||||
disabilities |= NERVOUS
|
||||
|
||||
/mob/living/proc/CureNervous()
|
||||
disabilities &= ~NERVOUS
|
||||
|
||||
// Tourettes
|
||||
|
||||
/mob/living/proc/BecomeTourettes()
|
||||
disabilities |= TOURETTES
|
||||
|
||||
/mob/living/proc/CureTourettes()
|
||||
disabilities &= ~TOURETTES
|
||||
@@ -0,0 +1,97 @@
|
||||
/mob/living/update_blind_effects()
|
||||
if(!can_see())
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
throw_alert("blind", /obj/screen/alert/blind)
|
||||
return 1
|
||||
else
|
||||
clear_fullscreen("blind")
|
||||
clear_alert("blind")
|
||||
return 0
|
||||
|
||||
/mob/living/update_blurry_effects()
|
||||
if(eyes_blurred())
|
||||
overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
|
||||
return 1
|
||||
else
|
||||
clear_fullscreen("blurry")
|
||||
return 0
|
||||
|
||||
/mob/living/update_druggy_effects()
|
||||
if(druggy)
|
||||
overlay_fullscreen("high", /obj/screen/fullscreen/high)
|
||||
throw_alert("high", /obj/screen/alert/high)
|
||||
else
|
||||
clear_fullscreen("high")
|
||||
clear_alert("high")
|
||||
|
||||
/mob/living/update_nearsighted_effects()
|
||||
if(disabilities & NEARSIGHTED)
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
else
|
||||
clear_fullscreen("nearsighted")
|
||||
|
||||
/mob/living/update_sleeping_effects()
|
||||
if(sleeping)
|
||||
throw_alert("asleep", /obj/screen/alert/asleep)
|
||||
else
|
||||
clear_alert("asleep")
|
||||
|
||||
// Querying status of the mob
|
||||
|
||||
// Whether the mob can hear things
|
||||
/mob/living/can_hear()
|
||||
return !(ear_deaf || (disabilities & DEAF))
|
||||
|
||||
// Whether the mob is able to see
|
||||
/mob/living/can_see()
|
||||
return !(eye_blind || (disabilities & BLIND) || stat)
|
||||
|
||||
// Whether the mob is capable of talking
|
||||
/mob/living/can_speak()
|
||||
return !(silent || (disabilities & MUTE) || is_muzzled())
|
||||
|
||||
// Whether the mob is capable of standing or not
|
||||
/mob/living/proc/can_stand()
|
||||
return !(weakened || paralysis || stat || (status_flags & FAKEDEATH))
|
||||
|
||||
// Whether the mob is capable of actions or not
|
||||
/mob/living/incapacitated(ignore_restraints = 0, ignore_grab = 0, ignore_lying = 0)
|
||||
if(stat || paralysis || stunned || (weakened && lying) || (!ignore_restraints && restrained()) || (!ignore_lying && lying))
|
||||
return 1
|
||||
|
||||
// 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)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
if(buckled)
|
||||
lying = 90 * buckle_lying
|
||||
else if((fall_over || resting) && !lying)
|
||||
fall(fall_over)
|
||||
|
||||
canmove = !(fall_over || resting || stunned || buckled)
|
||||
density = !lying
|
||||
if(lying)
|
||||
if(layer == initial(layer))
|
||||
layer = MOB_LAYER - 0.2
|
||||
else
|
||||
if(layer == MOB_LAYER - 0.2)
|
||||
layer = initial(layer)
|
||||
|
||||
update_transform()
|
||||
if(!delay_action_updates)
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
/mob/living/proc/update_stamina()
|
||||
return
|
||||
+4
-119
@@ -62,22 +62,22 @@
|
||||
if(!client) return
|
||||
|
||||
if(type)
|
||||
if(type & 1 && (disabilities & BLIND || blinded || paralysis) )//Vision related
|
||||
if(type & 1 && !can_see())//Vision related
|
||||
if(!( alt ))
|
||||
return
|
||||
else
|
||||
msg = alt
|
||||
type = alt_type
|
||||
if(type & 2 && (disabilities & DEAF || ear_deaf))//Hearing related
|
||||
if(type & 2 && !can_hear())//Hearing related
|
||||
if(!( alt ))
|
||||
return
|
||||
else
|
||||
msg = alt
|
||||
type = alt_type
|
||||
if((type & 1 && disabilities & BLIND))
|
||||
if(type & 1 && !can_see())
|
||||
return
|
||||
// Added voice muffling for Issue 41.
|
||||
if(stat == UNCONSCIOUS || (sleeping > 0 && stat != 2))
|
||||
if(stat == UNCONSCIOUS || (sleeping > 0 && stat != DEAD))
|
||||
to_chat(src, "<I>... You can almost hear someone talking ...</I>")
|
||||
else
|
||||
to_chat(src, msg)
|
||||
@@ -163,13 +163,6 @@
|
||||
// handle_typing_indicator()
|
||||
return
|
||||
|
||||
|
||||
/mob/proc/restrained()
|
||||
return
|
||||
|
||||
/mob/proc/incapacitated()
|
||||
return
|
||||
|
||||
//This proc is called whenever someone clicks an inventory ui slot.
|
||||
/mob/proc/attack_ui(slot)
|
||||
var/obj/item/W = get_active_hand()
|
||||
@@ -1031,36 +1024,6 @@ var/list/slot_equipment_priority = list( \
|
||||
if(restrained()) return 0
|
||||
return 1
|
||||
|
||||
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
|
||||
/mob/proc/update_canmove(delay_action_updates = 0)
|
||||
var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH)
|
||||
var/buckle_lying = !(buckled && !buckled.buckle_lying)
|
||||
if(ko || resting || stunned)
|
||||
drop_r_hand()
|
||||
drop_l_hand()
|
||||
else
|
||||
lying = 0
|
||||
canmove = 1
|
||||
if(buckled)
|
||||
lying = 90 * buckle_lying
|
||||
else
|
||||
if((ko || resting) && !lying)
|
||||
fall(ko)
|
||||
|
||||
canmove = !(ko || resting || stunned || buckled)
|
||||
density = !lying
|
||||
if(lying)
|
||||
if(layer == initial(layer))
|
||||
layer = MOB_LAYER - 0.2
|
||||
else
|
||||
if(layer == MOB_LAYER - 0.2)
|
||||
layer = initial(layer)
|
||||
|
||||
update_transform()
|
||||
if(!delay_action_updates)
|
||||
update_action_buttons_icon()
|
||||
return canmove
|
||||
|
||||
/mob/proc/fall(var/forced)
|
||||
drop_l_hand()
|
||||
drop_r_hand()
|
||||
@@ -1101,77 +1064,6 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/proc/activate_hand(selhand)
|
||||
return
|
||||
|
||||
/mob/proc/Jitter(amount)
|
||||
jitteriness = max(jitteriness, amount, 0)
|
||||
|
||||
/mob/proc/Dizzy(amount)
|
||||
dizziness = max(dizziness, amount, 0)
|
||||
|
||||
/mob/proc/AdjustDrunk(amount)
|
||||
drunk = max(drunk + amount, 0)
|
||||
|
||||
/mob/proc/Stun(amount)
|
||||
SetStunned(max(stunned, amount))
|
||||
|
||||
/mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(status_flags & CANSTUN)
|
||||
stunned = max(amount, 0)
|
||||
update_canmove()
|
||||
else if(stunned)
|
||||
stunned = 0
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustStunned(amount)
|
||||
SetStunned(stunned + amount)
|
||||
|
||||
/mob/proc/Weaken(amount)
|
||||
SetWeakened(max(weakened, amount))
|
||||
|
||||
/mob/proc/SetWeakened(amount)
|
||||
if(status_flags & CANWEAKEN)
|
||||
weakened = max(amount, 0)
|
||||
update_canmove() //updates lying, canmove and icons
|
||||
else if(weakened)
|
||||
weakened = 0
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustWeakened(amount)
|
||||
SetWeakened(weakened + amount)
|
||||
|
||||
/mob/proc/Paralyse(amount)
|
||||
SetParalysis(max(paralysis, amount))
|
||||
|
||||
/mob/proc/SetParalysis(amount)
|
||||
if(status_flags & CANPARALYSE)
|
||||
paralysis = max(amount, 0)
|
||||
update_canmove()
|
||||
else if(paralysis)
|
||||
paralysis = 0
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustParalysis(amount)
|
||||
SetParalysis(paralysis + amount)
|
||||
|
||||
/mob/proc/Sleeping(amount)
|
||||
SetSleeping(max(sleeping, amount))
|
||||
|
||||
/mob/proc/SetSleeping(amount)
|
||||
sleeping = max(amount, 0)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustSleeping(amount)
|
||||
SetSleeping(sleeping + amount)
|
||||
|
||||
/mob/proc/Resting(amount)
|
||||
SetResting(max(resting, amount))
|
||||
|
||||
/mob/proc/SetResting(amount)
|
||||
resting = max(amount, 0)
|
||||
update_canmove()
|
||||
|
||||
/mob/proc/AdjustResting(amount)
|
||||
SetResting(resting + amount)
|
||||
|
||||
/mob/proc/get_species()
|
||||
return ""
|
||||
|
||||
@@ -1365,13 +1257,6 @@ mob/proc/yank_out_object()
|
||||
location.add_vomit_floor(src, 1)
|
||||
playsound(location, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
|
||||
/mob/proc/adjustEarDamage()
|
||||
return
|
||||
|
||||
/mob/proc/setEarDamage()
|
||||
return
|
||||
|
||||
/mob/proc/AddSpell(obj/effect/proc_holder/spell/S)
|
||||
mob_spell_list += S
|
||||
S.action.Grant(src)
|
||||
|
||||
@@ -33,18 +33,11 @@
|
||||
var/obj/machinery/machine = null
|
||||
var/other_mobs = null
|
||||
var/memory = ""
|
||||
var/disabilities = 0 //Carbon
|
||||
var/atom/movable/pulling = null
|
||||
var/next_move = null
|
||||
var/notransform = null //Carbon
|
||||
var/other = 0.0
|
||||
var/hand = null
|
||||
var/eye_blind = 0 //Carbon
|
||||
var/eye_blurry = 0 //Carbon
|
||||
var/ear_deaf = 0 //Carbon
|
||||
var/ear_damage = 0 //Carbon
|
||||
var/stuttering = 0 //Carbon
|
||||
var/slurring = 0 //Carbon
|
||||
var/real_name = null
|
||||
var/flavor_text = ""
|
||||
var/med_record = ""
|
||||
@@ -53,11 +46,6 @@
|
||||
var/blinded = null
|
||||
var/bhunger = 0 //Carbon
|
||||
var/ajourn = 0
|
||||
var/druggy = 0 //Carbon
|
||||
var/confused = 0 //Carbon
|
||||
var/drunk = 0
|
||||
var/sleeping = 0 //Carbon
|
||||
var/resting = 0 //Carbon
|
||||
var/lying = 0
|
||||
var/lying_prev = 0
|
||||
var/canmove = 1
|
||||
@@ -77,19 +65,11 @@
|
||||
|
||||
|
||||
var/bodytemperature = 310.055 //98.7 F
|
||||
var/drowsyness = 0.0//Carbon
|
||||
var/dizziness = 0//Carbon
|
||||
var/jitteriness = 0//Carbon
|
||||
var/flying = 0
|
||||
var/charges = 0.0
|
||||
var/nutrition = 400.0//Carbon
|
||||
|
||||
var/overeatduration = 0 // How long this guy is overeating //Carbon
|
||||
var/paralysis = 0
|
||||
var/stunned = 0
|
||||
var/weakened = 0
|
||||
var/slowed = 0
|
||||
var/losebreath = 0 //Carbon
|
||||
var/intent = null//Living
|
||||
var/shakecamera = 0
|
||||
var/a_intent = I_HELP//Living
|
||||
|
||||
@@ -175,9 +175,9 @@
|
||||
|
||||
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 = max(affecting.stuttering, 5) //It will hamper your voice, being choked and all.
|
||||
affecting.Stuttering(5) //It will hamper your voice, being choked and all.
|
||||
affecting.Weaken(5) //Should keep you down unless you get help.
|
||||
affecting.losebreath = max(affecting.losebreath + 2, 3)
|
||||
affecting.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3)
|
||||
|
||||
adjust_position()
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
|
||||
|
||||
assailant.next_move = world.time + 10
|
||||
affecting.losebreath += 1
|
||||
affecting.AdjustLoseBreath(1)
|
||||
affecting.set_dir(WEST)
|
||||
adjust_position()
|
||||
|
||||
|
||||
@@ -75,12 +75,6 @@ proc/iscuffed(A)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
proc/isdeaf(A)
|
||||
if(istype(A, /mob))
|
||||
var/mob/M = A
|
||||
return (M.disabilities & DEAF) || M.ear_deaf
|
||||
return 0
|
||||
|
||||
proc/hassensorlevel(A, var/level)
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(istype(H) && istype(H.w_uniform, /obj/item/clothing/under))
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
mob.last_movement = world.time
|
||||
switch(mob.m_intent)
|
||||
if("run")
|
||||
if(mob.drowsyness > 0)
|
||||
if(mob.drowsy > 0)
|
||||
move_delay += 6
|
||||
move_delay += 1+config.run_speed
|
||||
if("walk")
|
||||
|
||||
@@ -565,3 +565,7 @@
|
||||
|
||||
/mob/new_player/is_ready()
|
||||
return ready && ..()
|
||||
|
||||
// No hearing announcements
|
||||
/mob/new_player/can_hear()
|
||||
return 0
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
if(length(message) >= 2)
|
||||
var/language_prefix = trim_right(lowertext(copytext(message, 1 ,4)))
|
||||
var/datum/language/L = language_keys[language_prefix]
|
||||
if(can_speak(L))
|
||||
if(can_speak_language(L))
|
||||
return L
|
||||
|
||||
return null
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
// 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
|
||||
|
||||
|
||||
/mob/proc/EarDamage()
|
||||
return
|
||||
|
||||
/mob/proc/SetEarDamage()
|
||||
return
|
||||
|
||||
/mob/proc/AdjustEarDamage()
|
||||
return
|
||||
|
||||
|
||||
/mob/proc/EarDeaf()
|
||||
return
|
||||
|
||||
/mob/proc/SetEarDeaf()
|
||||
return
|
||||
|
||||
/mob/proc/AdjustEarDeaf()
|
||||
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/Stun()
|
||||
return
|
||||
|
||||
/mob/proc/SetStunned()
|
||||
return
|
||||
|
||||
/mob/proc/AdjustStunned()
|
||||
return
|
||||
|
||||
|
||||
/mob/proc/Stuttering()
|
||||
return
|
||||
|
||||
/mob/proc/SetStuttering()
|
||||
return
|
||||
|
||||
/mob/proc/AdjustStuttering()
|
||||
return
|
||||
|
||||
|
||||
/mob/proc/Weaken()
|
||||
return
|
||||
|
||||
/mob/proc/SetWeakened()
|
||||
return
|
||||
|
||||
/mob/proc/AdjustWeakened()
|
||||
return
|
||||
@@ -0,0 +1,65 @@
|
||||
// These are procs that cause immediate updates to features of the mob - prefixed with `update_`
|
||||
// Procs that have a stacking effect depending on how many times they are called
|
||||
// do not belong in this file - those go in `life.dm` instead, with the prefix `handle_`
|
||||
|
||||
// OVERLAY/SIGHT PROCS
|
||||
|
||||
// These return 0 if they are not applying an overlay, and 1 if they are
|
||||
|
||||
// Call this to immediately apply blindness effects, instead of
|
||||
// waiting for the next `Life` tick
|
||||
/mob/proc/update_blind_effects()
|
||||
// No handling for this on the mob level
|
||||
return 0
|
||||
|
||||
/mob/proc/update_blurry_effects()
|
||||
// No handling for this on the mob level
|
||||
return 0
|
||||
|
||||
/mob/proc/update_druggy_effects()
|
||||
// No handling for this on the mob level
|
||||
return 0
|
||||
|
||||
/mob/proc/update_nearsighted_effects()
|
||||
// No handling for this on the mob level
|
||||
return 0
|
||||
|
||||
/mob/proc/update_sleeping_effects()
|
||||
// No handling for this on the mob level
|
||||
return 0
|
||||
|
||||
/mob/proc/update_tint_effects()
|
||||
// No handling for this on the mob level
|
||||
return 0
|
||||
|
||||
// Procs that give information about the status of the mob
|
||||
|
||||
/mob/proc/can_hear()
|
||||
return 1
|
||||
|
||||
/mob/proc/can_see()
|
||||
return 1
|
||||
|
||||
/mob/proc/can_speak()
|
||||
return 1
|
||||
|
||||
/mob/proc/incapacitated(ignore_restraints, ignore_grab)
|
||||
return 0
|
||||
|
||||
/mob/proc/restrained(ignore_grab)
|
||||
// All are created free
|
||||
return 0
|
||||
|
||||
// Procs that update other things about the mob
|
||||
|
||||
// Does various animations - Jitter, Flying, Spinning
|
||||
/mob/proc/update_animations()
|
||||
if(flying)
|
||||
animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING)
|
||||
animate(pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING)
|
||||
|
||||
/mob/proc/update_stat()
|
||||
return
|
||||
|
||||
/mob/proc/update_canmove()
|
||||
return 1
|
||||
Reference in New Issue
Block a user