510: HUD, Flash Refactor, Rip out unused pain system

This commit is contained in:
Tigercat2000
2016-02-28 18:09:43 -08:00
parent 976887b2e0
commit 0c9a469f2c
67 changed files with 558 additions and 955 deletions
@@ -90,58 +90,18 @@
//human/alien mobs
if(iscarbon(target))
var/mob/living/carbon/C = target
if(user.zone_sel.selecting == "eyes")
var/mob/living/carbon/C = target
add_logs(C, user, "shone in the eyes", object="laser pointer")
//20% chance to actually hit the eyes
var/severity = 1
if(prob(33))
severity = 2
else if(prob(50))
severity = 0
if(prob(effectchance * diode.rating))
add_logs(C, user, "shone in the eyes", object="laser pointer")
//eye target check
if(prob(effectchance * diode.rating) && C.flash_eyes(severity))
outmsg = "<span class='notice'>You blind [C] by shining [src] in their eyes.</span>"
if(C.weakeyes)
C.Stun(1)
var/eye_prot = C.eyecheck()
if(C.blinded || eye_prot >= 2)
eye_prot = 4
var/severity = 3 - eye_prot
if(prob(33))
severity += 1
else if(prob(50))
severity -= 1
severity = min(max(severity, 0), 4)
var/mob/living/carbon/human/H = C
var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"]
switch(severity)
if(0)
//no effect
C << "<span class='info'>A small, bright dot appears in your vision.</span>"
if(1)
//industrial grade eye protection
E.damage += rand(0, 2)
C << "<span class='notice'>Something bright flashes in the corner of your vision!</span>"
if(2)
//basic eye protection (sunglasses)
flick("flash", C.flash)
E.damage += rand(1, 6)
C << "<span class='danger'>Your eyes were blinded!</span>"
if(3)
//no eye protection
if(prob(2))
C.Weaken(1)
flick("e_flash", C.flash)
E.damage += rand(3, 7)
C << "<span class='danger'>Your eyes were blinded!</span>"
if(4)
//the effect has been worsened by something
if(prob(5))
C.Weaken(1)
flick("e_flash", C.flash)
E.damage += rand(5, 10)
C << "<span class='danger'>Your eyes were blinded!</span>"
else
outmsg = "<span class='notice'>You fail to blind [C] by shining [src] at their eyes.</span>"
@@ -150,6 +110,7 @@
var/mob/living/silicon/S = target
//20% chance to actually hit the sensors
if(prob(effectchance * diode.rating))
S.flash_eyes(affect_silicon = 1)
S.Weaken(rand(5,10))
S << "<span class='warning'>Your sensors were overloaded by a laser!</span>"
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"