mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
- I renamed some of the new adjust procs and create new ones for eye_blind,eye_blurry and eye_stat so they get three procs just like weakened/sleeping/etc.. (Sleeping, AdjustSleeping, SetSleeping)
- renamed the eye_stat var to eye_damage. - mob/on_varedit() added. Manually var editing a mob's eye_blind var properly updates his vision. - I removed update_vision_overlays(), we now just update the relevant fullscreens instead of all fullscreens whenever one needs to be updated. - fixed climbing into mecha not giving you mecha sight. - simplified and removed copypasta from update_tinttotal() (now update_tint() )
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -34,15 +34,15 @@ Bonus
|
||||
M << "<span class='warning'>Your eyes itch.</span>"
|
||||
if(3, 4)
|
||||
M << "<span class='warning'><b>Your eyes burn!</b></span>"
|
||||
M.set_blurriness(max(M.eye_blurry,10))
|
||||
M.adjust_eye_stat(1)
|
||||
M.blur_eyes(10)
|
||||
M.adjust_eye_damage(1)
|
||||
else
|
||||
M << "<span class='userdanger'>Your eyes burn horrificly!</span>"
|
||||
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 << "<span class='userdanger'>You go blind!</span>"
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
for(var/mob/living/carbon/human/H in range(2,user))
|
||||
H << "<span class='userdanger'>You are blinded by a shower of blood!</span>"
|
||||
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 << "<span class='userdanger'>Your sensors are disabled by a shower of blood!</span>"
|
||||
|
||||
@@ -205,8 +205,8 @@
|
||||
add_logs(user, target, "stung", "blind sting")
|
||||
target << "<span class='danger'>Your eyes burn horrifically!</span>"
|
||||
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
|
||||
|
||||
|
||||
@@ -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 << "<span class='warning'><b>You breathe in the black smoke, and your eyes burn horribly!</b></span>"
|
||||
M.set_blindness(5)
|
||||
M.blind_eyes(5)
|
||||
if(prob(25))
|
||||
M.visible_message("<b>[M]</b> claws at their eyes!")
|
||||
M.Stun(3)
|
||||
|
||||
@@ -724,7 +724,7 @@
|
||||
/obj/item/weapon/spellbook/oneuse/blind/recoil(mob/user)
|
||||
..()
|
||||
user <<"<span class='warning'>You go blind!</span>"
|
||||
user.set_blindness(10)
|
||||
user.blind_eyes(10)
|
||||
|
||||
/obj/item/weapon/spellbook/oneuse/mindswap
|
||||
spell = /obj/effect/proc_holder/spell/targeted/mind_transfer
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 << "<span class='danger'>Your eyes start to bleed profusely!</span>"
|
||||
@@ -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 << "<span class='danger'>You go blind!</span>"
|
||||
|
||||
|
||||
@@ -192,8 +192,8 @@
|
||||
user.visible_message("<span class='danger'>[user] sprays [src] into the face of [target]!</span>")
|
||||
target << "<span class='userdanger'>[user] sprays [src] into your face!</span>"
|
||||
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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
M << "<span class='userdanger'><font size=3>AAAAGH!</font></span>"
|
||||
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))
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
if(H.glasses == src)
|
||||
H << "<span class='danger'>The [src] overloads and blinds you!</span>"
|
||||
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"
|
||||
|
||||
@@ -431,7 +431,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
my_target.show_message("<span class='danger'>[src.name] has attacked [my_target] with [weapon_name]!</span>", 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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -179,25 +179,25 @@
|
||||
if(1)
|
||||
src << "<span class='warning'>Your eyes sting a little.</span>"
|
||||
if(prob(40))
|
||||
adjust_eye_stat(1)
|
||||
adjust_eye_damage(1)
|
||||
|
||||
if(2)
|
||||
src << "<span class='warning'>Your eyes burn.</span>"
|
||||
adjust_eye_stat(rand(2, 4))
|
||||
adjust_eye_damage(rand(2, 4))
|
||||
|
||||
else
|
||||
src << "<span class='warning'>Your eyes itch and burn severely!</span>"
|
||||
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 << "<span class='warning'>Your eyes start to burn badly!</span>"
|
||||
else if(prob(eye_stat - 25))
|
||||
else if(prob(eye_damage - 25))
|
||||
if(become_blind())
|
||||
src << "<span class='warning'>You can't see anything!</span>"
|
||||
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)
|
||||
|
||||
@@ -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 << "<span class='warning'>You feel very [word].</span>"
|
||||
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_BAD)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
weakened = 0
|
||||
sleeping = 0
|
||||
update_sight()
|
||||
update_vision_overlays()
|
||||
hide_fullscreens()
|
||||
update_health_hud()
|
||||
update_canmove()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
CanBuild()
|
||||
|
||||
update_sight()
|
||||
update_vision_overlays()
|
||||
reload_fullscreen()
|
||||
update_damage_hud()
|
||||
update_health_hud()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
else if(!aiRestorePowerRoutine)
|
||||
aiRestorePowerRoutine = 1
|
||||
set_blindness(1)
|
||||
blind_eyes(1)
|
||||
update_sight()
|
||||
src << "You've lost power!"
|
||||
spawn(20)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
update_sight()
|
||||
update_vision_overlays()
|
||||
reload_fullscreen()
|
||||
update_canmove()
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+27
-5
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -605,18 +605,18 @@
|
||||
M << "<span class='warning'>Your vision slowly returns...</span>"
|
||||
M.cure_blind()
|
||||
M.cure_nearsighted()
|
||||
M.set_blurriness(35)
|
||||
M.blur_eyes(35)
|
||||
|
||||
else if(M.disabilities & NEARSIGHT)
|
||||
M << "<span class='warning'>The blackness in your peripheral vision fades.</span>"
|
||||
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")
|
||||
|
||||
@@ -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 << "<span class='danger'>You can barely see!</span>"
|
||||
M.set_blurriness(max(M.eye_blurry, 3))
|
||||
M.blur_eyes(3)
|
||||
if(2)
|
||||
M.emote("cough")
|
||||
if(3)
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user