Makes mechanical eyes protect you

This commit is contained in:
Markolie
2015-08-29 18:38:26 +02:00
parent f10a4de9c6
commit 134d2116c6
6 changed files with 40 additions and 22 deletions
@@ -44,8 +44,11 @@
if (E) E.damage += rand(1, 3)
M.Stun(max(10/distance, 3))
M.Weaken(max(10/distance, 3))
if (E && E.damage >= E.min_bruised_damage)
M << "<span class='warning'>Your eyes start to burn badly!</span>"
if (istype(E) && E.damage >= E.min_bruised_damage)
if(!(E.status & ORGAN_ROBOT))
M << "<span class='warning'>Your eyes start to burn badly!</span>"
else
M << "<span class='warning'>The flash blinds you!</span>"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
if (E.damage >= E.min_broken_damage)
M << "<span class='warning'>You can't see anything!</span>"
+8 -8
View File
@@ -368,36 +368,36 @@
/obj/item/weapon/weldingtool/proc/eyecheck(mob/user as mob)
if(!iscarbon(user)) return 1
var/safety = user:eyecheck()
if(istype(user, /mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
if(!E) // No eyes? No problem!
if(!istype(E) || (E.status & ORGAN_ROBOT)) // No eyes or robotic eyes? No problem!
return
switch(safety)
if(1)
usr << "\red Your eyes sting a little."
usr << "<span class='danger'>Your eyes sting a little.</span>"
E.damage += rand(1, 2)
if(E.damage > 12)
user.eye_blurry += rand(3,6)
if(0)
usr << "\red Your eyes burn."
usr << "<span class='danger'>Your eyes burn.</span>"
E.damage += rand(2, 4)
if(E.damage > 10)
E.damage += rand(4,10)
if(-1)
usr << "\red Your thermals intensify the welder's glow. Your eyes itch and burn severely."
usr << "<span class='danger'>Your thermals intensify the welder's glow. Your eyes itch and burn severely.</span>"
user.eye_blurry += rand(12,20)
E.damage += rand(12, 16)
if(safety<2)
if(E.damage > 10)
user << "\red Your eyes are really starting to hurt. This can't be good for you!"
user << "<span class='danger'>Your eyes are really starting to hurt. This can't be good for you!</span>"
if (E.damage >= E.min_broken_damage)
user << "\red You go blind!"
user << "<span class='danger'>You go blind!</span>"
user.sdisabilities |= BLIND
else if (E.damage >= E.min_bruised_damage)
user << "\red You go blind!"
user << "<span class='danger'>You go blind!</span>"
user.eye_blind = 5
user.eye_blurry = 5
user.disabilities |= NEARSIGHTED