Unified radiation system

This commit is contained in:
Ben Reeve
2017-05-22 16:24:34 +01:00
committed by Yoshax
parent c95df78a54
commit 6185bbd212
31 changed files with 337 additions and 76 deletions
@@ -31,6 +31,11 @@ var/global/list/rad_collectors = list()
last_power_new = 0
var/turf/T = get_turf(src)
if(T in radiation_repository.irradiated_turfs)
receive_pulse((radiation_repository.irradiated_turfs[T] * 5)) //Maths is hard
if(P)
if(P.air_contents.gas["phoron"] == 0)
investigate_log("<font color='red'>out of fuel</font>.","singulo")
@@ -406,15 +406,13 @@
var/toxrange = 10
var/toxdamage = 4
var/radiation = 15
var/radiationmin = 3
if (src.energy>200)
toxdamage = round(((src.energy-150)/50)*4,1)
radiation = round(((src.energy-150)/50)*5,1)
radiationmin = round((radiation/5),1)//
radiation_repository.radiate(src, radiation) //Always radiate at max, so a decent dose of radiation is applied
for(var/mob/living/M in view(toxrange, src.loc))
if(M.status_flags & GODMODE)
continue
M.apply_effect(rand(radiationmin,radiation), IRRADIATE)
toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad")))
M.apply_effect(toxdamage, TOX)
return
@@ -448,13 +446,13 @@
/obj/singularity/proc/smwave()
for(var/mob/living/M in view(10, src.loc))
if(prob(67))
M.apply_effect(rand(energy), IRRADIATE)
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>"
to_chat(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>")
to_chat(M, "<span class=\"notice\">Miraculously, it fails to kill you.</span>")
else
M << "<span class=\"danger\">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=\"danger\">You don't even have a moment to react as you are reduced to ashes by the intense radiation.</span>"
M.dust()
radiation_repository.radiate(src, rand(energy))
return
/obj/singularity/proc/pulse()