Ports baystation armor system (#2954)

Ports Baystation12/Baystation12#12658

Changing how the calculation of armor works , instead of just being a check if it is protected fully, half or nothing. Making armor more reliable and less rng dependant.

Also, uranium meteors will irradiate nearby people when they explode.
This commit is contained in:
Alberyk
2017-07-15 10:24:03 -03:00
committed by skull132
parent 41e39f52d1
commit 2f949ecb45
52 changed files with 274 additions and 248 deletions
+2 -2
View File
@@ -405,7 +405,7 @@
//produces a tiny amount of radiation when in use
if (prob(2*power_output))
for (var/mob/living/L in range(src, 5))
L.apply_effect(1, IRRADIATE) //should amount to ~5 rads per minute at max safe power
L.apply_effect(1, IRRADIATE, blocked = L.getarmor(null, "rad")) //should amount to ~5 rads per minute at max safe power
..()
/obj/machinery/power/port_gen/pacman/super/explode()
@@ -414,7 +414,7 @@
for (var/mob/living/L in range(src, 10))
//should really fall with the square of the distance, but that makes the rads value drop too fast
//I dunno, maybe physics works different when you live in 2D -- SM radiation also works like this, apparently
L.apply_effect(max(20, round(rads/get_dist(L,src))), IRRADIATE)
L.apply_effect(max(20, round(rads/get_dist(L,src))), IRRADIATE, blocked = L.getarmor(null, "rad"))
explosion(src.loc, 3, 3, 5, 3)
qdel(src)
+1 -1
View File
@@ -32,7 +32,7 @@
if(prob(current_size*5) && hand.w_class >= ((11-current_size)/2) && u_equip(hand))
step_towards(hand, src)
src << "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>"
apply_effect(current_size * 3, IRRADIATE)
apply_effect(current_size * 3, IRRADIATE, blocked = getarmor(null, "rad"))
if(shoes)
if(shoes.item_flags & NOSLIP) return 0
..()
@@ -60,7 +60,7 @@
/obj/effect/accelerated_particle/proc/toxmob(var/mob/living/M)
var/radiation = (energy*2)
M.apply_effect((radiation*3),IRRADIATE,0)
M.apply_effect((radiation*3),IRRADIATE,blocked = M.getarmor(null, "rad"))
M.updatehealth()
//M << "\red You feel odd."
return
@@ -432,7 +432,7 @@
for(var/mob/living/M in view(toxrange, src.loc))
if(M.status_flags & GODMODE)
continue
M.apply_effect(rand(radiationmin,radiation), IRRADIATE)
M.apply_effect(rand(radiationmin,radiation), IRRADIATE, blocked = M.getarmor(null, "rad"))
toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad")))
M.apply_effect(toxdamage, TOX)
return
@@ -466,7 +466,7 @@
/obj/singularity/proc/smwave()
for(var/mob/living/M in view(10, src.loc))
if(prob(67))
M.apply_effect(rand(energy), IRRADIATE)
M.apply_effect(rand(energy), IRRADIATE, blocked = M.getarmor(null, "rad"))
M << "<span class=\"warning\">You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.</span>"
M << "<span class=\"notice\">Miraculously, it fails to kill you.</span>"
else