diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm
index 114588009ed..986cbac0bd3 100644
--- a/code/__HELPERS/maths.dm
+++ b/code/__HELPERS/maths.dm
@@ -85,3 +85,18 @@ var/gaussian_next
gaussian_next = R2 * working
return (mean + stddev * R1)
#undef ACCURACY
+
+
+
+// oof, what a mouthful
+// Used in status_procs' "adjust" to let them modify a status effect by a given
+// amount, without inadverdently increasing it in the wrong direction
+/proc/directional_bounded_sum(orig_val, modifier, bound_lower, bound_upper)
+ var/new_val = orig_val + modifier
+ if(modifier > 0)
+ if(new_val > bound_upper)
+ new_val = max(orig_val, bound_upper)
+ else if(modifier < 0)
+ if(new_val < bound_lower)
+ new_val = min(orig_val, bound_lower)
+ return new_val
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index a476fbc78d5..66377ec3fcd 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -62,7 +62,7 @@
CtrlClickOn(A)
return
- if(stat || paralysis || stunned || weakened)
+ if(incapacitated(ignore_restraints = 1, ignore_grab = 1, ignore_lying = 1))
return
face_atom(A)
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index 1f60c26f885..a15176af87c 100644
--- a/code/_onclick/cyborg.dm
+++ b/code/_onclick/cyborg.dm
@@ -39,7 +39,7 @@
CtrlClickOn(A)
return
- if(stat || lockcharge || weakened || stunned || paralysis)
+ if(incapacitated())
return
if(next_move >= world.time)
diff --git a/code/datums/diseases/advance/symptoms/confusion.dm b/code/datums/diseases/advance/symptoms/confusion.dm
index 8f388c45edc..9e806b24f41 100644
--- a/code/datums/diseases/advance/symptoms/confusion.dm
+++ b/code/datums/diseases/advance/symptoms/confusion.dm
@@ -35,6 +35,6 @@ Bonus
to_chat(M, "[pick("Your head hurts.", "Your mind blanks for a moment.")]")
else
to_chat(M, "You can't think straight!")
- M.confused = min(100, M.confused + 8)
+ M.AdjustConfused(8, bound_lower = 0, bound_upper = 100)
return
diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm
index 6c65e330fa8..1a9bba6961e 100644
--- a/code/datums/diseases/advance/symptoms/deafness.dm
+++ b/code/datums/diseases/advance/symptoms/deafness.dm
@@ -33,11 +33,11 @@ Bonus
if(3, 4)
to_chat(M, "[pick("You hear a ringing in your ear.", "Your ears pop.")]")
if(5)
- if(!(M.ear_deaf))
+ if(!(M.disabilities & DEAF))
to_chat(M, "Your ears pop and begin ringing loudly!")
- M.setEarDamage(-1,INFINITY) //Shall be enough
+ M.BecomeDeaf()
spawn(200)
if(M)
to_chat(M, "The ringing in your ears fades...")
- M.setEarDamage(-1,0)
- return
\ No newline at end of file
+ M.CureDeaf()
+ return
diff --git a/code/datums/diseases/advance/symptoms/hallucigen.dm b/code/datums/diseases/advance/symptoms/hallucigen.dm
index cac8b4d2e03..e117dbf51f8 100644
--- a/code/datums/diseases/advance/symptoms/hallucigen.dm
+++ b/code/datums/diseases/advance/symptoms/hallucigen.dm
@@ -36,6 +36,6 @@ Bonus
to_chat(M, "[pick("Something is following you.", "You are being watched.", "You hear a whisper in your ear.", "Thumping footsteps slam toward you from nowhere.")]")
else
to_chat(M, "[pick("Oh, your head...", "Your head pounds.", "They're everywhere! Run!", "Something in the shadows...")]")
- M.hallucination += 5
+ M.AdjustHallucinate(5)
return
diff --git a/code/datums/diseases/anxiety.dm b/code/datums/diseases/anxiety.dm
index 150b7483aaa..4d9716e44da 100644
--- a/code/datums/diseases/anxiety.dm
+++ b/code/datums/diseases/anxiety.dm
@@ -24,18 +24,18 @@
to_chat(affected_mob, "You feel panicky.")
if(prob(2))
to_chat(affected_mob, "You're overtaken with panic!")
- affected_mob.confused += (rand(2,3))
+ affected_mob.AdjustConfused(rand(2,3))
if(4)
if(prob(10))
to_chat(affected_mob, "You feel butterflies in your stomach.")
if(prob(5))
affected_mob.visible_message("[affected_mob] stumbles around in a panic.", \
"You have a panic attack!")
- affected_mob.confused += (rand(6,8))
- affected_mob.jitteriness += (rand(6,8))
+ affected_mob.AdjustConfused(rand(6,8))
+ affected_mob.AdjustJitter(rand(6,8))
if(prob(2))
affected_mob.visible_message("[affected_mob] coughs up butterflies!", \
"You cough up butterflies!")
new /mob/living/simple_animal/butterfly(affected_mob.loc)
new /mob/living/simple_animal/butterfly(affected_mob.loc)
- return
\ No newline at end of file
+ return
diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm
index 7f04eb5fc56..e3482955865 100644
--- a/code/datums/diseases/transformation.dm
+++ b/code/datums/diseases/transformation.dm
@@ -106,7 +106,7 @@
if(3)
if(prob(4))
to_chat(affected_mob, "You feel a stabbing pain in your head.")
- affected_mob.confused += 10
+ affected_mob.AdjustConfused(10)
if(4)
if(prob(3))
affected_mob.say(pick("Eeek, ook ook!", "Eee-eeek!", "Eeee!", "Ungh, ungh."))
@@ -241,4 +241,4 @@
stage3 = list("Your appendages are melting away.", "Your limbs begin to lose their shape.")
stage4 = list("You're ravenous.")
stage5 = list("You have become a morph.")
- new_form = /mob/living/simple_animal/hostile/morph
\ No newline at end of file
+ new_form = /mob/living/simple_animal/hostile/morph
diff --git a/code/datums/diseases/tuberculosis.dm b/code/datums/diseases/tuberculosis.dm
index 11c06e386c5..4cd027a7d7d 100644
--- a/code/datums/diseases/tuberculosis.dm
+++ b/code/datums/diseases/tuberculosis.dm
@@ -44,7 +44,7 @@
affected_mob.AdjustSleeping(5)
if(prob(2))
to_chat(affected_mob, "You feel your mind relax and your thoughts drift!")
- affected_mob.confused = min(100, affected_mob.confused + 8)
+ affected_mob.AdjustConfused(8, bound_lower = 0, bound_upper = 100)
if(prob(10))
affected_mob.vomit(20)
if(prob(3))
@@ -55,4 +55,3 @@
to_chat(affected_mob, "[pick("You feel uncomfortably hot...", "You feel like unzipping your jumpsuit", "You feel like taking off some clothes...")]")
affected_mob.bodytemperature += 40
return
-
diff --git a/code/datums/diseases/vampire.dm b/code/datums/diseases/vampire.dm
index dbcc9bbb3c0..16706087673 100644
--- a/code/datums/diseases/vampire.dm
+++ b/code/datums/diseases/vampire.dm
@@ -20,15 +20,15 @@
if(prob(10))
affected_mob.emote(pick("cough","groan", "gasp"))
- affected_mob.losebreath++
+ affected_mob.AdjustLoseBreath(1)
if(prob(15))
if(prob(33))
to_chat(affected_mob, "You feel sickly and weak.")
- affected_mob.slowed += 3
+ affected_mob.AdjustSlowed(3)
affected_mob.adjustToxLoss(toxdamage)
if(prob(5))
to_chat(affected_mob, "Your joints ache horribly!")
affected_mob.Weaken(stuntime)
- affected_mob.Stun(stuntime)
\ No newline at end of file
+ affected_mob.Stun(stuntime)
diff --git a/code/datums/spells/cluwne.dm b/code/datums/spells/cluwne.dm
index d4d3b383f9d..fe0e02bda6d 100644
--- a/code/datums/spells/cluwne.dm
+++ b/code/datums/spells/cluwne.dm
@@ -16,7 +16,7 @@
adjustBrainLoss(80)
nutrition = 9000
overeatduration = 9000
- confused = 30
+ Confused(30)
if(mind)
mind.assigned_role = "Cluwne"
@@ -44,8 +44,8 @@
adjustBrainLoss(-120)
nutrition = NUTRITION_LEVEL_STARVING
overeatduration = 0
- confused = 0
- jitteriness = 0
+ SetConfused(0)
+ SetJitter(0)
if(mind)
mind.assigned_role = "Lawyer"
diff --git a/code/datums/spells/inflict_handler.dm b/code/datums/spells/inflict_handler.dm
index 9ddac0b0920..1eed65bbed4 100644
--- a/code/datums/spells/inflict_handler.dm
+++ b/code/datums/spells/inflict_handler.dm
@@ -50,8 +50,8 @@
target.Paralyse(amt_paralysis)
target.Stun(amt_stunned)
- target.eye_blind += amt_eye_blind
- target.eye_blurry += amt_eye_blurry
+ target.AdjustEyeBlind(amt_eye_blind)
+ target.AdjustEyeBlurry(amt_eye_blurry)
//summoning
if(summon_type)
- new summon_type(target.loc, target)
\ No newline at end of file
+ new summon_type(target.loc, target)
diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm
index c147bd9235c..d73076c8787 100644
--- a/code/defines/procs/announce.dm
+++ b/code/defines/procs/announce.dm
@@ -62,7 +62,7 @@
datum/announcement/proc/Message(message as text, message_title as text)
for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player) && !isdeaf(M))
+ if(M.can_hear())
to_chat(M, "
[title]
")
to_chat(M, "[message]")
if(announcer)
@@ -88,7 +88,7 @@ datum/announcement/priority/command/Message(message as text, message_title as te
command += "
[message]
"
command += "
"
for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player) && !isdeaf(M))
+ if(M.can_hear())
to_chat(M, command)
datum/announcement/priority/enemy/Message(message as text, message_title as text, from as text)
@@ -100,7 +100,7 @@ datum/announcement/priority/enemy/Message(message as text, message_title as text
command += "
[message]
"
command += "
"
for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player) && !isdeaf(M))
+ if(M.can_hear())
to_chat(M, command)
datum/announcement/priority/security/Message(message as text, message_title as text)
@@ -125,7 +125,7 @@ datum/announcement/proc/PlaySound(var/message_sound)
if(!message_sound)
return
for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player) && !isdeaf(M))
+ if(M.can_hear())
M << message_sound
datum/announcement/proc/Sound(var/message_sound)
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index 40814a72c78..63c42687b67 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -144,7 +144,7 @@
if(usr.stat != 0)
return
- if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other
+ if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
if(!ishuman(usr)) //Make sure they're a mob that has dna
to_chat(usr, "Try as you might, you can not climb up into the [src].")
@@ -169,7 +169,7 @@
return
if(O.loc == user) //no you can't pull things out of your ass
return
- if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
+ if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
return
@@ -973,4 +973,4 @@
return 1
-/////////////////////////// DNA MACHINES
\ No newline at end of file
+/////////////////////////// DNA MACHINES
diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm
index a30d160fd92..4cfa6f45750 100644
--- a/code/game/dna/genes/disabilities.dm
+++ b/code/game/dna/genes/disabilities.dm
@@ -24,7 +24,7 @@
/datum/dna/gene/disability/can_activate(var/mob/M,var/flags)
return 1 // Always set!
-/datum/dna/gene/disability/activate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/disability/activate(var/mob/living/M, var/connected, var/flags)
..()
if(mutation && !(mutation in M.mutations))
M.mutations.Add(mutation)
@@ -35,7 +35,7 @@
else
testing("[name] has no activation message.")
-/datum/dna/gene/disability/deactivate(var/mob/M, var/connected, var/flags)
+/datum/dna/gene/disability/deactivate(var/mob/living/M, var/connected, var/flags)
..()
if(mutation && (mutation in M.mutations))
M.mutations.Remove(mutation)
@@ -127,7 +127,7 @@
/datum/dna/gene/disability/deaf/activate(var/mob/M, var/connected, var/flags)
..(M,connected,flags)
- M.ear_deaf = 1
+ M.EarDeaf(1)
/datum/dna/gene/disability/nearsighted
name="Nearsightedness"
diff --git a/code/game/gamemodes/changeling/powers/headcrab.dm b/code/game/gamemodes/changeling/powers/headcrab.dm
index 07ae44d9a9a..4adbc39e7fc 100644
--- a/code/game/gamemodes/changeling/powers/headcrab.dm
+++ b/code/game/gamemodes/changeling/powers/headcrab.dm
@@ -17,11 +17,11 @@
for(var/mob/living/carbon/human/H in range(2,user))
to_chat(H, "You are blinded by a shower of blood!")
H.Stun(1)
- H.eye_blurry = max(20, H.eye_blurry)
+ H.EyeBlurry(20)
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if(istype(E))
E.damage = max(E.damage+5, 0)
- H.confused += 3
+ H.AdjustConfused(3)
for(var/mob/living/silicon/S in range(2,user))
to_chat(S, "Your sensors are disabled by a shower of blood!")
S.Weaken(3)
@@ -37,4 +37,4 @@
to_chat(crab, "You burst out of the remains of your former body in a shower of gore!")
user.gib()
feedback_add_details("changeling_powers","LR")
- return 1
\ No newline at end of file
+ return 1
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index b6692817650..2585287528c 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -17,10 +17,14 @@
user.SetStunned(0)
user.SetWeakened(0)
user.radiation = 0
- user.eye_blind = 0
- user.eye_blurry = 0
- user.setEarDamage(0,0)
+ user.SetEyeBlind(0)
+ user.SetEyeBlurry(0)
+ user.SetEarDamage(0)
+ user.SetEarDeaf(0)
user.heal_overall_damage(user.getBruteLoss(), user.getFireLoss())
+ user.CureBlind()
+ user.CureDeaf()
+ user.CureNearsighted()
user.reagents.clear_reagents()
user.germ_level = 0
user.next_pain_time = 0
diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm
index 7babc2a5a62..5185b61e508 100644
--- a/code/game/gamemodes/changeling/powers/shriek.dm
+++ b/code/game/gamemodes/changeling/powers/shriek.dm
@@ -11,8 +11,8 @@
for(var/mob/living/M in get_mobs_in_view(4, user))
if(iscarbon(M))
if(!M.mind || !M.mind.changeling)
- M.adjustEarDamage(0, 30)
- M.confused += 20
+ M.AdjustEarDeaf(30)
+ M.AdjustConfused(20)
M.Jitter(50)
else
M << sound('sound/effects/screech.ogg')
@@ -41,5 +41,3 @@
L.broken()
empulse(get_turf(user), 2, 4, 1)
return 1
-
-
diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm
index f4aa6f3d8f2..0df371009a8 100644
--- a/code/game/gamemodes/changeling/powers/tiny_prick.dm
+++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm
@@ -153,7 +153,7 @@ obj/effect/proc_holder/changeling/sting/mute
/obj/effect/proc_holder/changeling/sting/mute/sting_action(var/mob/user, var/mob/living/carbon/target)
add_logs(user, target, "stung", object="mute sting")
- target.silent += 30
+ target.AdjustSilence(30)
feedback_add_details("changeling_powers","MS")
return 1
@@ -165,12 +165,12 @@ obj/effect/proc_holder/changeling/sting/blind
chemical_cost = 25
dna_cost = 1
-/obj/effect/proc_holder/changeling/sting/blind/sting_action(var/mob/user, var/mob/target)
+/obj/effect/proc_holder/changeling/sting/blind/sting_action(var/mob/living/user, var/mob/living/target)
add_logs(user, target, "stung", object="blind sting")
to_chat(target, "Your eyes burn horrifically!")
- target.disabilities |= NEARSIGHTED
- target.eye_blind = 20
- target.eye_blurry = 40
+ target.BecomeNearsighted()
+ target.EyeBlind(20)
+ target.EyeBlurry(40)
feedback_add_details("changeling_powers","BS")
return 1
@@ -186,7 +186,7 @@ obj/effect/proc_holder/changeling/sting/LSD
add_logs(user, target, "stung", object="LSD sting")
spawn(rand(300,600))
if(target)
- target.hallucination = max(400, target.hallucination)
+ target.Hallucinate(400)
feedback_add_details("changeling_powers","HS")
return 1
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index ca96b4f869f..20133d972c8 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -840,7 +840,7 @@ var/list/sacrificed = list()
var/obj/item/weapon/nullrod/N = locate() in C
if(N)
continue
- C.adjustEarDamage(0,50)
+ C.AdjustEarDeaf(50)
C.show_message("\red The world around you suddenly becomes quiet.", 3)
affected++
if(prob(1))
@@ -859,7 +859,7 @@ var/list/sacrificed = list()
var/obj/item/weapon/nullrod/N = locate() in C
if(N)
continue
- C.adjustEarDamage(0,30)
+ C.AdjustEarDeaf(30)
//talismans is weaker.
C.show_message("\red The world around you suddenly becomes quiet.", 3)
affected++
@@ -880,12 +880,12 @@ var/list/sacrificed = list()
var/obj/item/weapon/nullrod/N = locate() in C
if(N)
continue
- C.eye_blurry += 50
- C.eye_blind += 20
+ C.AdjustEyeBlurry(50)
+ C.AdjustEyeBlind(20)
if(prob(5))
- C.disabilities |= NEARSIGHTED
+ C.BecomeNearsighted()
if(prob(10))
- C.disabilities |= BLIND
+ C.BecomeBlind()
C.show_message("\red Suddenly you see red flash that blinds you.", 3)
affected++
if(affected)
@@ -902,8 +902,8 @@ var/list/sacrificed = list()
var/obj/item/weapon/nullrod/N = locate() in C
if(N)
continue
- C.eye_blurry += 30
- C.eye_blind += 10
+ C.AdjustEyeBlurry(30)
+ C.AdjustEyeBlind(10)
//talismans is weaker.
affected++
C.show_message("\red You feel a sharp pain in your eyes, and the world disappears into darkness..", 3)
@@ -1016,7 +1016,7 @@ var/list/sacrificed = list()
var/mob/living/carbon/C = T
C.flash_eyes()
if(!(HULK in C.mutations))
- C.silent += 15
+ C.AdjustSilence(15)
C.Weaken(10)
C.Stun(10)
return
diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
index 4d98876ccd6..29f217b44bc 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
@@ -466,7 +466,7 @@ Congratulations! You are now trained for xenobiology research!"}
L.Sleeping(60)
add_logs(user, L, "put to sleep")
else
- L.drowsyness += 1
+ L.AdjustDrowsy(1)
to_chat(user, "Sleep inducement works fully only on stunned specimens! ")
L.visible_message("[user] tried to induce sleep in [L] with [src]!", \
"You suddenly feel drowsy!")
diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm
index 8a3fbd8ff60..b59f1fd8454 100644
--- a/code/game/gamemodes/miniantags/abduction/gland.dm
+++ b/code/game/gamemodes/miniantags/abduction/gland.dm
@@ -98,7 +98,7 @@
if(H == owner)
continue
to_chat(H, "You hear a buzz in your head.")
- H.confused += 20
+ H.AdjustConfused(20)
/obj/item/organ/internal/gland/pop
origin_tech = "materials=4;biotech=6;abductor=3"
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
index 26fb00b42a8..0f9173c31ea 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
@@ -253,7 +253,7 @@
to_chat(human, "You suddenly feel [pick("sick and tired", "tired and confused", "nauseated", "dizzy")].")
human.adjustStaminaLoss(stamdamage)
human.adjustToxLoss(toxdamage)
- human.confused = min(human.confused+confusion, maxconfusion)
+ human.AdjustConfused(confusion, bound_lower = 0, bound_upper = maxconfusion)
new/obj/effect/overlay/temp/revenant(human.loc)
if(!istype(T, /turf/simulated/shuttle) && !istype(T, /turf/simulated/wall/rust) && !istype(T, /turf/simulated/wall/r_wall) && istype(T, /turf/simulated/wall) && prob(15))
new/obj/effect/overlay/temp/revenant(T)
@@ -317,4 +317,4 @@
playsound(S, 'sound/machines/warning-buzzer.ogg', 50, 1)
new/obj/effect/overlay/temp/revenant(S.loc)
S.spark_system.start()
- S.emp_act(1)
\ No newline at end of file
+ S.emp_act(1)
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index 83846818091..461fe0e4ca7 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -241,7 +241,7 @@
revolutionaries += rev_mind
if(iscarbon(rev_mind.current))
var/mob/living/carbon/carbon_mob = rev_mind.current
- carbon_mob.silent = max(carbon_mob.silent, 5)
+ carbon_mob.Silence(5)
carbon_mob.flash_eyes(1, 1)
rev_mind.current.Stun(5)
to_chat(rev_mind.current, " You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!")
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 70471a91aff..b9525ee282e 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -46,7 +46,7 @@
else //Only alludes to the shadowling if the target is close by
to_chat(target, "Red lights suddenly dance in your vision, and you are mesmerized by the heavenly lights...")
target.Stun(10)
- M.silent += 10
+ M.AdjustSilence(10)
/obj/effect/proc_holder/spell/targeted/lesser_glare
@@ -79,7 +79,7 @@
else
to_chat(target, "Red lights suddenly dance in your vision, and you are mesmerized by their heavenly beauty...")
target.Stun(3) //Roughly 30% as long as the normal one
- M.silent += 3
+ M.AdjustSilence(3)
/obj/effect/proc_holder/spell/aoe_turf/veil
@@ -519,7 +519,7 @@
/datum/reagent/shadowling_blindness_smoke/on_mob_life(mob/living/M)
if(!is_shadow_or_thrall(M))
to_chat(M, "You breathe in the black smoke, and your eyes burn horribly!")
- M.eye_blind = 5
+ M.EyeBlind(5)
if(prob(25))
M.visible_message("[M] claws at their eyes!")
M.Stun(3)
@@ -556,8 +556,8 @@
if(iscarbon(target))
var/mob/living/carbon/M = target
to_chat(M, "A spike of pain drives into your head and scrambles your thoughts!")
- M.confused += 10
- M.setEarDamage(M.ear_damage + 3)
+ M.AdjustConfused(10)
+ M.AdjustEarDamage(3)
else if(issilicon(target))
var/mob/living/silicon/S = target
to_chat(S, "ERROR $!(@ ERROR )#^! SENSORY OVERLOAD \[$(!@#")
diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm
index f8e1575efc1..92a1a3dfa19 100644
--- a/code/game/gamemodes/vampire/vampire_powers.dm
+++ b/code/game/gamemodes/vampire/vampire_powers.dm
@@ -259,8 +259,8 @@
continue
to_chat(C, "You hear a ear piercing shriek and your senses dull!")
C.Weaken(4)
- C.adjustEarDamage(0,20)
- C.stuttering = 20
+ C.AdjustEarDeaf(20)
+ C.Stuttering(20)
C.Stun(4)
C.Jitter(150)
for(var/obj/structure/window/W in view(4))
diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm
index 34886dde2e0..689fb350b0d 100644
--- a/code/game/gamemodes/wizard/artefact.dm
+++ b/code/game/gamemodes/wizard/artefact.dm
@@ -782,7 +782,7 @@ var/global/list/multiverse = list()
else if(istype(I,/obj/item/weapon/bikehorn))
to_chat(target, "HONK")
target << 'sound/items/AirHorn.ogg'
- target.adjustEarDamage(0,3)
+ target.AdjustEarDeaf(3)
GiveHint(target)
cooldown = world.time +cooldown_time
return
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index 08a580923f4..4c06f84d7cd 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -747,7 +747,7 @@
/obj/item/weapon/spellbook/oneuse/blind/recoil(mob/user as mob)
..()
to_chat(user, "You go blind!")
- user.eye_blind = 10
+ user.EyeBlind(10)
/obj/item/weapon/spellbook/oneuse/mindswap
spell = /obj/effect/proc_holder/spell/targeted/mind_transfer
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 60e650691e5..fb49e6a5970 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -546,7 +546,7 @@
if(panel_open)
to_chat(usr, "Close the maintenance panel first.")
return
- if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other
+ if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
for(var/mob/living/carbon/slime/M in range(1,usr))
if(M.Victim == usr)
@@ -590,4 +590,4 @@
component_parts += new /obj/item/stack/cable_coil(null, 1)
RefreshParts()
-#undef ADDICTION_SPEEDUP_TIME
\ No newline at end of file
+#undef ADDICTION_SPEEDUP_TIME
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 65a1730bacd..5be99b2ab1c 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -448,7 +448,7 @@
if(ORION_TRAIL_RAIDERS)
if(prob(50))
to_chat(usr, "You hear battle shouts. The tramping of boots on cold metal. Screams of agony. The rush of venting air. Are you going insane?")
- M.hallucination += 30
+ M.AdjustHallucinate(30)
else
to_chat(usr, "Something strikes you from behind! It hurts like hell and feel like a blunt weapon, but nothing is there...")
M.take_organ_damage(30)
diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm
index 0a84ee81821..f1d7149f9fa 100644
--- a/code/game/machinery/computer/camera_advanced.dm
+++ b/code/game/machinery/computer/camera_advanced.dm
@@ -20,7 +20,7 @@
jump_action.Grant(user)
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
- if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || user.eye_blind || user.incapacitated())
+ if((stat & (NOPOWER|BROKEN)) || !Adjacent(user) || !user.can_see() || user.incapacitated())
user.unset_machine()
return 0
return 1
@@ -167,4 +167,4 @@
var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T
var/obj/machinery/camera/final = T[camera]
if(final)
- remote_eye.setLoc(get_turf(final))
\ No newline at end of file
+ remote_eye.setLoc(get_turf(final))
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 6dd6182c930..a46f6a97b50 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -80,10 +80,10 @@
beaker = null
return ..()
-/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
+/obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(atom/movable/O as mob|obj, mob/living/user as mob)
if(O.loc == user) //no you can't pull things out of your ass
return
- if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
+ if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
return
@@ -371,7 +371,7 @@
occupant.bodytemperature += 2*(air_contents.temperature - occupant.bodytemperature)*current_heat_capacity/(current_heat_capacity + air_contents.heat_capacity())
occupant.bodytemperature = max(occupant.bodytemperature, air_contents.temperature) // this is so ugly i'm sorry for doing it i'll fix it later i promise
if(occupant.bodytemperature < T0C)
- occupant.sleeping = max(5/efficiency, (1/occupant.bodytemperature)*2000/efficiency)
+ occupant.Sleeping(max(5/efficiency, (1/occupant.bodytemperature)*2000/efficiency))
occupant.Paralyse(max(5/efficiency, (1/occupant.bodytemperature)*3000/efficiency))
if(air_contents.oxygen > 2)
if(occupant.getOxyLoss()) occupant.adjustOxyLoss(-1)
@@ -469,9 +469,9 @@
if(M.Victim == usr)
to_chat(usr, "You're too busy getting your life sucked out of you.")
return
- if(usr.stat != 0 || stat & (NOPOWER|BROKEN))
+ if(usr.stat != CONSCIOUS || stat & (NOPOWER|BROKEN))
return
- if(usr.restrained() || usr.stat || usr.weakened || usr.stunned || usr.paralysis || usr.resting) //are you cuffed, dying, lying, stunned or other
+ if(usr.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
put_mob(usr)
return
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 9ffec3cb02c..4c462b5a05c 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -485,7 +485,7 @@
if(O.loc == user) //no you can't pull things out of your ass
return
- if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
+ if(user.incapacitated()) //are you cuffed, dying, lying, stunned or other
return
if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
return
diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm
index d8f23599f74..1c764f0d346 100644
--- a/code/game/machinery/poolcontroller.dm
+++ b/code/game/machinery/poolcontroller.dm
@@ -100,15 +100,15 @@
if(drownee.stat == DEAD) //Dead spacemen don't drown more
return
- if(drownee.losebreath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control.
+ if(drownee.lose_breath > 20) //You've probably got bigger problems than drowning at this point, so we won't add to it until you get that under control.
return
if(drownee.stat) //Mob is in critical.
- drownee.losebreath -= 3 //You're gonna die here.
+ drownee.AdjustLoseBreath(3, bound_lower = 0, bound_upper = 20)
add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs
drownee.visible_message("\The [drownee] appears to be drowning!","You're quickly drowning!") //inform them that they are fucked.
else
- drownee.losebreath -= 2 //For every time you drown, you miss 2 breath attempts. Hope you catch on quick!
+ drownee.AdjustLoseBreath(2, bound_lower = 0, bound_upper = 20) //For every time you drown, you miss 2 breath attempts. Hope you catch on quick!
add_logs(src, drownee, "drowned", null, null, 0) //log it to their VV, but don't spam the admins' chats with the logs
if(prob(35)) //35% chance to tell them what is going on. They should probably figure it out before then.
drownee.visible_message("\The [drownee] flails, almost like they are drowning!","You're lacking air!") //*gasp* *gasp* *gasp* *gasp* *gasp*
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 68b2c83059e..fedb792c37d 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -164,9 +164,9 @@
if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs))
continue
to_chat(M, "HONK")
- M.sleeping = 0
- M.stuttering = 20
- M.adjustEarDamage(0,30)
+ M.SetSleeping(0)
+ M.Stuttering(20)
+ M.AdjustEarDeaf(30)
M.Weaken(3)
if(prob(30))
M.Stun(10)
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index 47b6c1bf57b..90e4c47b276 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -583,7 +583,7 @@ steam.start() -- spawns the effect
// if(M.wear_suit, /obj/item/clothing/suit/wizrobe && (M.hat, /obj/item/clothing/head/wizard) && (M.shoes, /obj/item/clothing/shoes/sandal)) // I'll work on it later
else
M.drop_item()
- M:sleeping += 5
+ M.AdjustSleeping(5)
if(M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
@@ -600,7 +600,7 @@ steam.start() -- spawns the effect
return
else
M.drop_item()
- M:sleeping += 5
+ M.AdjustSleeping(5)
if(M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm
index 32bf9a2fea5..9e36faae088 100644
--- a/code/game/objects/explosion.dm
+++ b/code/game/objects/explosion.dm
@@ -57,10 +57,11 @@
var/close = range(world.view+round(devastation_range,1), epicenter)
// to all distanced mobs play a different sound
- for(var/mob/M in world) if(M.z == epicenter.z) if(!(M in close))
- // check if the mob can hear
- if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space))
- M << 'sound/effects/explosionfar.ogg'
+ for(var/mob/M in world)
+ if(M.z == epicenter.z && !(M in close))
+ // check if the mob can hear
+ if(M.can_hear() && !istype(M.loc,/turf/space))
+ M << 'sound/effects/explosionfar.ogg'
if(heavy_impact_range > 1)
var/datum/effect/system/explosion/E = new/datum/effect/system/explosion()
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 6ea2906c072..b34cc09ca89 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -474,10 +474,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly
to_chat(M, "Your eyes start to bleed profusely!")
if(prob(50))
- if(M.stat != 2)
+ if(M.stat != DEAD)
to_chat(M, "You drop what you're holding and clutch at your eyes!")
M.drop_item()
- M.eye_blurry += 10
+ M.AdjustEyeBlurry(10)
M.Paralyse(1)
M.Weaken(2)
if(eyes.damage >= eyes.min_broken_damage)
@@ -488,7 +488,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
H.UpdateDamageIcon()
else
M.take_organ_damage(7)
- M.eye_blurry += rand(3,4)
+ M.AdjustEyeBlurry(rand(3,4))
return
/obj/item/clean_blood()
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index a91c4e2ebe3..065392a9222 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -236,10 +236,10 @@
var/mob/living/carbon/human/C = target
user.visible_message(" [user] sprays [src] into the face of [target]!")
if(C.client)
- C.eye_blurry = max(C.eye_blurry, 3)
- C.eye_blind = max(C.eye_blind, 1)
+ C.EyeBlurry(3)
+ C.EyeBlind(1)
if(C.check_eye_prot() <= 0) // no eye protection? ARGH IT BURNS.
- C.confused = max(C.confused, 3)
+ C.Confused(3)
C.Weaken(3)
C.lip_style = "spray_face"
C.lip_color = colour
@@ -251,4 +251,4 @@
overlays.Cut()
var/image/I = image('icons/obj/crayons.dmi',icon_state = "[capped ? "spraycan_cap_colors" : "spraycan_colors"]")
I.color = colour
- overlays += I
\ No newline at end of file
+ overlays += I
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index 7f2afb179e4..fb617133d83 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -55,7 +55,7 @@
interact(user)
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
- if(user.stat || loc != user || !user.canmove || user.eye_blind || !current)
+ if(user.stat || loc != user || !user.canmove || !user.can_see() || !current)
user.reset_view(null)
user.unset_machine()
return null
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index cec1c106e48..52a9a343e6b 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -81,7 +81,7 @@
if(M.weakeyes)
M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash
if(M.flash_eyes(1, 1))
- M.confused += power
+ M.AdjustConfused(power)
terrible_conversion_proc(M, user)
M.Stun(1)
visible_message("[user] blinds [M] with the flash!")
@@ -96,7 +96,7 @@
to_chat(M, "[user] fails to blind you with the flash!")
else
if(M.flash_eyes())
- M.confused += power
+ M.AdjustConfused(power)
/obj/item/device/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))
diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm
index e6b0ff92c32..22b589c7517 100644
--- a/code/game/objects/items/weapons/garrote.dm
+++ b/code/game/objects/items/weapons/garrote.dm
@@ -91,7 +91,7 @@
G.state = GRAB_NECK
G.hud.icon_state = "kill"
G.hud.name = "kill"
- M.silent += 1
+ M.AdjustSilence(1)
garrote_time = world.time + 10
processing_objects.Add(src)
@@ -152,11 +152,11 @@
return
- strangling.silent = max(strangling.silent, 3) // Non-improvised effects
+ strangling.Silence(3) // Non-improvised effects
strangling.apply_damage(4, OXY, "head")
/obj/item/weapon/twohanded/garrote/suicide_act(mob/user)
user.visible_message("[user] is wrapping the [src] around \his neck and pulling the handles! It looks like \he's trying to commit suicide.")
playsound(src.loc, 'sound/weapons/cablecuff.ogg', 15, 1, -1)
- return (OXYLOSS)
\ No newline at end of file
+ return (OXYLOSS)
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index 9562f9442c7..4241c9c5c0c 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -51,12 +51,13 @@
if(!ear_safety)
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
- M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15))
+ M.EarDeaf(15)
+ M.AdjustEarDamage(rand(0, 5))
if(M.ear_damage >= 15)
to_chat(M, "Your ears start to ring badly!")
- if(prob(M.ear_damage - 10 + 5))
+ if(prob(M.ear_damage - 5))
to_chat(M, "You can't hear anything!")
- M.disabilities |= DEAF
+ M.BecomeDeaf()
else
if(M.ear_damage >= 5)
to_chat(M, "Your ears start to ring!")
diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm
index 05a50200e7d..e966f5500e5 100644
--- a/code/game/objects/items/weapons/scissors.dm
+++ b/code/game/objects/items/weapons/scissors.dm
@@ -115,7 +115,7 @@
if(do_after(user, 50, target = H))
playsound(loc, "sound/weapons/bladeslice.ogg", 50, 1, -1)
user.visible_message("[user] abruptly stops cutting [M]'s hair and slices their throat!", "You stop cutting [M]'s hair and slice their throat!") //Just a little off the top.
- H.losebreath += 10 //30 Oxy damage over time
+ H.AdjustLoseBreath(10) //30 Oxy damage over time
H.apply_damage(18, BRUTE, "head", sharp =1, edge =1, used_weapon = "scissors")
var/turf/location = get_turf(H)
if(istype(location, /turf/simulated))
diff --git a/code/game/objects/items/weapons/storage/artistic_toolbox.dm b/code/game/objects/items/weapons/storage/artistic_toolbox.dm
index 81ba661115a..470c273bd69 100644
--- a/code/game/objects/items/weapons/storage/artistic_toolbox.dm
+++ b/code/game/objects/items/weapons/storage/artistic_toolbox.dm
@@ -138,8 +138,8 @@
affected_mob.setStaminaLoss(0)
var/status = CANSTUN | CANWEAKEN | CANPARALYSE
affected_mob.status_flags &= ~status
- affected_mob.dizziness = max(0, affected_mob.dizziness-10)
- affected_mob.drowsyness = max(0, affected_mob.drowsyness-10)
+ affected_mob.AdjustDizzy(-10)
+ affected_mob.AdjustDrowsy(-10)
affected_mob.SetSleeping(0)
stage = 1
switch(progenitor.hunger)
@@ -181,4 +181,4 @@
affected_mob.adjustBruteLoss(5)
if(ismob(progenitor.loc))
- progenitor.hunger++
\ No newline at end of file
+ progenitor.hunger++
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 937cc3214a3..ef0cdfc329b 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -116,7 +116,7 @@
if(H.get_item_by_slot(slot_head) == src)
if(H.internal)
return
- H.losebreath += 1
+ H.AdjustLoseBreath(1)
else
storage_slots = 7
processing_objects.Remove(src)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index b27d3f6e4f8..bbbecf6695d 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -420,8 +420,7 @@
H.lip_style = null //Washes off lipstick
H.lip_color = initial(H.lip_color)
H.regenerate_icons()
- user.drowsyness -= rand(2,3) //Washing your face wakes you up if you're falling asleep
- user.drowsyness = Clamp(user.drowsyness, 0, INFINITY)
+ user.AdjustDrowsy(-rand(2,3)) //Washing your face wakes you up if you're falling asleep
else
user.clean_blood()
@@ -459,4 +458,3 @@
icon_state = "puddle-splash"
..()
icon_state = "puddle"
-
diff --git a/code/game/sound.dm b/code/game/sound.dm
index fe5e361f16a..ed5f0d15b4c 100644
--- a/code/game/sound.dm
+++ b/code/game/sound.dm
@@ -40,7 +40,7 @@ var/list/ricochet = list('sound/weapons/effects/ric1.ogg', 'sound/weapons/effect
M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global, S)
/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global, sound/S)
- if(!src.client || ear_deaf > 0)
+ if(!src.client || !can_hear())
return
if(!S)
diff --git a/code/modules/admin/verbs/freeze.dm b/code/modules/admin/verbs/freeze.dm
index fb93cd3512d..920b24297ad 100644
--- a/code/modules/admin/verbs/freeze.dm
+++ b/code/modules/admin/verbs/freeze.dm
@@ -36,7 +36,7 @@ var/global/list/frozen_mob_list = list()
anchored = 1
frozen = AO
admin_prev_sleeping = sleeping
- sleeping += 20000
+ AdjustSleeping(20000)
if(!(src in frozen_mob_list))
frozen_mob_list += src
@@ -49,7 +49,7 @@ var/global/list/frozen_mob_list = list()
anchored = 0
overlays -= frozen
frozen = null
- sleeping = admin_prev_sleeping
+ SetSleeping(admin_prev_sleeping)
admin_prev_sleeping = null
if(src in frozen_mob_list)
frozen_mob_list -= src
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index 9945079b1a5..4ae3e230762 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -411,11 +411,12 @@
var/mob/living/carbon/human/M = src.loc
to_chat(M, "\red The Optical Thermal Scanner overloads and blinds you!")
if(M.glasses == src)
- M.eye_blind = 3
- M.eye_blurry = 5
- M.disabilities |= NEARSIGHTED
- spawn(100)
- M.disabilities &= ~NEARSIGHTED
+ M.EyeBlind(3)
+ M.EyeBlurry(5)
+ if(!(M.disabilities & NEARSIGHTED))
+ M.BecomeNearsighted()
+ spawn(100)
+ M.CureNearsighted()
..()
/obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index 35e31dc9519..274809d2145 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -335,7 +335,7 @@
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
if(H.head == src)
- H.slurring = max(3, H.slurring) //always slur
+ H.Slur(3) //always slur
/obj/item/clothing/head/beret/fluff/linda //Epic_Charger: Linda Clark
name = "Green beret"
diff --git a/code/modules/events/mass_hallucination.dm b/code/modules/events/mass_hallucination.dm
index d7877676b21..a3f302cff9f 100644
--- a/code/modules/events/mass_hallucination.dm
+++ b/code/modules/events/mass_hallucination.dm
@@ -6,7 +6,7 @@
var/armor = H.getarmor(type = "rad")
if((H.species.flags & RADIMMUNE) || armor >= 75) // Leave radiation-immune species/rad armored players completely unaffected
continue
- H.hallucination += rand(50, 100)
+ H.AdjustHallucinate(rand(50, 100))
/datum/event/mass_hallucination/announce()
- command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
\ No newline at end of file
+ command_announcement.Announce("It seems that station [station_name()] is passing through a minor radiation field, this may cause some hallucination, but no further damage")
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index ffc4882a055..4c120db79e0 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -279,11 +279,11 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/simple/singularity/proc/Eat(atom/OldLoc, Dir)
var/target_dist = get_dist(src,target)
if(target_dist<=3) //"Eaten"
- target.sleeping = 20
+ target.Sleeping(20)
target.hal_crit = 1
target.hal_screwyhud = 1
spawn(rand(50,100))
- target.sleeping = 0
+ target.SetSleeping(0)
target.hal_crit = 0
target.hal_screwyhud = 0
@@ -480,7 +480,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
my_target.show_message("[src.name] has attacked [my_target] with [weapon_name]!", 1)
my_target.staminaloss += 30
if(prob(20))
- my_target.eye_blurry += 3
+ my_target.AdjustEyeBlurry(3)
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
@@ -752,11 +752,11 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
halimage = null
if("death")
//Fake death
- src.sleeping = 20
+ Sleeping(20)
hal_crit = 1
hal_screwyhud = 1
spawn(rand(50,100))
- src.sleeping = 0
+ SetSleeping(0)
hal_crit = 0
hal_screwyhud = 0
if("husks")
diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm
index bc6692d72b1..0e557ea1d31 100644
--- a/code/modules/hydroponics/grown_inedible.dm
+++ b/code/modules/hydroponics/grown_inedible.dm
@@ -98,7 +98,7 @@
to_chat(M, "You are stunned by the powerful acid of the Deathnettle!")
add_logs(user, M, "attacked", src)
- M.eye_blurry += force/7
+ M.AdjustEyeBlurry(force/7)
if(prob(20))
M.Paralyse(force / 6)
M.Weaken(force / 15)
diff --git a/code/modules/martial_arts/krav_maga.dm b/code/modules/martial_arts/krav_maga.dm
index 9b589878475..e1a577e24fa 100644
--- a/code/modules/martial_arts/krav_maga.dm
+++ b/code/modules/martial_arts/krav_maga.dm
@@ -88,7 +88,7 @@
D.visible_message("[A] pounds [D] on the chest!", \
"[A] slams your chest! You can't breathe!")
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
- D.losebreath += 5
+ D.AdjustLoseBreath(5)
D.adjustOxyLoss(10)
return 1
@@ -97,7 +97,7 @@
"[A] karate chops your neck, rendering you unable to speak for a short time!")
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
D.apply_damage(5, BRUTE)
- D.silent += 10
+ D.AdjustSilence(10)
return 1
datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
@@ -170,4 +170,4 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi
name = "krav maga gloves"
desc = "These gloves can teach you to perform Krav Maga using nanochips."
icon_state = "fightgloves"
- item_state = "fightgloves"
\ No newline at end of file
+ item_state = "fightgloves"
diff --git a/code/modules/martial_arts/sleeping_carp.dm b/code/modules/martial_arts/sleeping_carp.dm
index bc4e15eb598..960844a063a 100644
--- a/code/modules/martial_arts/sleeping_carp.dm
+++ b/code/modules/martial_arts/sleeping_carp.dm
@@ -66,7 +66,7 @@
D.visible_message("[A] knees [D] in the stomach!", \
"[A] winds you with a knee in the stomach!")
D.audible_message("[D] gags!")
- D.losebreath += 3
+ D.AdjustLoseBreath(3)
D.Stun(2)
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
if(prob(80))
diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm
index 50a9527326a..3a813b0a557 100644
--- a/code/modules/mob/hear_say.dm
+++ b/code/modules/mob/hear_say.dm
@@ -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 = "[message]"
- 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, "You cannot hear yourself speak!")
@@ -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], \"[message]\""
- if(disabilities & DEAF || ear_deaf)
+ if(!can_hear())
if(prob(20))
to_chat(src, "You feel your headset vibrate but can hear nothing from it!")
else if(track)
diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm
index 81b54bcc3a6..c9e410d9e9b 100644
--- a/code/modules/mob/language.dm
+++ b/code/modules/mob/language.dm
@@ -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)
diff --git a/code/modules/mob/living/carbon/alien/alien_defenses.dm b/code/modules/mob/living/carbon/alien/alien_defenses.dm
index 3949948b0f3..c6e2bcc510d 100644
--- a/code/modules/mob/living/carbon/alien/alien_defenses.dm
+++ b/code/modules/mob/living/carbon/alien/alien_defenses.dm
@@ -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)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 876cae4b312..c5cee9d3db4 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -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
\ No newline at end of file
+ return 0.8
diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm
index 4cccb6e57ed..da93e43c13f 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/life.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm
@@ -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
\ No newline at end of file
+ AdjustDruggy(-1)
+ return 1
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index 8e9e0dea576..04a460ec710 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -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)
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index 76ceef6ad2e..03cb2096963 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -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
\ No newline at end of file
+ AdjustDruggy(-1)
+ return 1
diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm
index 996687ee4b0..7809e1fb947 100644
--- a/code/modules/mob/living/carbon/brain/brain.dm
+++ b/code/modules/mob/living/carbon/brain/brain.dm
@@ -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
\ No newline at end of file
+/mob/living/carbon/brain/SetEarDeaf()
+ return
diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm
index fa466759bcc..e3ffe2074a7 100644
--- a/code/modules/mob/living/carbon/brain/brain_item.dm
+++ b/code/modules/mob/living/carbon/brain/brain_item.dm
@@ -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"
diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm
index 40273bf66ad..74d096d9518 100644
--- a/code/modules/mob/living/carbon/brain/life.dm
+++ b/code/modules/mob/living/carbon/brain/life.dm
@@ -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
diff --git a/code/modules/mob/living/carbon/brain/login.dm b/code/modules/mob/living/carbon/brain/login.dm
index e90297dfe5b..622ae74656a 100644
--- a/code/modules/mob/living/carbon/brain/login.dm
+++ b/code/modules/mob/living/carbon/brain/login.dm
@@ -1,3 +1,3 @@
/mob/living/carbon/brain/Login()
..()
- sleeping = 0
\ No newline at end of file
+ SetSleeping(0)
diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm
index 4f76dce16bd..3b5b415964d 100644
--- a/code/modules/mob/living/carbon/brain/posibrain.dm
+++ b/code/modules/mob/living/carbon/brain/posibrain.dm
@@ -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
..()
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 688508c4bf3..256aa562f72 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -158,13 +158,13 @@
"You feel a powerful shock coursing through your body!", \
"You hear a heavy electrical crack." \
)
- 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))
diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm
index b0ccdc8381d..f8a9b38d098 100644
--- a/code/modules/mob/living/carbon/death.dm
+++ b/code/modules/mob/living/carbon/death.dm
@@ -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)
\ No newline at end of file
+ ..(gibbed)
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index df78c286254..64b7ad2490f 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -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.
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index 0746cb30b2c..bd0c3538462 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -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 = "[src] flops and flails around on the floor."
else
message = "[src] flips in [M]'s general direction."
@@ -378,7 +378,7 @@
message = "[src] faints."
if(src.sleeping)
return //Can't faint while asleep
- src.sleeping += 1
+ AdjustSleeping(1)
m_type = 1
if("cough", "coughs")
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index ed48c229b89..3c9f5e9ce13 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -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("The [M.name] has shocked []!", 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
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 16d940dd439..0ceabc84bfe 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -254,7 +254,7 @@ emp_act
visible_message("[src] has been knocked down!", \
"[src] has been knocked down!")
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)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 78e9098f434..e308e3da3dd 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -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("[src] goes limp, their facial expression utterly blank.")
@@ -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, ""+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)
diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm
index d8434a87223..49d6d7fe245 100644
--- a/code/modules/mob/living/carbon/human/species/plasmaman.dm
+++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm
@@ -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)
diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm
index 33aa58b94d4..42b73c3e59d 100644
--- a/code/modules/mob/living/carbon/human/species/species.dm
+++ b/code/modules/mob/living/carbon/human/species/species.dm
@@ -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")
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index 985047a8284..ec4206a7dd5 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -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
diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm
index b51e0084ee3..6e3221c19fa 100644
--- a/code/modules/mob/living/carbon/slime/life.dm
+++ b/code/modules/mob/living/carbon/slime/life.dm
@@ -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
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index 921080c989a..ffd1fb9cd60 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -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
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index a151a062bce..308025e0204 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -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()
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 72cc4789779..52215b3e08b 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -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
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index c142c8d28d1..c3dab651906 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -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
diff --git a/code/modules/mob/living/logout.dm b/code/modules/mob/living/logout.dm
index 71e26e60858..10ba19b4302 100644
--- a/code/modules/mob/living/logout.dm
+++ b/code/modules/mob/living/logout.dm
@@ -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
\ No newline at end of file
+ if(mind.active)
+ Sleeping(2)
+ player_logged = 1
diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm
index 8cf6863eafb..2a3b39c1c9b 100644
--- a/code/modules/mob/living/silicon/ai/say.dm
+++ b/code/modules/mob/living/silicon/ai/say.dm
@@ -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
diff --git a/code/modules/mob/living/silicon/login.dm b/code/modules/mob/living/silicon/login.dm
index bd93fd6c3c4..01240adf942 100644
--- a/code/modules/mob/living/silicon/login.dm
+++ b/code/modules/mob/living/silicon/login.dm
@@ -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)
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index b2c8857f040..ca480d987f8 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -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)
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 75bbec89a1b..469b6e86574 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -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
\ No newline at end of file
+/mob/living/silicon/SetEarDeaf()
+ return
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index cb48c63b66f..d0e8e0e4bad 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -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
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 06160dca1fd..cc5b319c84f 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -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
\ No newline at end of file
+/mob/living/simple_animal/SetEarDeaf()
+ return
diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm
new file mode 100644
index 00000000000..3b7189a5cdf
--- /dev/null
+++ b/code/modules/mob/living/status_procs.dm
@@ -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
diff --git a/code/modules/mob/living/update_status.dm b/code/modules/mob/living/update_status.dm
new file mode 100644
index 00000000000..5cbf7cae450
--- /dev/null
+++ b/code/modules/mob/living/update_status.dm
@@ -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
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 4a292328fb6..e312ff9556b 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -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, "... You can almost hear someone talking ...")
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)
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index f7bd04906ea..6cb582e94c1 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -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
diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm
index 90f84b7fc74..a22d9bf3c6b 100644
--- a/code/modules/mob/mob_grab.dm
+++ b/code/modules/mob/mob_grab.dm
@@ -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()
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index aa59991a6cb..b03b9562949 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -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))
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index 4c210f6f8f8..fff30f68155 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -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")
diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm
index dd48c1ce1a4..f8a73364264 100644
--- a/code/modules/mob/new_player/new_player.dm
+++ b/code/modules/mob/new_player/new_player.dm
@@ -565,3 +565,7 @@
/mob/new_player/is_ready()
return ready && ..()
+
+// No hearing announcements
+/mob/new_player/can_hear()
+ return 0
diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm
index f280bec0ce1..d010bdfa135 100644
--- a/code/modules/mob/say.dm
+++ b/code/modules/mob/say.dm
@@ -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
diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm
new file mode 100644
index 00000000000..7358486deee
--- /dev/null
+++ b/code/modules/mob/status_procs.dm
@@ -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
diff --git a/code/modules/mob/update_status.dm b/code/modules/mob/update_status.dm
new file mode 100644
index 00000000000..3893085edb3
--- /dev/null
+++ b/code/modules/mob/update_status.dm
@@ -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
diff --git a/code/modules/nano/interaction/base.dm b/code/modules/nano/interaction/base.dm
index 113c9e2878b..e4e5dd1a33b 100644
--- a/code/modules/nano/interaction/base.dm
+++ b/code/modules/nano/interaction/base.dm
@@ -14,10 +14,10 @@
/mob/proc/shared_nano_interaction()
if(stat || !client)
return STATUS_CLOSE // no updates, close the interface
- else if(restrained() || lying || stunned || weakened)
+ else if(incapacitated())
return STATUS_UPDATE // update only (orange visibility)
return STATUS_INTERACTIVE
-
+
/mob/dead/observer/shared_nano_interaction()
if(check_rights(R_ADMIN, 0, src))
return STATUS_INTERACTIVE // Admins are more equal
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 0f6d41fc145..420733f7c76 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -122,7 +122,7 @@
if(ishuman(mob))
//Hilariously enough, running into a closet should make you get hit the hardest.
var/mob/living/carbon/human/H = mob
- H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
+ H.AdjustHallucinate(max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)))))
var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
mob.apply_effect(rads, IRRADIATE)
@@ -189,7 +189,7 @@
var/obj/item/organ/internal/eyes/eyes = l.get_int_organ(/obj/item/organ/internal/eyes)
if(!istype(eyes))
continue
- l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) )
+ l.Hallucinate(min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)))))
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) )
diff --git a/code/modules/power/treadmill.dm b/code/modules/power/treadmill.dm
index 0dc2bbb5f76..7c263157342 100644
--- a/code/modules/power/treadmill.dm
+++ b/code/modules/power/treadmill.dm
@@ -71,7 +71,7 @@
var/mob_speed = M.movement_delay()
switch(M.m_intent)
if("run")
- if(M.drowsyness > 0)
+ if(M.drowsy > 0)
mob_speed += 6
mob_speed += config.run_speed - 1
if("walk")
diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm
index 0ae9b10752e..275e2ec94e5 100644
--- a/code/modules/projectiles/projectile/bullets.dm
+++ b/code/modules/projectiles/projectile/bullets.dm
@@ -23,18 +23,18 @@
/obj/item/projectile/bullet/weakbullet/booze/on_hit(atom/target, blocked = 0)
if(..(target, blocked))
var/mob/living/M = target
- M.dizziness += 20
- M.slurring += 20
- M.confused += 20
- M.eye_blurry += 20
- M.drowsyness += 20
+ M.AdjustDizzy(20)
+ M.AdjustSlur(20)
+ M.AdjustConfused(20)
+ M.AdjustEyeBlurry(20)
+ M.AdjustDrowsy(20)
for(var/datum/reagent/ethanol/A in M.reagents.reagent_list)
M.AdjustParalysis(2)
- M.dizziness += 10
- M.slurring += 10
- M.confused += 10
- M.eye_blurry += 10
- M.drowsyness += 10
+ M.AdjustDizzy(10)
+ M.AdjustSlur(10)
+ M.AdjustConfused(10)
+ M.AdjustEyeBlurry(10)
+ M.AdjustDrowsy(10)
A.volume += 5 //Because we can
/obj/item/projectile/bullet/weakbullet2 //detective revolver instastuns, but multiple shots are better for keeping punks down
@@ -216,7 +216,7 @@
..(target, blocked)
if(iscarbon(target))
var/mob/living/carbon/M = target
- M.silent = max(M.silent, 10)
+ M.Silence(10)
else if(istype(target, /obj/mecha/combat/honker))
var/obj/mecha/chassis = target
chassis.occupant_message("A mimetech anti-honk bullet has hit \the [chassis]!")
diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm
index 0e1b7478cc8..bcc4335f66a 100644
--- a/code/modules/projectiles/projectile/special.dm
+++ b/code/modules/projectiles/projectile/special.dm
@@ -186,7 +186,7 @@
if(ishuman(target))
var/mob/living/carbon/human/M = target
M.adjustBrainLoss(20)
- M.hallucination += 20
+ M.AdjustHallucinate(20)
/obj/item/projectile/clown
name = "snap-pop"
diff --git a/code/modules/reagents/newchem/Blob-Reagents.dm b/code/modules/reagents/newchem/Blob-Reagents.dm
index fa5e9747e34..a7cfa32f403 100644
--- a/code/modules/reagents/newchem/Blob-Reagents.dm
+++ b/code/modules/reagents/newchem/Blob-Reagents.dm
@@ -61,7 +61,7 @@
volume = ..()
M.apply_damage(0.4*volume, BRUTE)
M.apply_damage(1*volume, OXY)
- M.losebreath += round(0.3*volume)
+ M.AdjustLoseBreath(round(0.3*volume))
/datum/reagent/blob/kinetic //does semi-random brute damage
diff --git a/code/modules/reagents/newchem/disease.dm b/code/modules/reagents/newchem/disease.dm
index def94ba9a2c..cdc2d0b8d43 100644
--- a/code/modules/reagents/newchem/disease.dm
+++ b/code/modules/reagents/newchem/disease.dm
@@ -131,12 +131,12 @@
color = "#EC536D" // rgb: 236, 83, 109
/datum/reagent/synaphydramine/on_mob_life(mob/living/M)
- M.drowsyness = max(M.drowsyness-5, 0)
+ M.AdjustDrowsy(-5)
if(holder.has_reagent("lsd"))
holder.remove_reagent("lsd", 5)
if(holder.has_reagent("histamine"))
holder.remove_reagent("histamine", 5)
- M.hallucination = max(0, M.hallucination - 10)
+ M.AdjustHallucinate(-10)
if(prob(30))
M.adjustToxLoss(1)
..()
@@ -317,4 +317,4 @@
if(B && B.data)
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
if(D)
- D.Devolve()
\ No newline at end of file
+ D.Devolve()
diff --git a/code/modules/reagents/newchem/drinks.dm b/code/modules/reagents/newchem/drinks.dm
index b1f789b7f22..da07f7a995f 100644
--- a/code/modules/reagents/newchem/drinks.dm
+++ b/code/modules/reagents/newchem/drinks.dm
@@ -15,7 +15,7 @@
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
/datum/reagent/ginsonic/on_mob_life(mob/living/M)
- M.drowsyness = max(0, M.drowsyness-5)
+ M.AdjustDrowsy(-5)
if(prob(25))
M.AdjustParalysis(-1)
M.AdjustStunned(-1)
diff --git a/code/modules/reagents/newchem/drugs.dm b/code/modules/reagents/newchem/drugs.dm
index 99a637e4fca..bc5b10be569 100644
--- a/code/modules/reagents/newchem/drugs.dm
+++ b/code/modules/reagents/newchem/drugs.dm
@@ -30,7 +30,7 @@
if(severity == 1)
if(effect <= 2)
M.visible_message("[M] looks nervous!")
- M.confused += 15
+ M.AdjustConfused(15)
M.adjustToxLoss(2)
M.Jitter(10)
M.emote("twitch_s")
@@ -55,7 +55,7 @@
M.Jitter(10)
M.adjustToxLoss(5)
M.Weaken(1)
- M.confused += 33
+ M.AdjustConfused(33)
else if(effect <= 7)
M.emote("collapse")
to_chat(M, "Your heart is pounding!")
@@ -90,7 +90,7 @@
if(prob(4))
to_chat(M, "You feel kinda awful!")
M.adjustToxLoss(1)
- M.jitteriness += 30
+ M.AdjustJitter(30)
M.emote(pick("groan", "moan"))
..()
@@ -99,7 +99,7 @@
if(severity == 1)
if(effect <= 2)
M.visible_message("[M] looks confused!")
- M.confused += 20
+ M.AdjustConfused(20)
M.Jitter(20)
M.emote("scream")
else if(effect <= 4)
@@ -123,7 +123,7 @@
M.adjustToxLoss(2)
M.adjustBrainLoss(8)
M.Weaken(3)
- M.confused += 25
+ M.AdjustConfused(25)
M.emote("scream")
M.reagents.add_reagent("jagged_crystals", 5)
else if(effect <= 7)
@@ -160,7 +160,7 @@
/datum/reagent/krokodil/on_mob_life(mob/living/M)
- M.jitteriness -= 40
+ M.AdjustJitter(-40)
if(prob(25))
M.adjustBrainLoss(1)
if(prob(15))
@@ -241,8 +241,8 @@
if(prob(5))
M.emote(pick("twitch_s","blink_r","shiver"))
if(current_cycle >= 25)
- M.jitteriness += 5
- M.drowsyness = max(0, M.drowsyness-10)
+ M.AdjustJitter(5)
+ M.AdjustDrowsy(-10)
M.AdjustParalysis(-2.5)
M.AdjustStunned(-2.5)
M.AdjustWeakened(-2.5)
@@ -262,7 +262,7 @@
if(severity == 1)
if(effect <= 2)
M.visible_message("[M] can't seem to control their legs!")
- M.confused += 20
+ M.AdjustConfused(20)
M.Weaken(4)
else if(effect <= 4)
M.visible_message("[M]'s hands flip out and flail everywhere!")
@@ -296,7 +296,7 @@
for(var/mob/living/carbon/C in range(T, 1))
if(C.can_breathe_gas())
C.emote("gasp")
- C.losebreath++
+ C.AdjustLoseBreath(1)
C.reagents.add_reagent("toxin", 10)
C.reagents.add_reagent("neurotoxin2", 20)
@@ -342,15 +342,15 @@
M.SetWeakened(0)
if(check < 30)
M.emote(pick("twitch", "twitch_s", "scream", "drool", "grumble", "mumble"))
- M.druggy = max(M.druggy, 15)
+ M.Druggy(15)
if(check < 20)
- M.confused += 10
+ M.AdjustConfused(10)
if(check < 8)
M.reagents.add_reagent(pick("methamphetamine", "crank", "neurotoxin"), rand(1,5))
M.visible_message("[M] scratches at something under their skin!")
M.adjustBruteLoss(5)
else if(check < 16)
- M.hallucination += 30
+ M.AdjustHallucinate(30)
else if(check < 24)
to_chat(M, "They're coming for you!")
else if(check < 28)
@@ -373,7 +373,7 @@
if(severity == 1)
if(effect <= 2)
M.visible_message("[M] flails around like a lunatic!")
- M.confused += 25
+ M.AdjustConfused(25)
M.Jitter(10)
M.emote("scream")
M.reagents.add_reagent("jagged_crystals", 5)
@@ -383,7 +383,7 @@
M.adjustToxLoss(2)
M.adjustBrainLoss(1)
M.Stun(3)
- M.eye_blurry = max(M.eye_blurry, 7)
+ M.EyeBlurry(7)
M.reagents.add_reagent("jagged_crystals", 5)
else if(effect <= 7)
M.emote("faint")
@@ -394,7 +394,7 @@
M.adjustToxLoss(2)
M.adjustBrainLoss(1)
M.Stun(3)
- M.eye_blurry = max(M.eye_blurry, 7)
+ M.EyeBlurry(7)
M.reagents.add_reagent("jagged_crystals", 5)
else if(effect <= 4)
M.visible_message("[M] convulses violently and falls to the floor!")
@@ -479,7 +479,7 @@
to_chat(M, "You cannot breathe!")
M.adjustOxyLoss(15)
M.Stun(1)
- M.losebreath++
+ M.AdjustLoseBreath(1)
..()
/datum/reagent/thc
@@ -497,10 +497,10 @@
if(prob(5))
to_chat(M, "[pick("You feel hungry.","Your stomach rumbles.","You feel cold.","You feel warm.")]")
if(prob(4))
- M.confused = max(M.confused, 10)
+ M.Confused(10)
if(volume >= 50 && prob(25))
if(prob(10))
- M.drowsyness = max(M.drowsyness, 10)
+ M.Drowsy(10)
..()
/datum/reagent/fliptonium
@@ -545,7 +545,7 @@
if(current_cycle == 50)
M.SpinAnimation(speed = 4, loops = -1)
- M.drowsyness = max(0, M.drowsyness-6)
+ M.AdjustDrowsy(-6)
M.AdjustParalysis(-1.5)
M.AdjustStunned(-1.5)
M.AdjustWeakened(-1.5)
@@ -561,7 +561,7 @@
if(severity == 1)
if(effect <= 2)
M.visible_message("[M] can't seem to control their legs!")
- M.confused += 33
+ M.AdjustConfused(33)
M.Weaken(2)
else if(effect <= 4)
M.visible_message("[M]'s hands flip out and flail everywhere!")
@@ -655,7 +655,7 @@
/datum/reagent/surge/on_mob_life(mob/living/M)
- M.druggy = max(M.druggy, 15)
+ M.Druggy(15)
var/high_message = pick("You feel calm.", "You feel collected.", "You feel like you need to relax.")
if(prob(1))
if(prob(1))
diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/newchem/medicine.dm
index 777c10ebfd7..a84ac83f385 100644
--- a/code/modules/reagents/newchem/medicine.dm
+++ b/code/modules/reagents/newchem/medicine.dm
@@ -167,7 +167,7 @@
M.adjustBruteLoss(-2*REM)
M.adjustFireLoss(-2*REM)
if(prob(50))
- M.losebreath -= 1
+ M.AdjustLoseBreath(-1)
..()
/datum/reagent/omnizine/overdose_process(mob/living/M, severity)
@@ -181,7 +181,7 @@
M.Weaken(4)
else if(effect <= 3)
M.visible_message("[M] completely spaces out for a moment.")
- M.confused += 15
+ M.AdjustConfused(15)
else if(effect <= 5)
M.visible_message("[M] stumbles and staggers.")
M.Dizzy(5)
@@ -317,7 +317,7 @@
/datum/reagent/salbutamol/on_mob_life(mob/living/M)
M.adjustOxyLoss(-6*REM)
- M.losebreath = max(0, M.losebreath-4)
+ M.AdjustLoseBreath(-4)
..()
/datum/chemical_reaction/salbutamol
@@ -341,8 +341,8 @@
/datum/reagent/perfluorodecalin/on_mob_life(mob/living/carbon/human/M)
M.adjustOxyLoss(-25*REM)
if(volume >= 4)
- M.losebreath = max(M.losebreath, 6)
- M.silent = max(M.silent, 6)
+ M.LoseBreath(6)
+ M.Silence(6)
if(prob(33))
M.adjustBruteLoss(-1*REM)
M.adjustFireLoss(-1*REM)
@@ -369,13 +369,12 @@
addiction_chance = 25
/datum/reagent/ephedrine/on_mob_life(mob/living/M)
- M.drowsyness = max(0, M.drowsyness-5)
+ M.AdjustDrowsy(-5)
M.AdjustParalysis(-1)
M.AdjustStunned(-1)
M.AdjustWeakened(-1)
M.adjustStaminaLoss(-1*REM)
- if(M.losebreath > 5)
- M.losebreath = max(5, M.losebreath-1)
+ M.AdjustLoseBreath(-1, bound_lower = 5)
if(M.oxyloss > 75)
M.adjustOxyLoss(-1)
if(M.health < 0 || M.health > 0 && prob(33))
@@ -422,14 +421,14 @@
addiction_chance = 10
/datum/reagent/diphenhydramine/on_mob_life(mob/living/M)
- M.jitteriness = max(0, M.jitteriness-20)
+ M.AdjustJitter(-20)
M.reagents.remove_reagent("histamine",3)
M.reagents.remove_reagent("itching_powder",3)
if(prob(7))
M.emote("yawn")
if(prob(3))
M.Stun(2)
- M.drowsyness += 1
+ M.AdjustDrowsy(1)
M.visible_message("[M] looks a bit dazed.")
..()
@@ -453,16 +452,16 @@
shock_reduction = 50
/datum/reagent/morphine/on_mob_life(mob/living/M)
- M.jitteriness = max(0, M.jitteriness-25)
+ M.AdjustJitter(-25)
switch(current_cycle)
if(1 to 15)
if(prob(7))
M.emote("yawn")
if(16 to 35)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
if(36 to INFINITY)
M.Paralyse(15)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.traumatic_shock < 100)
@@ -476,16 +475,16 @@
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if(istype(E))
E.damage = max(E.damage-1, 0)
- M.eye_blurry = max(M.eye_blurry-1 , 0)
- M.adjustEarDamage(-1,0)
+ M.AdjustEyeBlurry(-1)
+ M.AdjustEarDamage(-1)
if(prob(50))
- M.disabilities &= ~NEARSIGHTED
+ M.CureNearsighted()
if(prob(30))
- M.disabilities &= ~BLIND
- M.eye_blind = 0
+ M.CureBlind()
+ M.SetEyeBlind(0)
if(M.ear_damage <= 25)
if(prob(30))
- M.setEarDamage(-1,0)
+ M.SetEarDeaf(0)
..()
/datum/chemical_reaction/oculine
@@ -515,12 +514,11 @@
overdose_threshold = 25
/datum/reagent/atropine/on_mob_life(mob/living/M)
- M.dizziness += 1
- M.confused = max(M.confused, 5)
+ M.AdjustDizzy(1)
+ M.Confused(5)
if(prob(4))
M.emote("collapse")
- if(M.losebreath > 5)
- M.losebreath = max(5, M.losebreath-5)
+ M.AdjustLoseBreath(-5, bound_lower = 5)
if(M.oxyloss > 65)
M.adjustOxyLoss(-10*REM)
if(M.health < -25)
@@ -550,7 +548,7 @@
overdose_threshold = 20
/datum/reagent/epinephrine/on_mob_life(mob/living/M)
- M.drowsyness = max(0, M.drowsyness-5)
+ M.AdjustDrowsy(-5)
if(prob(20))
M.AdjustParalysis(-1)
if(prob(20))
@@ -562,8 +560,7 @@
if(prob(5))
M.adjustBrainLoss(-1)
holder.remove_reagent("histamine", 15)
- if(M.losebreath > 3)
- M.losebreath--
+ M.AdjustLoseBreath(-1, bound_lower = 3)
if(M.oxyloss > 35)
M.adjustOxyLoss(-10*REM)
if(M.health < -10 && M.health > -65)
@@ -694,7 +691,7 @@
color = "#D1D1F1"
/datum/reagent/mutadone/on_mob_life(mob/living/carbon/human/M)
- M.jitteriness = 0
+ M.SetJitter(0)
var/needs_update = M.mutations.len > 0 || M.disabilities > 0
if(needs_update)
@@ -733,7 +730,7 @@
color = "#009CA8"
/datum/reagent/antihol/on_mob_life(mob/living/M)
- M.slurring = 0
+ M.SetSlur(0)
M.AdjustDrunk(-4)
M.reagents.remove_all_type(/datum/reagent/ethanol, 8, 0, 1)
if(M.toxloss <= 25)
@@ -763,10 +760,10 @@
M.adjustBruteLoss(-10*REM)
M.adjustFireLoss(-10*REM)
M.setStaminaLoss(0)
- M.slowed = 0
- M.dizziness = max(0,M.dizziness-10)
- M.drowsyness = max(0,M.drowsyness-10)
- M.confused = 0
+ M.SetSlowed(0)
+ M.AdjustDizzy(-10)
+ M.AdjustDrowsy(-10)
+ M.SetConfused(0)
M.SetSleeping(0)
var/status = CANSTUN | CANWEAKEN | CANPARALYSE
M.status_flags &= ~status
@@ -811,7 +808,7 @@
if(prob(33))
M.adjustStaminaLoss(2.5*REM)
M.adjustToxLoss(1*REM)
- M.losebreath++
+ M.AdjustLoseBreath(1)
/datum/reagent/insulin
name = "Insulin"
@@ -882,11 +879,11 @@
M.reagents.remove_reagent("bath_salts", 5)
M.reagents.remove_reagent("lsd", 5)
M.reagents.remove_reagent("thc", 5)
- M.druggy -= 5
- M.hallucination -= 5
- M.jitteriness -= 5
+ M.AdjustDruggy(-5)
+ M.AdjustHallucinate(-5)
+ M.AdjustJitter(-5)
if(prob(50))
- M.drowsyness = max(M.drowsyness, 3)
+ M.Drowsy(3)
if(prob(10))
M.emote("drool")
if(prob(20))
@@ -910,16 +907,16 @@
color = "#96DEDE"
/datum/reagent/ether/on_mob_life(mob/living/M)
- M.jitteriness = max(M.jitteriness-25,0)
+ M.AdjustJitter(-25)
switch(current_cycle)
if(1 to 15)
if(prob(7))
M.emote("yawn")
if(16 to 35)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
if(36 to INFINITY)
M.Paralyse(15)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
..()
/datum/chemical_reaction/ether
@@ -960,7 +957,7 @@
M.AdjustParalysis(-1)
M.AdjustStunned(-1)
M.AdjustWeakened(-1)
- M.confused = max(0, M.confused-5)
+ M.AdjustConfused(-5)
for(var/datum/reagent/R in M.reagents.reagent_list)
if(R != src)
if(R.id == "ultralube" || R.id == "lube")
@@ -1037,7 +1034,7 @@
M.Weaken(4)
else if(effect <= 3)
M.visible_message("[M] completely spaces out for a moment.")
- M.confused += 15
+ M.AdjustConfused(15)
else if(effect <= 5)
M.visible_message("[M] stumbles and staggers.")
M.Dizzy(5)
diff --git a/code/modules/reagents/newchem/pyro.dm b/code/modules/reagents/newchem/pyro.dm
index 6dece72544c..05ecb1b1206 100644
--- a/code/modules/reagents/newchem/pyro.dm
+++ b/code/modules/reagents/newchem/pyro.dm
@@ -356,12 +356,13 @@
if(!ear_safety)
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
- M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15))
+ M.AdjustEarDamage(rand(0, 5))
+ M.EarDeaf(15)
if(M.ear_damage >= 15)
to_chat(M, "Your ears start to ring badly!")
- if(prob(M.ear_damage - 10 + 5))
+ if(prob(M.ear_damage - 5))
to_chat(M, "You can't hear anything!")
- M.disabilities |= DEAF
+ M.BecomeDeaf()
else
if(M.ear_damage >= 5)
to_chat(M, "Your ears start to ring!")
@@ -384,10 +385,11 @@
if(!ear_safety)
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
- M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15))
+ M.AdjustEarDamage(rand(0, 5))
+ M.EarDeaf(15)
if(M.ear_damage >= 15)
to_chat(M, "Your ears start to ring badly!")
- if(prob(M.ear_damage - 10 + 5))
+ if(prob(M.ear_damage - 5))
to_chat(M, "You can't hear anything!")
M.disabilities |= DEAF
else
@@ -619,4 +621,4 @@
if(method == TOUCH)
M.adjust_fire_stacks(volume / 5)
return
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/newchem/toxins.dm b/code/modules/reagents/newchem/toxins.dm
index 56d64d9a62e..d8e8205b1f7 100644
--- a/code/modules/reagents/newchem/toxins.dm
+++ b/code/modules/reagents/newchem/toxins.dm
@@ -41,7 +41,7 @@
if(prob(10))
to_chat(M, "Your eyes itch.")
M.emote(pick("blink", "sneeze"))
- M.eye_blurry += 3
+ M.AdjustEyeBlurry(3)
if(prob(10))
M.visible_message("[M] scratches at an itch.")
M.adjustBruteLoss(1)
@@ -141,7 +141,7 @@
if(prob(4))
M.visible_message("[M] starts convulsing violently!", "You feel as if your body is tearing itself apart!")
M.Weaken(15)
- M.jitteriness += 1000
+ M.AdjustJitter(1000)
spawn(rand(20, 100))
M.gib()
@@ -159,19 +159,19 @@
current_cycle++
return
if(5 to 8)
- M.dizziness += 1
- M.confused = max(M.confused, 10)
+ M.AdjustDizzy(1)
+ M.Confused(10)
if(9 to 12)
- M.drowsyness = max(M.drowsyness, 10)
- M.dizziness += 1
- M.confused = max(M.confused, 20)
+ M.Drowsy(10)
+ M.AdjustDizzy(1)
+ M.Confused(20)
if(13)
M.emote("faint")
if(14 to INFINITY)
M.Paralyse(10)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
- M.jitteriness = max(0, M.jitteriness-30)
+ M.AdjustJitter(-30)
if(M.getBrainLoss() <= 80)
M.adjustBrainLoss(1)
else
@@ -207,7 +207,7 @@
M.emote("drool")
if(prob(10))
to_chat(M, "You cannot breathe!")
- M.losebreath += 1
+ M.AdjustLoseBreath(1)
M.emote("gasp")
if(prob(8))
to_chat(M, "You feel horrendously weak!")
@@ -261,7 +261,7 @@
to_chat(M, "AHHHHHH!")
M.adjustBruteLoss(5)
M.Weaken(5)
- M.jitteriness += 6
+ M.AdjustJitter(6)
M.visible_message("[M] falls to the floor, scratching themselves violently!")
M.emote("scream")
..()
@@ -364,11 +364,11 @@
if(prob(10))
to_chat(M, "You cannot breathe!")
M.adjustOxyLoss(10)
- M.losebreath++
+ M.AdjustLoseBreath(1)
if(prob(10))
to_chat(M, "Your chest is burning with pain!")
M.adjustOxyLoss(10)
- M.losebreath++
+ M.AdjustLoseBreath(1)
M.Stun(3)
M.Weaken(2)
if(ishuman(M))
@@ -425,12 +425,12 @@
M.Weaken(20)
if(prob(10))
M.emote(pick("drool", "tremble", "gasp"))
- M.losebreath++
+ M.AdjustLoseBreath(1)
if(prob(9))
to_chat(M, "You can't [pick("move", "feel your legs", "feel your face", "feel anything")]!")
if(prob(7))
to_chat(M, "You can't breathe!")
- M.losebreath += 3
+ M.AdjustLoseBreath(3)
..()
/datum/reagent/sodium_thiopental
@@ -445,15 +445,15 @@
switch(current_cycle)
if(1)
M.emote("drool")
- M.confused = max(M.confused, 5)
+ M.Confused(5)
if(2 to 4)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
if(5)
M.emote("faint")
M.Weaken(5)
if(6 to INFINITY)
M.Paralyse(20)
- M.jitteriness = max(0, M.jitteriness-50)
+ M.AdjustJitter(-50)
if(prob(10))
M.emote("drool")
M.adjustBrainLoss(1)
@@ -474,7 +474,7 @@
if(prob(25))
M.emote("yawn")
if(6 to 9)
- M.eye_blurry += 5
+ M.AdjustEyeBlurry(5)
if(prob(35))
M.emote("yawn")
if(10)
@@ -502,20 +502,20 @@
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
/datum/reagent/sulfonal/on_mob_life(mob/living/M)
- M.jitteriness = max(0, M.jitteriness-30)
+ M.AdjustJitter(-30)
switch(current_cycle)
if(1 to 10)
if(prob(7))
M.emote("yawn")
if(11 to 20)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
if(21)
M.emote("faint")
if(22 to INFINITY)
if(prob(20))
M.emote("faint")
M.Paralyse(5)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
M.adjustToxLoss(1)
..()
@@ -570,7 +570,7 @@
/datum/reagent/coniine/on_mob_life(mob/living/M)
M.adjustToxLoss(2)
- M.losebreath += 5
+ M.AdjustLoseBreath(5)
..()
/datum/reagent/curare
@@ -590,7 +590,7 @@
if(prob(20))
M.emote(pick("drool", "pale", "gasp"))
if(6 to 10)
- M.eye_blurry += 5
+ M.AdjustEyeBlurry(5)
if(prob(8))
to_chat(M, "You feel [pick("weak", "horribly weak", "numb", "like you can barely move", "tingly")].")
M.Stun(1)
@@ -598,12 +598,12 @@
M.emote(pick("drool","pale", "gasp"))
if(11 to INFINITY)
M.Stun(30)
- M.drowsyness = max(M.drowsyness, 20)
+ M.Drowsy(20)
if(prob(20))
M.emote(pick("drool", "faint", "pale", "gasp", "collapse"))
else if(prob(8))
to_chat(M, "You can't [pick("breathe", "move", "feel your legs", "feel your face", "feel anything")]!")
- M.losebreath++
+ M.AdjustLoseBreath(1)
..()
/datum/reagent/sarin
@@ -636,22 +636,22 @@
/datum/reagent/sarin/on_mob_life(mob/living/M)
switch(current_cycle)
if(1 to 15)
- M.jitteriness += 20
+ M.AdjustJitter(20)
if(prob(20))
M.emote(pick("twitch","twitch_s","quiver"))
if(16 to 30)
if(prob(25))
M.emote(pick("twitch","twitch","drool","quiver","tremble"))
- M.eye_blurry += 5
- M.stuttering = max(M.stuttering, 5)
+ M.AdjustEyeBlurry(5)
+ M.Stuttering(5)
if(prob(10))
- M.confused = max(M.confused, 15)
+ M.Confused(15)
if(prob(15))
M.Stun(1)
M.emote("scream")
if(30 to 60)
- M.eye_blurry += 5
- M.stuttering = max(M.stuttering, 5)
+ M.AdjustEyeBlurry(5)
+ M.Stuttering(5)
if(prob(10))
M.Stun(1)
M.emote(pick("twitch","twitch","drool","shake","tremble"))
@@ -660,15 +660,15 @@
if(prob(5))
M.Weaken(3)
M.visible_message("[M] has a seizure!")
- M.jitteriness = 1000
+ M.SetJitter(1000)
if(prob(5))
to_chat(M, "You can't breathe!")
M.emote(pick("gasp", "choke", "cough"))
- M.losebreath++
+ M.AdjustLoseBreath(1)
if(61 to INFINITY)
if(prob(15))
M.emote(pick("gasp", "choke", "cough","twitch", "shake", "tremble","quiver","drool", "twitch","collapse"))
- M.losebreath = max(5, M.losebreath + 5)
+ M.LoseBreath(5)
M.adjustToxLoss(1)
M.adjustBrainLoss(1)
M.Weaken(4)
@@ -754,16 +754,16 @@
/datum/reagent/capulettium/on_mob_life(mob/living/M)
switch(current_cycle)
if(1 to 5)
- M.eye_blurry += 10
+ M.AdjustEyeBlurry(10)
if(6 to 10)
- M.drowsyness = max(M.drowsyness, 10)
+ M.Drowsy(10)
if(11)
M.Paralyse(10)
M.visible_message("[M] seizes up and falls limp, their eyes dead and lifeless...") //so you can't trigger deathgasp emote on people. Edge case, but necessary.
if(12 to 60)
M.Paralyse(10)
if(61 to INFINITY)
- M.eye_blurry += 10
+ M.AdjustEyeBlurry(10)
..()
/datum/reagent/capulettium_plus
@@ -783,7 +783,7 @@
mix_message = "The solution begins to slosh about violently by itself."
/datum/reagent/capulettium_plus/on_mob_life(mob/living/M)
- M.silent = max(M.silent, 2)
+ M.Silence(2)
..()
/datum/reagent/toxic_slurry
@@ -884,4 +884,4 @@
var/location = get_turf(holder.my_atom)
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(6, 1, location)
- s.start()
\ No newline at end of file
+ s.start()
diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_alcohol.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_alcohol.dm
index da92ffee0f2..e337aa10e1f 100644
--- a/code/modules/reagents/oldchem/reagents/drink/reagents_alcohol.dm
+++ b/code/modules/reagents/oldchem/reagents/drink/reagents_alcohol.dm
@@ -13,7 +13,7 @@
/datum/reagent/ethanol/on_mob_life(mob/living/M)
M.nutrition += nutriment_factor
M.AdjustDrunk(alcohol_perc)
- M.dizziness += dizzy_adj
+ M.AdjustDizzy(dizzy_adj)
..()
@@ -84,7 +84,7 @@
//copy paste from LSD... shoot me
/datum/reagent/ethanol/absinthe/on_mob_life(mob/living/M)
- M.hallucination += 5
+ M.AdjustHallucinate(5)
..()
/datum/reagent/ethanol/absinthe/overdose_process(mob/living/M, severity)
@@ -97,10 +97,7 @@
color = "#664300" // rgb: 102, 67, 0
overdose_threshold = 30
alcohol_perc = 0.4
-
-/datum/reagent/ethanol/rum/on_mob_life(mob/living/M)
- M.dizziness +=5
- ..()
+ dizzy_adj = 5
/datum/reagent/ethanol/rum/overdose_process(mob/living/M, severity)
M.adjustToxLoss(1)
@@ -182,7 +179,7 @@
/datum/reagent/ethanol/thirteenloko/on_mob_life(mob/living/M)
M.nutrition += nutriment_factor
- M.drowsyness = max(0, M.drowsyness-7)
+ M.AdjustDrowsy(-7)
M.AdjustSleeping(-2)
if(M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
@@ -625,7 +622,7 @@
/datum/reagent/ethanol/neurotoxin/on_mob_life(mob/living/M)
M.weakened = max(M.weakened, 3)
if(current_cycle >=55)
- M.druggy = max(M.druggy, 55)
+ M.Druggy(55)
if(current_cycle >=200)
M.adjustToxLoss(2)
..()
@@ -637,10 +634,7 @@
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
alcohol_perc = 0.7
-
-/datum/reagent/ethanol/changelingsting/on_mob_life(mob/living/M)
- M.dizziness +=5
- ..()
+ dizzy_adj = 5
/datum/reagent/ethanol/irishcarbomb
name = "Irish Car Bomb"
@@ -649,10 +643,7 @@
reagent_state = LIQUID
color = "#2E6671" // rgb: 46, 102, 113
alcohol_perc = 0.3
-
-/datum/reagent/ethanol/irishcarbomb/on_mob_life(mob/living/M)
- M.dizziness +=5
- ..()
+ dizzy_adj = 5
/datum/reagent/ethanol/syndicatebomb
name = "Syndicate Bomb"
@@ -677,9 +668,9 @@
nutriment_factor = 1 * FOOD_METABOLISM
color = "#2E6671" // rgb: 46, 102, 113
alcohol_perc = 0.5
+ dizzy_adj = 10
/datum/reagent/ethanol/driestmartini/on_mob_life(mob/living/M)
- M.dizziness +=10
if(current_cycle >= 55 && current_cycle < 115)
M.stuttering += 10
..()
@@ -692,8 +683,8 @@
alcohol_perc = 0.2
/datum/reagent/ethanol/kahlua/on_mob_life(mob/living/M)
- M.dizziness = max(0, M.dizziness-5)
- M.drowsyness = max(0, M.drowsyness-3)
+ M.AdjustDizzy(-5)
+ M.AdjustDrowsy(-3)
M.AdjustSleeping(-2)
M.Jitter(5)
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm
index 26bad6c1665..869e9295bf5 100644
--- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm
+++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink.dm
@@ -38,8 +38,8 @@
color = "#973800" // rgb: 151, 56, 0
/datum/reagent/drink/carrotjuicde/on_mob_life(mob/living/M)
- M.eye_blurry = max(M.eye_blurry-1 , 0)
- M.eye_blind = max(M.eye_blind-1 , 0)
+ M.AdjustEyeBlurry(-1)
+ M.AdjustEyeBlind(-1)
switch(current_cycle)
if(1 to 20)
//nothing
@@ -282,4 +282,4 @@
if(ishuman(M) && M.job in list("Mime"))
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm
index 1868489adb7..6e30efb9423 100644
--- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm
+++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_base.dm
@@ -14,9 +14,9 @@
/datum/reagent/drink/on_mob_life(mob/living/M)
M.nutrition += nutriment_factor
if(adj_dizzy)
- M.dizziness = max(0, M.dizziness + adj_dizzy)
+ M.AdjustDizzy(adj_dizzy)
if(adj_drowsy)
- M.drowsyness = max(0, M.drowsyness + adj_drowsy)
+ M.AdjustDrowsy(adj_drowsy)
if(adj_sleepy)
M.AdjustSleeping(adj_sleepy)
if(adj_temp_hot)
@@ -25,4 +25,4 @@
if(adj_temp_cool)
if(M.bodytemperature > 310)//310 is the normal bodytemp. 310.055
M.bodytemperature = max(310, M.bodytemperature - (adj_temp_cool * TEMPERATURE_DAMAGE_COEFFICIENT))
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm
index fe54ed97246..26164571769 100644
--- a/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm
+++ b/code/modules/reagents/oldchem/reagents/drink/reagents_drink_cold.dm
@@ -48,9 +48,9 @@
/datum/reagent/drink/cold/nuka_cola/on_mob_life(mob/living/M)
M.Jitter(20)
- M.druggy = max(M.druggy, 30)
- M.dizziness +=5
- M.drowsyness = 0
+ M.Druggy(30)
+ M.AdjustDizzy(5)
+ M.SetDrowsy(0)
M.status_flags |= GOTTAGOFAST
..()
@@ -121,4 +121,4 @@
/datum/reagent/drink/cold/rewriter/on_mob_life(mob/living/M)
M.Jitter(5)
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/oldchem/reagents/reagents_admin.dm b/code/modules/reagents/oldchem/reagents/reagents_admin.dm
index ccc617d2aaa..09636bd111f 100644
--- a/code/modules/reagents/oldchem/reagents/reagents_admin.dm
+++ b/code/modules/reagents/oldchem/reagents/reagents_admin.dm
@@ -14,7 +14,6 @@
M.adjustBruteLoss(-5)
M.adjustFireLoss(-5)
M.adjustToxLoss(-5)
- M.hallucination = 0
M.setBrainLoss(0)
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -24,20 +23,28 @@
for(var/obj/item/organ/external/E in H.organs)
if(E.mend_fracture())
E.perma_injury = 0
- M.disabilities = 0
- M.eye_blurry = 0
- M.eye_blind = 0
+ M.SetEyeBlind(0)
+ M.CureNearsighted()
+ M.CureBlind()
+ M.CureMute()
+ M.CureDeaf()
+ M.CureEpilepsy()
+ M.CureTourettes()
+ M.CureCoughing()
+ M.CureNervous()
+ M.SetEyeBlurry(0)
M.SetWeakened(0)
M.SetStunned(0)
M.SetParalysis(0)
- M.silent = 0
- M.dizziness = 0
- M.drowsyness = 0
- M.stuttering = 0
- M.slurring = 0
- M.confused = 0
+ M.SetSilence(0)
+ M.SetHallucinate(0)
+ M.SetDizzy(0)
+ M.SetDrowsy(0)
+ M.SetStuttering(0)
+ M.SetSlur(0)
+ M.SetConfused(0)
M.SetSleeping(0)
- M.jitteriness = 0
+ M.SetJitter(0)
for(var/datum/disease/D in M.viruses)
if(D.severity == NONTHREAT)
continue
@@ -73,4 +80,4 @@
outgoing += tocheck
else
outgoing += tocheck
- return outgoing
\ No newline at end of file
+ return outgoing
diff --git a/code/modules/reagents/oldchem/reagents/reagents_drugs.dm b/code/modules/reagents/oldchem/reagents/reagents_drugs.dm
index 7cbc79b41b0..1fd0188287a 100644
--- a/code/modules/reagents/oldchem/reagents/reagents_drugs.dm
+++ b/code/modules/reagents/oldchem/reagents/reagents_drugs.dm
@@ -37,7 +37,7 @@
metabolization_rate = 0.2 * REAGENTS_METABOLISM
/datum/reagent/hippies_delight/on_mob_life(mob/living/M)
- M.druggy = max(M.druggy, 50)
+ M.Druggy(50)
switch(current_cycle)
if(1 to 5)
if(!M.stuttering) M.stuttering = 1
@@ -47,13 +47,13 @@
if(!M.stuttering) M.stuttering = 1
M.Jitter(20)
M.Dizzy(20)
- M.druggy = max(M.druggy, 45)
+ M.Druggy(45)
if(prob(20)) M.emote(pick("twitch","giggle"))
if(10 to INFINITY)
if(!M.stuttering) M.stuttering = 1
M.Jitter(40)
M.Dizzy(40)
- M.druggy = max(M.druggy, 60)
+ M.Druggy(60)
if(prob(30)) M.emote(pick("twitch","giggle"))
..()
@@ -65,8 +65,8 @@
color = "#0000D8"
/datum/reagent/lsd/on_mob_life(mob/living/M)
- M.druggy = max(M.druggy, 15)
- M.hallucination += 10
+ M.Druggy(15)
+ M.AdjustHallucinate(10)
..()
/datum/reagent/space_drugs
@@ -80,7 +80,7 @@
heart_rate_decrease = 1
/datum/reagent/space_drugs/on_mob_life(mob/living/M)
- M.druggy = max(M.druggy, 15)
+ M.Druggy(15)
if(isturf(M.loc) && !istype(M.loc, /turf/space))
if(M.canmove && !M.restrained())
step(M, pick(cardinal))
@@ -94,22 +94,22 @@
color = "#E700E7" // rgb: 231, 0, 231
/datum/reagent/psilocybin/on_mob_life(mob/living/M)
- M.druggy = max(M.druggy, 30)
+ M.Druggy(30)
switch(current_cycle)
if(1 to 5)
- if(!M.stuttering) M.stuttering = 1
+ M.Stuttering(1)
M.Dizzy(5)
if(prob(10)) M.emote(pick("twitch","giggle"))
if(5 to 10)
- if(!M.stuttering) M.stuttering = 1
+ M.Stuttering(1)
M.Jitter(10)
M.Dizzy(10)
- M.druggy = max(M.druggy, 35)
+ M.Druggy(35)
if(prob(20)) M.emote(pick("twitch","giggle"))
if(10 to INFINITY)
- if(!M.stuttering) M.stuttering = 1
+ M.Stuttering(1)
M.Jitter(20)
M.Dizzy(20)
- M.druggy = max(M.druggy, 40)
+ M.Druggy(40)
if(prob(30)) M.emote(pick("twitch","giggle"))
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/oldchem/reagents/reagents_flammable.dm b/code/modules/reagents/oldchem/reagents/reagents_flammable.dm
index 52d33e21e07..61228dfb2d0 100644
--- a/code/modules/reagents/oldchem/reagents/reagents_flammable.dm
+++ b/code/modules/reagents/oldchem/reagents/reagents_flammable.dm
@@ -22,7 +22,7 @@
M.adjustBrainLoss(3)
if(iscultist(M))
M.status_flags |= GOTTAGOFAST
- M.drowsyness = max(M.drowsyness-5, 0)
+ M.AdjustDrowsy(-5)
M.AdjustParalysis(-2)
M.AdjustStunned(-2)
M.AdjustWeakened(-2)
@@ -78,4 +78,4 @@
id = "glycerol"
description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity."
reagent_state = LIQUID
- color = "#808080" // rgb: 128, 128, 128
\ No newline at end of file
+ color = "#808080" // rgb: 128, 128, 128
diff --git a/code/modules/reagents/oldchem/reagents/reagents_food.dm b/code/modules/reagents/oldchem/reagents/reagents_food.dm
index 1dbe1f05a20..de52805fef2 100644
--- a/code/modules/reagents/oldchem/reagents/reagents_food.dm
+++ b/code/modules/reagents/oldchem/reagents/reagents_food.dm
@@ -370,9 +370,9 @@
overdose_threshold = 200 // Hyperglycaemic shock
/datum/reagent/sugar/on_mob_life(mob/living/M)
- M.drowsyness = max(0, M.drowsyness-5)
+ M.AdjustDrowsy(-5)
if(current_cycle >= 90)
- M.jitteriness += 2
+ M.AdjustJitter(2)
if(prob(50))
M.AdjustParalysis(-1)
M.AdjustStunned(-1)
@@ -391,4 +391,3 @@
M.Weaken(4 * severity)
if(prob(8))
M.adjustToxLoss(severity)
-
diff --git a/code/modules/reagents/oldchem/reagents/reagents_med.dm b/code/modules/reagents/oldchem/reagents/reagents_med.dm
index cc5592dd42e..b0a09afc999 100644
--- a/code/modules/reagents/oldchem/reagents/reagents_med.dm
+++ b/code/modules/reagents/oldchem/reagents/reagents_med.dm
@@ -41,7 +41,7 @@
overdose_threshold = 40
/datum/reagent/synaptizine/on_mob_life(mob/living/M)
- M.drowsyness = max(0, M.drowsyness-5)
+ M.AdjustDrowsy(-5)
M.AdjustParalysis(-1)
M.AdjustStunned(-1)
M.AdjustWeakened(-1)
@@ -139,4 +139,4 @@
description = "An all-purpose antibiotic agent extracted from space fungus."
reagent_state = LIQUID
color = "#0AB478"
- metabolization_rate = 0.2
\ No newline at end of file
+ metabolization_rate = 0.2
diff --git a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm b/code/modules/reagents/oldchem/reagents/reagents_toxin.dm
index bbdf92b8693..0aae5e3f40e 100644
--- a/code/modules/reagents/oldchem/reagents/reagents_toxin.dm
+++ b/code/modules/reagents/oldchem/reagents/reagents_toxin.dm
@@ -326,7 +326,7 @@
/datum/reagent/spores/on_mob_life(mob/living/M)
M.adjustToxLoss(1)
M.damageoverlaytemp = 60
- M.eye_blurry = max(M.eye_blurry, 3)
+ M.EyeBlurry(3)
..()
/datum/reagent/beer2 //disguised as normal beer for use by emagged brobots
@@ -385,25 +385,25 @@
to_chat(victim, "Your [safe_thing] protect you from most of the pepperspray!")
if(prob(5))
victim.emote("scream")
- victim.eye_blurry = max(M.eye_blurry, 3)
- victim.eye_blind = max(M.eye_blind, 1)
- victim.confused = max(M.confused, 3)
+ victim.EyeBlurry(3)
+ victim.EyeBlind(1)
+ victim.Confused(3)
victim.damageoverlaytemp = 60
victim.Weaken(3)
victim.drop_item()
return
else if( eyes_covered ) // Eye cover is better than mouth cover
to_chat(victim, "Your [safe_thing] protects your eyes from the pepperspray!")
- victim.eye_blurry = max(M.eye_blurry, 3)
+ victim.EyeBlurry(3)
victim.damageoverlaytemp = 30
return
else // Oh dear :D
if(prob(5))
victim.emote("scream")
to_chat(victim, "You're sprayed directly in the eyes with pepperspray!")
- victim.eye_blurry = max(M.eye_blurry, 5)
- victim.eye_blind = max(M.eye_blind, 2)
- victim.confused = max(M.confused, 6)
+ victim.EyeBlurry(5)
+ victim.EyeBlind(2)
+ victim.Confused(6)
victim.damageoverlaytemp = 75
victim.Weaken(5)
victim.drop_item()
@@ -411,4 +411,4 @@
/datum/reagent/condensedcapsaicin/on_mob_life(mob/living/M)
if(prob(5))
M.visible_message("[M] [pick("dry heaves!","coughs!","splutters!")]")
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/modules/reagents/oldchem/reagents/reagents_water.dm b/code/modules/reagents/oldchem/reagents/reagents_water.dm
index bbfcbeb8142..a2dd3eb7fc4 100644
--- a/code/modules/reagents/oldchem/reagents/reagents_water.dm
+++ b/code/modules/reagents/oldchem/reagents/reagents_water.dm
@@ -264,27 +264,27 @@
process_flags = ORGANIC | SYNTHETIC
/datum/reagent/holywater/on_mob_life(mob/living/M)
- M.jitteriness = max(M.jitteriness-5,0)
+ M.AdjustJitter(-5)
if(current_cycle >= 30) // 12 units, 60 seconds @ metabolism 0.4 units & tick rate 2.0 sec
- M.stuttering = min(M.stuttering+4, 20)
+ M.AdjustStuttering(4, bound_lower = 0, bound_upper = 20)
M.Dizzy(5)
if(iscultist(M) && prob(5))
M.say(pick("Av'te Nar'sie","Pa'lid Mors","INO INO ORA ANA","SAT ANA!","Daim'niodeis Arc'iai Le'eones","Egkau'haom'nai en Chaous","Ho Diak'nos tou Ap'iron","R'ge Na'sie","Diabo us Vo'iscum","Si gn'um Co'nu"))
if(current_cycle >= 75 && prob(33)) // 30 units, 150 seconds
- M.confused += 3
+ M.AdjustConfused(3)
if(isvampirethrall(M))
ticker.mode.remove_vampire_mind(M.mind)
holder.remove_reagent(id, volume)
- M.jitteriness = 0
- M.stuttering = 0
- M.confused = 0
+ M.SetJitter(0)
+ M.SetStuttering(0)
+ M.SetConfused(0)
return
if(iscultist(M))
ticker.mode.remove_cultist(M.mind)
holder.remove_reagent(id, volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
- M.jitteriness = 0
- M.stuttering = 0
- M.confused = 0
+ M.SetJitter(0)
+ M.SetStuttering(0)
+ M.SetConfused(0)
return
if(ishuman(M) && M.mind && M.mind.vampire && !M.mind.vampire.get_ability(/datum/vampire_passive/full) && prob(80))
switch(current_cycle)
diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm
index 373b5d9454f..0e83e5812c3 100644
--- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm
+++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_badfeeling.dm
@@ -37,7 +37,7 @@
to_chat(H, "[pick(messages)]")
if(prob(50))
- H.dizziness += rand(3,5)
+ H.AdjustDizzy(rand(3,5))
/datum/artifact_effect/badfeeling/DoEffectAura()
if(holder)
@@ -50,7 +50,7 @@
to_chat(H, "[pick(drastic_messages)]")
if(prob(10))
- H.dizziness += rand(3,5)
+ H.AdjustDizzy(rand(3,5))
return 1
/datum/artifact_effect/badfeeling/DoEffectPulse()
@@ -64,7 +64,7 @@
to_chat(H, "[pick(messages)]")
if(prob(50))
- H.dizziness += rand(3,5)
+ H.AdjustDizzy(rand(3,5))
else if(prob(25))
- H.dizziness += rand(5,15)
+ H.AdjustDizzy(rand(5,15))
return 1
diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm
index 08639dec98f..dd42c44204c 100644
--- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm
+++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_goodfeeling.dm
@@ -35,7 +35,7 @@
to_chat(H, "[pick(messages)]")
if(prob(50))
- H.dizziness += rand(3,5)
+ H.AdjustDizzy(rand(3,5))
/datum/artifact_effect/goodfeeling/DoEffectAura()
if(holder)
@@ -48,7 +48,7 @@
to_chat(H, "[pick(drastic_messages)]")
if(prob(5))
- H.dizziness += rand(3,5)
+ H.AdjustDizzy(rand(3,5))
return 1
/datum/artifact_effect/goodfeeling/DoEffectPulse()
@@ -62,7 +62,7 @@
to_chat(H, "[pick(messages)]")
if(prob(50))
- H.dizziness += rand(3,5)
+ H.AdjustDizzy(rand(3,5))
else if(prob(25))
- H.dizziness += rand(5,15)
+ H.AdjustDizzy(rand(5,15))
return 1
diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm
index bbb16d76a3d..1f098ddfa6b 100644
--- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm
+++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_sleepy.dm
@@ -13,8 +13,8 @@
if(ishuman(toucher) && prob(weakness * 100))
var/mob/living/carbon/human/H = toucher
to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired."))
- H.drowsyness = min(H.drowsyness + rand(5,25) * weakness, 50 * weakness)
- H.eye_blurry = min(H.eye_blurry + rand(1,3) * weakness, 50 * weakness)
+ H.AdjustDrowsy(rand(5,25) * weakness, bound_lower = 0, bound_upper = 50 * weakness)
+ H.AdjustEyeBlurry(rand(1,3) * weakness, bound_lower = 0, bound_upper = 50 * weakness)
return 1
else if(isrobot(toucher))
to_chat(toucher, "\red SYSTEM ALERT: CPU cycles slowing down.")
@@ -28,8 +28,8 @@
if(prob(weakness * 100))
if(prob(10))
to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired."))
- H.drowsyness = min(H.drowsyness + 1 * weakness, 25 * weakness)
- H.eye_blurry = min(H.eye_blurry + 1 * weakness, 25 * weakness)
+ H.AdjustDrowsy(1 * weakness, bound_lower = 0, bound_upper = 25 * weakness)
+ H.AdjustEyeBlurry(1 * weakness, bound_lower = 0, bound_upper = 25 * weakness)
for(var/mob/living/silicon/robot/R in range(src.effectrange,holder))
to_chat(R, "\red SYSTEM ALERT: CPU cycles slowing down.")
return 1
@@ -41,8 +41,8 @@
var/weakness = GetAnomalySusceptibility(H)
if(prob(weakness * 100))
to_chat(H, pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired."))
- H.drowsyness = min(H.drowsyness + rand(5,15) * weakness, 50 * weakness)
- H.eye_blurry = min(H.eye_blurry + rand(5,15) * weakness, 50 * weakness)
+ H.AdjustDrowsy(rand(5,15) * weakness, bound_lower = 0, bound_upper = 50 * weakness)
+ H.AdjustEyeBlurry(rand(5,15) * weakness, bound_lower = 0, bound_upper = 50 * weakness)
for(var/mob/living/silicon/robot/R in range(src.effectrange,holder))
to_chat(R, "\red SYSTEM ALERT: CPU cycles slowing down.")
return 1
diff --git a/code/modules/research/xenoarchaeology/finds/finds_special.dm b/code/modules/research/xenoarchaeology/finds/finds_special.dm
index ce6fb4c2663..8ddcf27593b 100644
--- a/code/modules/research/xenoarchaeology/finds/finds_special.dm
+++ b/code/modules/research/xenoarchaeology/finds/finds_special.dm
@@ -194,7 +194,7 @@
'sound/hallucinations/turn_around1.ogg',\
'sound/hallucinations/turn_around2.ogg',\
), 50, 1, -3)
- M.sleeping = max(M.sleeping,rand(5,10))
+ M.Sleeping(rand(5,10))
src.loc = null
else
processing_objects.Remove(src)
diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm
index 406c1f83083..6c2f7354b43 100644
--- a/code/modules/surgery/face.dm
+++ b/code/modules/surgery/face.dm
@@ -55,7 +55,7 @@
user.visible_message(" [user]'s hand slips, slicing [target]'s throat wth \the [tool]!" , \
" Your hand slips, slicing [target]'s throat wth \the [tool]!" )
affected.createwound(CUT, 60)
- target.losebreath += 4
+ target.AdjustLoseBreath(4)
return 0
@@ -83,7 +83,7 @@
/datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery)
user.visible_message(" [user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!", \
" Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!")
- target.losebreath += 4
+ target.AdjustLoseBreath(4)
return 0
/datum/surgery_step/face/fix_face
diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm
index 9034393bfe2..f71e9bff0be 100644
--- a/code/modules/surgery/organs/blood.dm
+++ b/code/modules/surgery/organs/blood.dm
@@ -101,7 +101,7 @@
else
adjustOxyLoss(round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1))
if(prob(5))
- eye_blurry = max(eye_blurry, 6)
+ EyeBlurry(6)
var/word = pick("dizzy","woozy","faint")
to_chat(src, "You feel very [word].")
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm
index bb408f51726..18f0e51b2e2 100644
--- a/code/modules/surgery/organs/organ_internal.dm
+++ b/code/modules/surgery/organs/organ_internal.dm
@@ -307,7 +307,7 @@
owner.drip(10)
if(prob(4))
spawn owner.custom_emote(1, "gasps for air!")
- owner.losebreath += 5
+ owner.AdjustLoseBreath(5)
/obj/item/organ/internal/kidneys
name = "kidneys"
@@ -357,10 +357,10 @@
/obj/item/organ/internal/eyes/surgeryize()
if(!owner)
return
- owner.disabilities &= ~NEARSIGHTED
- owner.disabilities &= ~BLIND
- owner.eye_blurry = 0
- owner.eye_blind = 0
+ owner.CureNearsighted()
+ owner.CureBlind()
+ owner.SetEyeBlurry(0)
+ owner.SetEyeBlind(0)
/obj/item/organ/internal/liver
@@ -493,6 +493,7 @@
slot = "brain_tumor"
health = 3
var/organhonked = 0
+ var/suffering_delay = 900
/obj/item/organ/internal/honktumor/New()
..()
@@ -535,11 +536,11 @@
return
if(organhonked < world.time)
- organhonked = world.time+900
+ organhonked = world.time + suffering_delay
to_chat(owner, "HONK")
- owner.sleeping = 0
- owner.stuttering = 20
- owner.adjustEarDamage(0, 30)
+ owner.SetSleeping(0)
+ owner.Stuttering(20)
+ owner.AdjustEarDeaf(30)
owner.Weaken(3)
owner << 'sound/items/AirHorn.ogg'
if(prob(30))
diff --git a/code/modules/surgery/organs/pain.dm b/code/modules/surgery/organs/pain.dm
index 23d2af69bf3..f0b4b912eaf 100644
--- a/code/modules/surgery/organs/pain.dm
+++ b/code/modules/surgery/organs/pain.dm
@@ -15,8 +15,8 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0
if(world.time < next_pain_time && !force)
return
if(amount > 10 && istype(src,/mob/living/carbon/human))
- if(src:paralysis)
- src:paralysis = max(0, src:paralysis-round(amount/10))
+ if(paralysis)
+ AdjustParalysis(-round(amount/10))
if(amount > 50 && prob(amount / 5))
src:drop_item()
var/msg
@@ -132,4 +132,4 @@ mob/living/carbon/human/proc/handle_pain()
toxDamageMessage = "Your body aches all over, it's driving you mad."
if(toxDamageMessage && prob(toxMessageProb))
- src.custom_pain(toxDamageMessage, getToxLoss() >= 15)
\ No newline at end of file
+ src.custom_pain(toxDamageMessage, getToxLoss() >= 15)
diff --git a/code/modules/surgery/organs/subtypes/diona.dm b/code/modules/surgery/organs/subtypes/diona.dm
index 0f75fe9f80f..a4b0d8fb92b 100644
--- a/code/modules/surgery/organs/subtypes/diona.dm
+++ b/code/modules/surgery/organs/subtypes/diona.dm
@@ -169,10 +169,10 @@
/obj/item/organ/internal/diona_receptor/surgeryize()
if(!owner)
return
- owner.disabilities &= ~NEARSIGHTED
- owner.disabilities &= ~BLIND
- owner.eye_blurry = 0
- owner.eye_blind = 0
+ owner.CureNearsighted()
+ owner.CureBlind()
+ owner.SetEyeBlurry(0)
+ owner.SetEyeBlind(0)
//TODO:Make absorb rads on insert
diff --git a/code/modules/surgery/organs/subtypes/machine.dm b/code/modules/surgery/organs/subtypes/machine.dm
index 61b2f143f69..0f402a42e5d 100644
--- a/code/modules/surgery/organs/subtypes/machine.dm
+++ b/code/modules/surgery/organs/subtypes/machine.dm
@@ -142,10 +142,10 @@
/obj/item/organ/internal/optical_sensor/surgeryize()
if(!owner)
return
- owner.disabilities &= ~NEARSIGHTED
- owner.disabilities &= ~BLIND
- owner.eye_blurry = 0
- owner.eye_blind = 0
+ owner.CureNearsighted()
+ owner.CureBlind()
+ owner.SetEyeBlurry(0)
+ owner.SetEyeBlind(0)
// Used for an MMI or posibrain being installed into a human.
diff --git a/paradise.dme b/paradise.dme
index 17f48fd9dba..1cd04564e77 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -1434,9 +1434,11 @@
#include "code\modules\mob\mob_movement.dm"
#include "code\modules\mob\mob_transformation_simple.dm"
#include "code\modules\mob\say.dm"
+#include "code\modules\mob\status_procs.dm"
#include "code\modules\mob\transform_procs.dm"
#include "code\modules\mob\typing_indicator.dm"
#include "code\modules\mob\update_icons.dm"
+#include "code\modules\mob\update_status.dm"
#include "code\modules\mob\camera\camera.dm"
#include "code\modules\mob\dead\death.dm"
#include "code\modules\mob\dead\observer\login.dm"
@@ -1455,6 +1457,8 @@
#include "code\modules\mob\living\login.dm"
#include "code\modules\mob\living\logout.dm"
#include "code\modules\mob\living\say.dm"
+#include "code\modules\mob\living\status_procs.dm"
+#include "code\modules\mob\living\update_status.dm"
#include "code\modules\mob\living\carbon\_defines.dm"
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_defenses.dm"