From 34332051302ddc5c5c14453fdd01949b0e160ff0 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 9 Apr 2020 13:56:19 +0200 Subject: [PATCH 1/2] Makes radioactive atoms actually still radiate other atoms within itself even if contained. --- code/__HELPERS/radiation.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/radiation.dm b/code/__HELPERS/radiation.dm index abdfe7e8d3..e210f0bf1e 100644 --- a/code/__HELPERS/radiation.dm +++ b/code/__HELPERS/radiation.dm @@ -27,12 +27,15 @@ return var/area/A = get_area(source) var/atom/nested_loc = source.loc + var/spawn_waves = TRUE while(nested_loc != A) if(nested_loc.rad_flags & RAD_PROTECT_CONTENTS) - return + spawn_waves = FALSE + break nested_loc = nested_loc.loc - for(var/dir in GLOB.cardinals) - new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate) + if(spawn_waves) + for(var/dir in GLOB.cardinals) + new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate) var/list/things = get_rad_contents(source) //copypasta because I don't want to put special code in waves to handle their origin for(var/k in 1 to things.len) From 98312ec2c8261da2cee360a7995b27be1dc7c965 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 9 Apr 2020 14:21:15 +0200 Subject: [PATCH 2/2] Update radiation.dm --- code/__HELPERS/radiation.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/__HELPERS/radiation.dm b/code/__HELPERS/radiation.dm index e210f0bf1e..1570eededb 100644 --- a/code/__HELPERS/radiation.dm +++ b/code/__HELPERS/radiation.dm @@ -37,6 +37,11 @@ for(var/dir in GLOB.cardinals) new /datum/radiation_wave(source, dir, intensity, range_modifier, can_contaminate) + var/static/last_huge_pulse = 0 + if(intensity > 3000 && world.time > last_huge_pulse + 200) + last_huge_pulse = world.time + log = TRUE + var/list/things = get_rad_contents(source) //copypasta because I don't want to put special code in waves to handle their origin for(var/k in 1 to things.len) var/atom/thing = things[k] @@ -44,11 +49,7 @@ continue thing.rad_act(intensity) - var/static/last_huge_pulse = 0 - if(intensity > 3000 && world.time > last_huge_pulse + 200) - last_huge_pulse = world.time - log = TRUE if(log) - var/turf/_source_T = isturf(source) ? source : get_turf(source) - log_game("Radiation pulse with intensity: [intensity] and range modifier: [range_modifier] in [loc_name(_source_T)] ") + var/turf/_source_T = get_turf(source) + log_game("Radiation pulse with intensity: [intensity] and range modifier: [range_modifier] in [loc_name(_source_T)][spawn_waves ? "" : " (contained by [nested_loc.name])"]") return TRUE