diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm
index 89802a51ee4..62b1257d51c 100644
--- a/code/_onclick/hud/fullscreen.dm
+++ b/code/_onclick/hud/fullscreen.dm
@@ -22,7 +22,7 @@
screen.severity = severity
screens[category] = screen
- if(client)
+ if(client && stat != DEAD)
client.screen += screen
return screen
@@ -49,9 +49,15 @@
for(var/category in screens)
clear_fullscreen(category)
+/mob/proc/hide_fullscreens()
+ if(client)
+ for(var/category in screens)
+ client.screen -= screens[category]
+
/mob/proc/reload_fullscreen()
- for(var/category in screens)
- client.screen |= screens[category]
+ if(client)
+ for(var/category in screens)
+ client.screen |= screens[category]
/obj/screen/fullscreen
icon = 'icons/mob/screen_full.dmi'
diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm
index 927ca426c3e..9d348506dcf 100644
--- a/code/datums/diseases/advance/symptoms/vision.dm
+++ b/code/datums/diseases/advance/symptoms/vision.dm
@@ -34,15 +34,15 @@ Bonus
M << "Your eyes itch."
if(3, 4)
M << "Your eyes burn!"
- M.set_blurriness(max(M.eye_blurry,10))
- M.adjust_eye_stat(1)
+ M.blur_eyes(10)
+ M.adjust_eye_damage(1)
else
M << "Your eyes burn horrificly!"
- M.set_blurriness(max(M.eye_blurry,20))
- M.adjust_eye_stat(5)
- if(M.eye_stat >= 10)
+ M.blur_eyes(20)
+ M.adjust_eye_damage(5)
+ if(M.eye_damage >= 10)
M.become_nearsighted()
- if(prob(M.eye_stat - 10 + 1))
+ if(prob(M.eye_damage - 10 + 1))
if(M.become_blind())
M << "You go blind!"
diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
index 71f22c791b2..facf2bb191a 100644
--- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
+++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm
@@ -43,7 +43,7 @@
/obj/item/organ/internal/cyberimp/eyes/shield/ling/on_life()
..()
- if(owner.eye_blind>1 || (owner.eye_blind && owner.stat !=UNCONSCIOUS) || owner.eye_stat || owner.eye_blurry || (owner.disabilities & NEARSIGHT))
+ if(owner.eye_blind>1 || (owner.eye_blind && owner.stat !=UNCONSCIOUS) || owner.eye_damage || owner.eye_blurry || (owner.disabilities & NEARSIGHT))
owner.reagents.add_reagent("oculine", 1)
/obj/item/organ/internal/cyberimp/eyes/shield/ling/prepare_eat()
diff --git a/code/game/gamemodes/changeling/powers/headcrab.dm b/code/game/gamemodes/changeling/powers/headcrab.dm
index 1ff2740a6c0..c93fcb06c26 100644
--- a/code/game/gamemodes/changeling/powers/headcrab.dm
+++ b/code/game/gamemodes/changeling/powers/headcrab.dm
@@ -17,8 +17,8 @@
for(var/mob/living/carbon/human/H in range(2,user))
H << "You are blinded by a shower of blood!"
H.Stun(1)
- H.set_blurriness(max(H.eye_blurry,20))
- H.adjust_eye_stat(5)
+ H.blur_eyes(20)
+ H.adjust_eye_damage(5)
H.confused += 3
for(var/mob/living/silicon/S in range(2,user))
S << "Your sensors are disabled by a shower of blood!"
diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm
index 386495b0631..e32b4a2150d 100644
--- a/code/game/gamemodes/changeling/powers/tiny_prick.dm
+++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm
@@ -205,8 +205,8 @@
add_logs(user, target, "stung", "blind sting")
target << "Your eyes burn horrifically!"
target.become_nearsighted()
- target.set_blindness(20)
- target.set_blurriness(40)
+ target.blind_eyes(20)
+ target.blur_eyes(40)
feedback_add_details("changeling_powers","BS")
return 1
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index cdd50a92e4d..99a210a4398 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -420,7 +420,7 @@ datum/reagent/shadowling_blindness_smoke //Reagent used for above spell
M = holder.my_atom
if(!is_shadow_or_thrall(M))
M << "You breathe in the black smoke, and your eyes burn horribly!"
- M.set_blindness(5)
+ M.blind_eyes(5)
if(prob(25))
M.visible_message("[M] claws at their eyes!")
M.Stun(3)
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index ad437bbfb0d..5d086314ea1 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -724,7 +724,7 @@
/obj/item/weapon/spellbook/oneuse/blind/recoil(mob/user)
..()
user <<"You go blind!"
- user.set_blindness(10)
+ user.blind_eyes(10)
/obj/item/weapon/spellbook/oneuse/mindswap
spell = /obj/effect/proc_holder/spell/targeted/mind_transfer
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index b19b3414453..17255ba6ae5 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -815,8 +815,8 @@
/obj/mecha/proc/moved_inside(mob/living/carbon/human/H)
if(H && H.client && H in range(1))
- H.forceMove(src)
occupant = H
+ H.forceMove(src)
add_fingerprint(H)
GrantActions(H, human_occupant=1)
forceMove(loc)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 06e6a583e63..be0fffcf1b6 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -472,8 +472,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
add_logs(user, M, "attacked", "[src.name]", "(INTENT: [uppertext(user.a_intent)])")
M.adjust_blurriness(3)
- M.adjust_eye_stat(rand(2,4))
- if(M.eye_stat >= 10)
+ M.adjust_eye_damage(rand(2,4))
+ if(M.eye_damage >= 10)
M.adjust_blurriness(15)
if(M.stat != DEAD)
M << "Your eyes start to bleed profusely!"
@@ -487,7 +487,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
M.adjust_blurriness(10)
M.Paralyse(1)
M.Weaken(2)
- if (prob(M.eye_stat - 10 + 1))
+ if (prob(M.eye_damage - 10 + 1))
if(M.become_blind())
M << "You go blind!"
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index e4443b842db..c87f085b990 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -192,8 +192,8 @@
user.visible_message("[user] sprays [src] into the face of [target]!")
target << "[user] sprays [src] into your face!"
if(C.client)
- C.set_blurriness(3)
- C.set_blindness(1)
+ C.blur_eyes(3)
+ C.blind_eyes(1)
if(C.check_eye_prot() <= 0) // no eye protection? ARGH IT BURNS.
C.confused = max(C.confused, 3)
C.Weaken(3)
diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm
index 8b97829f90e..102b1c72905 100644
--- a/code/game/objects/items/weapons/defib.dm
+++ b/code/game/objects/items/weapons/defib.dm
@@ -511,7 +511,7 @@
H.stat = UNCONSCIOUS
H.updatehealth()
H.update_sight()
- H.update_vision_overlays()
+ H.reload_fullscreen()
dead_mob_list -= H
living_mob_list |= list(H)
H.emote("gasp")
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index 360aa621405..7c4e4de34fc 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -31,7 +31,7 @@
M << "AAAAGH!"
M.Weaken(15) //hella stunned
M.Stun(15)
- M.adjust_eye_stat(8)
+ M.adjust_eye_damage(8)
if(M.flash_eyes(affect_silicon = 1))
M.Stun(max(10/distance, 3))
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index b61a275d09d..31f9e2aefae 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -10,9 +10,9 @@
if(H.glasses == src)
H << "The [src] overloads and blinds you!"
H.flash_eyes(visual = 1)
- H.set_blindness(3)
- H.set_blurriness(5)
- H.adjust_eye_stat(5)
+ H.blind_eyes(3)
+ H.blur_eyes(5)
+ H.adjust_eye_damage(5)
/obj/item/clothing/glasses/meson
name = "Optical Meson Scanner"
diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm
index 269820aa3f6..8cde367bace 100644
--- a/code/modules/flufftext/Hallucination.dm
+++ b/code/modules/flufftext/Hallucination.dm
@@ -431,7 +431,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.set_blurriness(max(my_target.eye_blurry,3))
+ my_target.blur_eyes(3)
if(prob(33))
if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target)
diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm
index f6a48f29d41..9728c08e2c6 100644
--- a/code/modules/mob/living/carbon/alien/larva/life.dm
+++ b/code/modules/mob/living/carbon/alien/larva/life.dm
@@ -23,7 +23,7 @@
if(paralysis || sleeping || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= config.health_threshold_crit)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
- set_blindness(1)
+ blind_eyes(1)
update_canmove()
else
if(stat == UNCONSCIOUS)
diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm
index a74c233761c..a9363ab8065 100644
--- a/code/modules/mob/living/carbon/brain/life.dm
+++ b/code/modules/mob/living/carbon/brain/life.dm
@@ -62,7 +62,7 @@
if(emp_damage>15)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
- set_blindness(1)
+ blind_eyes(1)
else
if(stat == UNCONSCIOUS)
stat = CONSCIOUS
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 57bcc2efceb..3b517ef6473 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -179,25 +179,25 @@
if(1)
src << "Your eyes sting a little."
if(prob(40))
- adjust_eye_stat(1)
+ adjust_eye_damage(1)
if(2)
src << "Your eyes burn."
- adjust_eye_stat(rand(2, 4))
+ adjust_eye_damage(rand(2, 4))
else
src << "Your eyes itch and burn severely!"
- adjust_eye_stat(rand(12, 16))
+ adjust_eye_damage(rand(12, 16))
- if(eye_stat > 10)
- set_blindness(damage)
- set_blurriness(damage * rand(3, 6))
+ if(eye_damage > 10)
+ blind_eyes(damage)
+ blur_eyes(damage * rand(3, 6))
- if(eye_stat > 20)
- if(prob(eye_stat - 20))
+ if(eye_damage > 20)
+ if(prob(eye_damage - 20))
if(become_nearsighted())
src << "Your eyes start to burn badly!"
- else if(prob(eye_stat - 25))
+ else if(prob(eye_damage - 25))
if(become_blind())
src << "You can't see anything!"
else
@@ -657,68 +657,25 @@ var/const/GALOSHES_DONT_HELP = 4
see_invisible = see_override
-//to recalculate the mob's total tint from tinted equipment it's wearing.
-/mob/living/carbon/proc/update_tinttotal()
+//to recalculate and update the mob's total tint from tinted equipment it's wearing.
+/mob/living/carbon/proc/update_tint()
if(!tinted_weldhelh)
return
- tinttotal = 0
+ tinttotal = get_total_tint()
+ if(tinttotal >= TINT_BLIND)
+ overlay_fullscreen("tint", /obj/screen/fullscreen/blind)
+ else if(tinttotal >= TINT_DARKENED)
+ overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
+ else
+ clear_fullscreen("tint", 0)
+
+/mob/living/carbon/proc/get_total_tint()
+ . = 0
if(istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/HT = head
- tinttotal += HT.tint
+ . += HT.tint
if(wear_mask)
- tinttotal += wear_mask.tint
- update_vision_overlays()
-
-/mob/living/carbon/update_vision_overlays()
- if(!client)
- return
-
- if(stat == DEAD) //if dead we remove all vision impairments
- clear_fullscreens()
- return
-
- if(tinted_weldhelh)
- if(tinttotal >= TINT_BLIND)
- overlay_fullscreen("tint", /obj/screen/fullscreen/blind)
- else if(tinttotal >= TINT_DARKENED)
- overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
- else
- clear_fullscreen("tint", 0)
-
- if(eye_blind)
- overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
- else
- clear_fullscreen("blind")
-
- if(disabilities & NEARSIGHT)
- overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
- else
- clear_fullscreen("nearsighted")
-
- if(eye_blurry)
- overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
- else
- clear_fullscreen("blurry")
-
- if(druggy)
- overlay_fullscreen("high", /obj/screen/fullscreen/high)
- else
- clear_fullscreen("high")
-
- if(eye_stat > 20)
- if(eye_stat > 30)
- overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
- else
- overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
- else
- clear_fullscreen("eye_damage")
-
- if(client.eye != src)
- var/atom/A = client.eye
- A.get_remote_view_fullscreens(src)
- else
- clear_fullscreen("remote_view", 0)
-
+ . += wear_mask.tint
/mob/living/carbon/revive()
setToxLoss(0)
@@ -733,7 +690,7 @@ var/const/GALOSHES_DONT_HELP = 4
radiation = 0
nutrition = NUTRITION_LEVEL_FED + 50
bodytemperature = 310
- eye_stat = 0
+ eye_damage = 0
disabilities = 0
eye_blind = 0
eye_blurry = 0
@@ -769,7 +726,7 @@ var/const/GALOSHES_DONT_HELP = 4
if(HM.quality != POSITIVE)
dna.remove_mutation(HM.name)
update_sight()
- update_vision_overlays()
+ reload_fullscreen()
update_canmove()
@@ -863,7 +820,7 @@ var/const/GALOSHES_DONT_HELP = 4
if(paralysis || sleeping || getOxyLoss() > 50 || (status_flags & FAKEDEATH) || health <= config.health_threshold_crit)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
- set_blindness(1)
+ blind_eyes(1)
update_canmove()
else
if(stat == UNCONSCIOUS)
diff --git a/code/modules/mob/living/carbon/human/blood.dm b/code/modules/mob/living/carbon/human/blood.dm
index 2d1b983ca64..b80c8ffdc34 100644
--- a/code/modules/mob/living/carbon/human/blood.dm
+++ b/code/modules/mob/living/carbon/human/blood.dm
@@ -97,7 +97,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
update_body()
adjustOxyLoss((BLOOD_VOLUME_NORMAL - blood_volume) / 50)
if(prob(5))
- set_blurriness(max(eye_blurry,6))
+ blur_eyes(6)
var/word = pick("dizzy","woozy","faint")
src << "You feel very [word]."
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index cf80ee09f4f..c6ac0aa338b 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -894,69 +894,10 @@
dna.species.update_sight(src)
-/mob/living/carbon/human/update_tinttotal()
- if(!tinted_weldhelh)
- return
- tinttotal = 0
- if(istype(head, /obj/item/clothing/head))
- var/obj/item/clothing/head/HT = head
- tinttotal += HT.tint
- if(wear_mask)
- tinttotal += wear_mask.tint
+/mob/living/carbon/human/get_total_tint()
+ . = ..()
if(glasses)
- tinttotal += glasses.tint
- update_vision_overlays()
-
-/mob/living/carbon/human/update_vision_overlays()
- if(!client)
- return
-
- if(stat == DEAD) //if dead we remove all vision impairments
- clear_fullscreens()
- return
-
- if(tinted_weldhelh)
- if(tinttotal >= TINT_BLIND)
- overlay_fullscreen("tint", /obj/screen/fullscreen/blind)
- else if(tinttotal >= TINT_DARKENED)
- overlay_fullscreen("tint", /obj/screen/fullscreen/impaired, 2)
- else
- clear_fullscreen("tint", 0)
-
- if(eye_blind)
- overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
- else
- clear_fullscreen("blind")
-
- if((disabilities & NEARSIGHT) && !(glasses && glasses.vision_correction))
- overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
- else
- clear_fullscreen("nearsighted")
-
- if(eye_blurry)
- overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
- else
- clear_fullscreen("blurry")
-
- if(druggy)
- overlay_fullscreen("high", /obj/screen/fullscreen/high)
- else
- clear_fullscreen("high")
-
- if(eye_stat > 20)
- if(eye_stat > 30)
- overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
- else
- overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
- else
- clear_fullscreen("eye_damage")
-
- if(client.eye != src)
- var/atom/A = client.eye
- A.get_remote_view_fullscreens(src)
- else
- clear_fullscreen("remote_view", 0)
-
+ . += glasses.tint
/mob/living/carbon/human/update_health_hud()
if(!client || !hud_used)
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 03343367442..76b7ecb4d9e 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -72,9 +72,9 @@
glasses = I
var/obj/item/clothing/glasses/G = I
if(G.tint)
- update_tinttotal()
+ update_tint()
if(G.vision_correction)
- update_vision_overlays()
+ clear_fullscreen("nearsighted")
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
update_sight()
update_inv_glasses()
@@ -136,9 +136,10 @@
glasses = null
var/obj/item/clothing/glasses/G = I
if(G.tint)
- update_tinttotal()
+ update_tint()
if(G.vision_correction)
- update_vision_overlays()
+ if(disabilities & NEARSIGHT)
+ overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view)
update_sight()
update_inv_glasses()
diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm
index e39f6daa0bb..41a214243e4 100644
--- a/code/modules/mob/living/carbon/inventory.dm
+++ b/code/modules/mob/living/carbon/inventory.dm
@@ -89,8 +89,8 @@
//handle stuff to update when a mob equips/unequips a mask.
/mob/living/carbon/proc/wear_mask_update(obj/item/clothing/C, unequip = 1)
- if(C.tint)
- update_tinttotal()
+ if(C.tint || initial(C.tint))
+ update_tint()
update_inv_wear_mask()
//handle stuff to update when a mob equips/unequips a headgear.
@@ -98,7 +98,7 @@
if(istype(I, /obj/item/clothing))
var/obj/item/clothing/C = I
if(C.tint || initial(C.tint))
- update_tinttotal()
+ update_tint()
if(I.flags_inv & HIDEMASK || forced)
update_inv_wear_mask()
update_inv_head()
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index c4de52708ef..a4a68b8ac66 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -264,7 +264,8 @@
if(75 to 100)
radiation = max(radiation-3,0)
adjustToxLoss(3)
-
+ else
+ radiation = Clamp(radiation, 0, 100)
/mob/living/carbon/handle_chemicals_in_body()
if(reagents)
@@ -342,7 +343,7 @@
if(drowsyness)
drowsyness = max(drowsyness - restingpwr, 0)
- set_blurriness(max(2, eye_blurry))
+ blur_eyes(2)
if(prob(5))
AdjustSleeping(1)
Paralyse(5)
diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm
index b0e4d7ad5b9..1e53952cc9a 100644
--- a/code/modules/mob/living/damage_procs.dm
+++ b/code/modules/mob/living/damage_procs.dm
@@ -67,7 +67,7 @@
if(status_flags & CANSTUN) // stun is usually associated with stutter
stuttering = max(stuttering,(effect * blocked))
if(EYE_BLUR)
- set_blurriness(max(eye_blurry,(effect * blocked)))
+ blur_eyes(effect * blocked)
if(DROWSY)
drowsyness = max(drowsyness,(effect * blocked))
if(JITTER)
diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm
index f8e1b54b059..a0384413aa9 100644
--- a/code/modules/mob/living/death.dm
+++ b/code/modules/mob/living/death.dm
@@ -51,7 +51,7 @@
weakened = 0
sleeping = 0
update_sight()
- update_vision_overlays()
+ hide_fullscreens()
update_health_hud()
update_canmove()
diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm
index 53ae1ce8a9b..82fdf73daab 100644
--- a/code/modules/mob/living/life.dm
+++ b/code/modules/mob/living/life.dm
@@ -101,13 +101,13 @@
eye_blind = max(eye_blind-1,0)
if(client && !eye_blind)
clear_alert("blind")
- update_vision_overlays()
+ clear_fullscreen("blind")
else
eye_blind = max(eye_blind-1,1)
else if(eye_blurry) //blurry eyes heal slowly
eye_blurry = max(eye_blurry-1, 0)
if(client && !eye_blurry)
- update_vision_overlays()
+ clear_fullscreen("blurry")
//Ears
if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 0208282e7fa..6af8dc1364d 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -469,7 +469,7 @@ Sorry Giacom. Please don't be mad :(
radiation = 0
nutrition = NUTRITION_LEVEL_FED + 50
bodytemperature = 310
- eye_stat = 0
+ eye_damage = 0
disabilities = 0
eye_blind = 0
eye_blurry = 0
@@ -487,7 +487,7 @@ Sorry Giacom. Please don't be mad :(
updatehealth()
update_fire()
regenerate_icons()
- update_vision_overlays()
+ reload_fullscreen()
/mob/living/proc/update_damage_overlays()
return
@@ -966,39 +966,37 @@ Sorry Giacom. Please don't be mad :(
/mob/proc/update_sight()
return
-/mob/proc/adjust_blindness()
- return
+/mob/proc/blind_eyes(amount)
+ if(amount>0)
+ var/old_eye_blind = eye_blind
+ eye_blind = max(eye_blind, amount)
+ if(!old_eye_blind)
+ throw_alert("blind", /obj/screen/alert/blind)
+ overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
-/mob/living/adjust_blindness(amount)
+/mob/proc/adjust_blindness(amount)
if(amount>0)
var/old_eye_blind = eye_blind
eye_blind += amount
if(!old_eye_blind)
throw_alert("blind", /obj/screen/alert/blind)
- update_vision_overlays()//if we were not blind before, we update our blind overlays.
- return
- if(eye_blind)
+ overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
+ else if(eye_blind)
var/blind_minimum = 0
if(stat == UNCONSCIOUS || (disabilities & BLIND))
blind_minimum = 1
eye_blind = max(eye_blind+amount, blind_minimum)
if(!eye_blind)
clear_alert("blind")
- update_vision_overlays()//if we're no longer blind, we update our vision overlays.
-
+ clear_fullscreen("blind")
/mob/proc/set_blindness(amount)
- return
-
-/mob/living/set_blindness(amount)
if(amount>0)
- if(eye_blind >= amount)
- return
var/old_eye_blind = eye_blind
eye_blind = amount
if(client && !old_eye_blind)
throw_alert("blind", /obj/screen/alert/blind)
- update_vision_overlays()
+ overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
else if(eye_blind)
var/blind_minimum = 0
if(stat == UNCONSCIOUS || (disabilities & BLIND))
@@ -1006,54 +1004,72 @@ Sorry Giacom. Please don't be mad :(
eye_blind = blind_minimum
if(!eye_blind)
clear_alert("blind")
- update_vision_overlays()
+ clear_fullscreen("blind")
-/mob/proc/adjust_blurriness(amount)
+/mob/proc/blur_eyes(amount)
if(amount>0)
var/old_eye_blurry = eye_blurry
- eye_blurry += amount
+ eye_blurry = max(amount, eye_blurry)
if(!old_eye_blurry)
- update_vision_overlays()
- else if(eye_blurry)
- eye_blurry = max(eye_blurry+amount, 0)
- if(!eye_blurry)
- update_vision_overlays()
+ overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
+
+/mob/proc/adjust_blurriness(amount)
+ var/old_eye_blurry = eye_blurry
+ eye_blurry = max(eye_blurry+amount, 0)
+ if(amount>0)
+ if(!old_eye_blurry)
+ overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
+ else if(old_eye_blurry)
+ clear_fullscreen("blurry")
/mob/proc/set_blurriness(amount)
var/old_eye_blurry = eye_blurry
- eye_blurry = amount
+ eye_blurry = max(amount, 0)
if(amount>0)
if(!old_eye_blurry)
- update_vision_overlays()
+ overlay_fullscreen("blurry", /obj/screen/fullscreen/blurry)
else if(old_eye_blurry)
- update_vision_overlays()
+ clear_fullscreen("blurry")
-/mob/proc/set_eye_stat(amount)
+/mob/proc/damage_eyes(amount)
return
-/mob/living/carbon/set_eye_stat(amount)
- var/old_eye_stat = eye_stat
+/mob/living/carbon/damage_eyes(amount)
if(amount>0)
- eye_stat = amount
- update_vision_overlays()
- else if(old_eye_stat)
- eye_stat = 0
- update_vision_overlays()
+ eye_damage = amount
+ if(eye_damage > 20)
+ if(eye_damage > 30)
+ overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
+ else
+ overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
-/mob/proc/adjust_eye_stat(amount)
+
+/mob/proc/set_eye_damage(amount)
return
-/mob/living/carbon/human/adjust_eye_stat(amount)
- var/old_eye_stat = eye_stat
- if(amount>0)
- eye_stat += amount
- if(!old_eye_stat)
- update_vision_overlays()
- else if(old_eye_stat)
- eye_stat = max(eye_stat+amount, 0)
- if(old_eye_stat && !eye_stat)
- update_vision_overlays()
+/mob/living/carbon/set_eye_damage(amount)
+ eye_damage = max(amount,0)
+ if(eye_damage > 20)
+ if(eye_damage > 30)
+ overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
+ else
+ overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
+ else
+ clear_fullscreen("eye_damage")
+
+/mob/proc/adjust_eye_damage(amount)
+ return
+
+/mob/living/carbon/adjust_eye_damage(amount)
+ eye_damage = max(eye_damage+amount, 0)
+ if(eye_damage > 20)
+ if(eye_damage > 30)
+ overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 2)
+ else
+ overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
+ else
+ clear_fullscreen("eye_damage")
/mob/proc/adjust_drugginess(amount)
return
@@ -1063,12 +1079,12 @@ Sorry Giacom. Please don't be mad :(
if(amount>0)
druggy += amount
if(!old_druggy)
- update_vision_overlays()
+ overlay_fullscreen("high", /obj/screen/fullscreen/high)
throw_alert("high", /obj/screen/alert/high)
else if(old_druggy)
druggy = max(eye_blurry+amount, 0)
if(!druggy)
- update_vision_overlays()
+ clear_fullscreen("high")
clear_alert("high")
/mob/proc/set_drugginess(amount)
@@ -1079,10 +1095,10 @@ Sorry Giacom. Please don't be mad :(
druggy = amount
if(amount>0)
if(!old_druggy)
- update_vision_overlays()
+ overlay_fullscreen("high", /obj/screen/fullscreen/high)
throw_alert("high", /obj/screen/alert/high)
else if(old_druggy)
- update_vision_overlays()
+ clear_fullscreen("high")
clear_alert("high")
@@ -1104,7 +1120,7 @@ Sorry Giacom. Please don't be mad :(
/mob/living/carbon/cure_nearsighted()
if(disabilities & NEARSIGHT)
disabilities &= ~NEARSIGHT
- update_vision_overlays()
+ clear_fullscreen("nearsighted")
return 1
/mob/proc/become_nearsighted()
@@ -1113,7 +1129,7 @@ Sorry Giacom. Please don't be mad :(
/mob/living/carbon/become_nearsighted()
if(!(disabilities & NEARSIGHT))
disabilities |= NEARSIGHT
- update_vision_overlays()
+ overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
return 1
/mob/proc/become_blind()
@@ -1122,5 +1138,5 @@ Sorry Giacom. Please don't be mad :(
/mob/living/carbon/become_blind()
if(!(disabilities & BLIND))
disabilities |= BLIND
- set_blindness(max(eye_blind, 1))
+ blind_eyes(1)
return 1
diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm
index e50d6469a19..20c14999aee 100644
--- a/code/modules/mob/living/login.dm
+++ b/code/modules/mob/living/login.dm
@@ -11,7 +11,7 @@
CanBuild()
update_sight()
- update_vision_overlays()
+ reload_fullscreen()
update_damage_hud()
update_health_hud()
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index fd7778e4963..7674171a8ae 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -885,7 +885,11 @@ var/list/ai_list = list()
client.perspective = EYE_PERSPECTIVE
client.eye = loc
update_sight()
- update_vision_overlays()
+ if(client.eye != src)
+ var/atom/AT = client.eye
+ AT.get_remote_view_fullscreens(src)
+ else
+ clear_fullscreen("remote_view", 0)
/mob/living/silicon/ai/update_vision_overlays()
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index 45226f975ec..75cf9b3816a 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -46,7 +46,7 @@
else if(!aiRestorePowerRoutine)
aiRestorePowerRoutine = 1
- set_blindness(1)
+ blind_eyes(1)
update_sight()
src << "You've lost power!"
spawn(20)
diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm
index 3fb2d822b12..8ab7affc9a5 100644
--- a/code/modules/mob/living/silicon/pai/death.dm
+++ b/code/modules/mob/living/silicon/pai/death.dm
@@ -4,7 +4,7 @@
stat = DEAD
canmove = 0
update_sight()
- update_vision_overlays()
+ clear_fullscreens()
//New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here.
living_mob_list -= src
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 720bbe1fcef..110aac2924b 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -1225,7 +1225,7 @@
if(paralysis || stunned || weakened || getOxyLoss() > maxHealth*0.5)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
- set_blindness(1)
+ blind_eyes(1)
update_canmove()
update_headlamp()
else
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 5058bc292d8..bcae160d1f0 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -189,7 +189,7 @@
if(STUTTER)
stuttering = max(stuttering,(effect/(blocked+1)))
if(EYE_BLUR)
- set_blurriness(max(eye_blurry,(effect/(blocked+1))))
+ blur_eyes(effect/(blocked+1))
if(DROWSY)
drowsyness = max(drowsyness,(effect/(blocked+1)))
updatehealth()
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
index 3ae12abbcdc..88f079e76ee 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
@@ -249,7 +249,7 @@
dead_mob_list -= src
living_mob_list += src
update_sight()
- update_vision_overlays()
+ reload_fullscreen()
update_canmove()
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 1bf39d6b478..52425659a45 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -183,7 +183,7 @@
for(var/mob/living/L in living_mob_list)
var/turf/T = get_turf(L.loc)
if(T && T in targets)
- L.set_blindness(4)
+ L.blind_eyes(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 5872daaec77..88cda5f4ca9 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -107,6 +107,12 @@
if(health < 1)
death()
+/mob/living/simple_animal/blind_eyes()
+ return
+
+/mob/living/simple_animal/blur_eyes()
+ return
+
/mob/living/simple_animal/adjust_blindness()
return
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 51e5dd6da73..5e0485cd005 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -283,7 +283,11 @@ var/next_mob_id = 0
/mob/living/reset_perspective(atom/A)
if(..())
update_sight()
- update_vision_overlays()
+ if(client.eye != src)
+ var/atom/AT = client.eye
+ AT.get_remote_view_fullscreens(src)
+ else
+ clear_fullscreen("remote_view", 0)
/mob/proc/show_inv(mob/user)
@@ -1059,7 +1063,25 @@ var/next_mob_id = 0
/mob/proc/update_health_hud()
return
-
-
-
-
+/mob/living/on_varedit(modified_var)
+ switch(modified_var)
+ if("weakened")
+ SetWeakened(weakened)
+ if("stunned")
+ SetStunned(stunned)
+ if("paralysis")
+ SetParalysis(paralysis)
+ if("sleeping")
+ SetSleeping(sleeping)
+ if("eye_blind")
+ set_blindness(eye_blind)
+ if("eye_damage")
+ set_eye_damage(eye_damage)
+ if("eye_blurry")
+ set_blurriness(eye_blurry)
+ if("ear_deaf")
+ setEarDamage(-1, ear_deaf)
+ if("ear_damage")
+ setEarDamage(ear_damage, -1)
+ if("maxHealth")
+ updatehealth()
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 5a2ea7b281b..017c9a0369b 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -50,7 +50,7 @@
var/lying = 0
var/lying_prev = 0
var/canmove = 1
- var/eye_stat = 0//Living, potentially Carbon
+ var/eye_damage = 0//Living, potentially Carbon
var/lastpuke = 0
var/name_archive //For admin things like possession
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index 0473e521944..62a15602716 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -605,18 +605,18 @@
M << "Your vision slowly returns..."
M.cure_blind()
M.cure_nearsighted()
- M.set_blurriness(35)
+ M.blur_eyes(35)
else if(M.disabilities & NEARSIGHT)
M << "The blackness in your peripheral vision fades."
M.cure_nearsighted()
- M.set_blurriness(10)
+ M.blur_eyes(10)
else if(M.eye_blind || M.eye_blurry)
M.set_blindness(0)
M.set_blurriness(0)
- else if(M.eye_stat > 0)
- M.adjust_eye_stat(-1)
+ else if(M.eye_damage > 0)
+ M.adjust_eye_damage(-1)
..()
return
@@ -711,7 +711,7 @@
M.adjustToxLoss(-20)
if(M.health > config.health_threshold_dead && M.getorgan(/obj/item/organ/internal/brain))
M.stat = UNCONSCIOUS
- M.set_blindness(1)
+ M.blind_eyes(1)
dead_mob_list -= M
living_mob_list |= list(M)
M.emote("gasp")
diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
index be59ae5410c..fa126f4e483 100644
--- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm
@@ -226,7 +226,7 @@
/datum/reagent/toxin/spore/on_mob_life(mob/living/M)
M.damageoverlaytemp = 60
M.update_damage_hud()
- M.set_blurriness(max(M.eye_blurry, 3))
+ M.blur_eyes(3)
..()
/datum/reagent/toxin/spore_burning
@@ -347,7 +347,7 @@
switch(pick(1, 2, 3, 4))
if(1)
M << "You can barely see!"
- M.set_blurriness(max(M.eye_blurry, 3))
+ M.blur_eyes(3)
if(2)
M.emote("cough")
if(3)
diff --git a/code/modules/spells/spell_types/inflict_handler.dm b/code/modules/spells/spell_types/inflict_handler.dm
index 480ad8b2c97..1ece19dff27 100644
--- a/code/modules/spells/spell_types/inflict_handler.dm
+++ b/code/modules/spells/spell_types/inflict_handler.dm
@@ -50,8 +50,8 @@
target.Paralyse(amt_paralysis)
target.Stun(amt_stunned)
- target.set_blindness(max(target.eye_blind,amt_eye_blind))
- target.set_blurriness(max(target.eye_blurry,amt_eye_blurry))
+ target.blind_eyes(amt_eye_blind)
+ target.blur_eyes(amt_eye_blurry)
//summoning
if(summon_type)
new summon_type(target.loc, target)
\ No newline at end of file
diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm
index 93310e3b4d5..c15995cae04 100644
--- a/code/modules/surgery/eye_surgery.dm
+++ b/code/modules/surgery/eye_surgery.dm
@@ -19,8 +19,8 @@
target.cure_blind()
target.set_blindness(0)
target.cure_nearsighted()
- target.set_blurriness(max(target.eye_blurry,35)) //this will fix itself slowly.
- target.set_eye_stat(0)
+ target.blur_eyes(35) //this will fix itself slowly.
+ target.set_eye_damage(0)
return 1
/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)