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
@@ -379,6 +379,7 @@
update_icon()
else
user << "<span class='notice'>The welding tool needs to be on to start this task.</span>"
return 1
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return 1
+12 -8
View File
@@ -89,7 +89,7 @@ obj/var/contaminated = 0
if(vsc.plc.SKIN_BURNS)
if(!pl_head_protected() || !pl_suit_protected())
burn_skin(0.75)
if(prob(20)) src << "\red Your skin burns!"
if(prob(20)) src << "<span class='danger'>Your skin burns!</span>"
updatehealth()
//Burn eyes if exposed.
@@ -119,19 +119,23 @@ obj/var/contaminated = 0
if(vsc.plc.GENETIC_CORRUPTION)
if(rand(1,10000) < vsc.plc.GENETIC_CORRUPTION)
randmutb(src)
src << "\red High levels of toxins cause you to spontaneously mutate."
src << "<span class='danger'>High levels of toxins cause you to spontaneously mutate.</span>"
domutcheck(src,null)
/mob/living/carbon/human/proc/burn_eyes()
//The proc that handles eye burning.
if(prob(20)) src << "\red Your eyes burn!"
if(!species.has_organ["eyes"])
return
var/obj/item/organ/eyes/E = internal_organs_by_name["eyes"]
E.damage += 2.5
eye_blurry = min(eye_blurry+1.5,50)
if (prob(max(0,E.damage - 15) + 1) && !eye_blind)
src << "\red You are blinded!"
eye_blind += 20
if(E && !(E.status & ORGAN_ROBOT))
if(prob(20)) src << "<span class='danger'>Your eyes burn!</span>"
E.damage += 2.5
eye_blurry = min(eye_blurry+1.5,50)
if (prob(max(0,E.damage - 15) + 1) && !eye_blind)
src << "<span class='danger'>You are blinded!</span>"
eye_blind += 20
/mob/living/carbon/human/proc/pl_head_protected()
//Checks if the head is adequately sealed.
@@ -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
+10 -3
View File
@@ -175,9 +175,16 @@
env.merge(removed)
for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them.
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1, get_dist(l, src)) ) ) )
for(var/mob/living/carbon/human/l in view(src, min(7, round(sqrt(power/6)))))
// If they can see it without mesons on. Bad on them.
if(l.glasses && istype(l.glasses, /obj/item/clothing/glasses/meson))
continue
// Where we're going, we don't need eyes.
// Prosthetic eyes will also protect against this business.
var/obj/item/organ/eyes = l.internal_organs_by_name["eyes"]
if(!istype(eyes) || (eyes.status & ORGAN_ROBOT))
continue
l.hallucination = max(0, 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) )
+4 -1
View File
@@ -916,7 +916,10 @@ var/list/compatible_mobs = list(/mob/living/carbon/human)
/datum/disease2/effect/eyewater
name = "Watery Eyes"
stage = 1
activate(var/mob/living/carbon/mob,var/multiplier)
activate(var/mob/living/carbon/human/mob,var/multiplier)
var/obj/item/organ/eyes/E = mob.internal_organs_by_name["eyes"]
if(!istype(E) || (E.status & ORGAN_ROBOT)) // No eyes or robotic eyes? No problem!
return
mob << "<span class='warning'>Your eyes sting and water!</span>"
/datum/disease2/effect/wheeze