mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Ports the radiation subsystem and cleans up damage flags. (#15715)
This commit is contained in:
@@ -546,7 +546,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
if(!do_mob(user, M, 200))
|
||||
user.visible_message(SPAN_DANGER("[user]'s hand slips and tears open the wound on [M]'s [affecting.name]!"), \
|
||||
SPAN_DANGER("<font size=2>The wound on your [affecting.name] is torn open!</font>"))
|
||||
M.apply_damage(rand(1,10), BRUTE)
|
||||
M.apply_damage(rand(1,10), DAMAGE_BRUTE)
|
||||
break
|
||||
user.visible_message(SPAN_NOTICE("\The [user] barely manages to stitch \a [W.desc] on [M]'s [affecting.name]."), \
|
||||
SPAN_NOTICE("You barely manage to stitch \a [W.desc] on [M]'s [affecting.name].") )
|
||||
|
||||
@@ -418,7 +418,7 @@
|
||||
|
||||
/obj/machinery/gravity_generator/main/proc/pulse_radiation(var/amount = 20)
|
||||
for(var/mob/living/L in view(7, src))
|
||||
L.apply_damage(amount, IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
L.apply_damage(amount, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||
|
||||
// Shake everyone on the z level to let them know that gravity was enagaged/disenagaged.
|
||||
/obj/machinery/gravity_generator/main/proc/shake_everyone()
|
||||
|
||||
@@ -418,18 +418,13 @@
|
||||
/obj/machinery/power/portgen/basic/advanced/UseFuel()
|
||||
//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_damage(1, IRRADIATE, damage_flags = DAM_DISPERSED) //should amount to ~5 rads per minute at max safe power
|
||||
SSradiation.radiate(src, 4)
|
||||
..()
|
||||
|
||||
/obj/machinery/power/portgen/basic/advanced/explode()
|
||||
//a nice burst of radiation
|
||||
var/rads = 50 + (sheets + sheet_left)*1.5
|
||||
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_damage(max(20, round(rads/get_dist(L,src))), IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
|
||||
SSradiation.radiate(src, max(40, rads))
|
||||
explosion(loc, 3, 3, 5, 3)
|
||||
qdel(src)
|
||||
|
||||
@@ -489,7 +484,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_damage(max(20, round(rads/get_dist(L,src))), IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
L.apply_damage(max(20, round(rads/get_dist(L,src))), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||
|
||||
explosion(loc, 3, 6, 12, 16, 1)
|
||||
qdel(src)
|
||||
@@ -512,8 +507,7 @@
|
||||
temperature_gain = initial(temperature_gain)
|
||||
..()
|
||||
if (prob(2 * power_output))
|
||||
for (var/mob/living/L in range(src, 5))
|
||||
L.apply_damage(1, IRRADIATE, damage_flags = DAM_DISPERSED) //should amount to ~5 rads per minute at max safe power
|
||||
SSradiation.radiate(src, 6)
|
||||
..()
|
||||
|
||||
/obj/machinery/power/portgen/basic/fusion/update_icon()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
add_avail(power_gen)
|
||||
if(panel_open && irradiate)
|
||||
for (var/mob/living/L in range(2, src))
|
||||
L.apply_damage(10, IRRADIATE, damage_flags = DAM_DISPERSED) // Weak but noticeable.
|
||||
L.apply_damage(10, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED) // Weak but noticeable.
|
||||
|
||||
/obj/machinery/power/rtg/update_icon()
|
||||
icon_state = panel_open ? "[initial(icon_state)]-open" : initial(icon_state)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(prob(current_size*5) && hand.w_class >= ((11-current_size)/2) && u_equip(hand))
|
||||
step_towards(hand, src)
|
||||
to_chat(src, "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>")
|
||||
apply_damage(current_size * 3, IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
apply_damage(current_size * 3, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||
if(shoes)
|
||||
if(shoes.item_flags & NOSLIP) return 0
|
||||
..()
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
/obj/effect/accelerated_particle/proc/toxmob(var/mob/living/M)
|
||||
var/radiation = (energy*2)
|
||||
M.apply_damage((radiation*3), IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
M.apply_damage((radiation*3), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||
M.updatehealth()
|
||||
return
|
||||
|
||||
|
||||
@@ -431,16 +431,10 @@
|
||||
|
||||
|
||||
/obj/singularity/proc/toxmob()
|
||||
var/toxrange = 10
|
||||
var/radiation = 15
|
||||
var/radiationmin = 3
|
||||
if (src.energy > 200)
|
||||
radiation = round(((src.energy-150)/50)*5,1)
|
||||
radiationmin = round((radiation/5),1)//
|
||||
for(var/mob/living/M in view(toxrange, src.loc))
|
||||
if(M.status_flags & GODMODE)
|
||||
continue
|
||||
M.apply_damage(rand(radiationmin,radiation), IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
SSradiation.radiate(src, radiation)
|
||||
|
||||
/obj/singularity/proc/mezzer()
|
||||
for(var/mob/living/carbon/M in oviewers(8, src))
|
||||
@@ -470,13 +464,13 @@
|
||||
/obj/singularity/proc/smwave()
|
||||
for(var/mob/living/M in view(10, src.loc))
|
||||
if(prob(67))
|
||||
M.apply_damage(rand(energy), IRRADIATE, damage_flags = DAM_DISPERSED)
|
||||
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
|
||||
to_chat(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>")
|
||||
to_chat(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()
|
||||
SSradiation.radiate(src, rand(energy))
|
||||
return
|
||||
|
||||
/obj/singularity/proc/on_capture()
|
||||
|
||||
Reference in New Issue
Block a user