Merge pull request #11219 from PsiOmegaDelta/150929-HumanoidVision

Overhauls humanoid vision handling.
This commit is contained in:
Chinsky
2015-10-15 19:15:28 +03:00
22 changed files with 255 additions and 240 deletions
+6 -5
View File
@@ -65,8 +65,9 @@
if(iscarbon(M))
if(M.stat!=DEAD)
var/safety = M:eyecheck()
if(safety <= 0)
var/mob/living/carbon/C = M
var/safety = C.eyecheck()
if(safety < FLASH_PROTECTION_MODERATE)
var/flash_strength = 10
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -150,8 +151,8 @@
for(var/obj/item/weapon/cloaking_device/S in M)
S.active = 0
S.icon_state = "shield0"
var/safety = M:eyecheck()
if(!safety)
var/safety = M.eyecheck()
if(safety < FLASH_PROTECTION_MODERATE)
if(!M.blinded)
flick("flash", M.flash)
@@ -170,7 +171,7 @@
if(istype(loc, /mob/living/carbon))
var/mob/living/carbon/M = loc
var/safety = M.eyecheck()
if(safety <= 0)
if(safety < FLASH_PROTECTION_MODERATE)
M.Weaken(10)
flick("e_flash", M.flash)
for(var/mob/O in viewers(M, null))
@@ -49,7 +49,7 @@
ear_safety += 1
//Flashing everyone
if(eye_safety < 1)
if(eye_safety < FLASH_PROTECTION_MODERATE)
flick("e_flash", M.flash)
M.Stun(2)
M.Weaken(10)
@@ -16,7 +16,7 @@
var/turf/T = get_turf(src)
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
if(M:eyecheck() <= 0)
if(M.eyecheck() < FLASH_PROTECTION_MODERATE)
flick("e_flash", M.flash)
for(var/i=1, i<=deliveryamt, i++)
+4 -4
View File
@@ -337,18 +337,18 @@
if(!E)
return
switch(safety)
if(1)
if(FLASH_PROTECTION_MODERATE)
usr << "<span class='warning'>Your eyes sting a little.</span>"
E.damage += rand(1, 2)
if(E.damage > 12)
user.eye_blurry += rand(3,6)
if(0)
if(FLASH_PROTECTION_NONE)
usr << "<span class='warning'>Your eyes burn.</span>"
E.damage += rand(2, 4)
if(E.damage > 10)
E.damage += rand(4,10)
if(-1)
usr << "<span class='danger'>Your thermals intensify the welder's glow. Your eyes itch and burn severely.</span>"
if(FLASH_PROTECTION_REDUCED)
usr << "<span class='danger'>Your equipment 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)