From 03a7fc38184de625e90f2734835f6968b3b26014 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 8 Nov 2019 19:15:58 +0100 Subject: [PATCH] rad flags fixes. --- code/__DEFINES/flags.dm | 1 + code/__HELPERS/radiation.dm | 2 +- code/datums/radiation_wave.dm | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 9e8a4f71c2..dc9a439b70 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -90,3 +90,4 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 // radiation #define RAD_PROTECT_CONTENTS (1<<0) #define RAD_NO_CONTAMINATE (1<<1) +#define RAD_PROTECT_SELF (1<<2) diff --git a/code/__HELPERS/radiation.dm b/code/__HELPERS/radiation.dm index e082be7d1f..a1b781c467 100644 --- a/code/__HELPERS/radiation.dm +++ b/code/__HELPERS/radiation.dm @@ -15,7 +15,7 @@ while(processing_list.len) var/atom/thing = processing_list[1] processing_list -= thing - if(ignored_things[thing.type]) + if(ignored_things[thing.type] || CHECK_BITFIELD(thing.rad_flags, RAD_PROTECT_SELF)) continue . += thing if((thing.rad_flags & RAD_PROTECT_CONTENTS) || (SEND_SIGNAL(thing, COMSIG_ATOM_RAD_PROBE) & COMPONENT_BLOCK_RADIATION)) diff --git a/code/datums/radiation_wave.dm b/code/datums/radiation_wave.dm index 6118428547..8555e4cf3f 100644 --- a/code/datums/radiation_wave.dm +++ b/code/datums/radiation_wave.dm @@ -66,6 +66,8 @@ place = cmaster_turf for(var/i in 1 to distance) place = get_step(place, dir) + if(!place) + break atoms += get_rad_contents(place) return atoms @@ -108,7 +110,7 @@ if(!can_contaminate || blacklisted[thing.type]) continue if(prob(contamination_chance)) // Only stronk rads get to have little baby rads - if(SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION) + if(CHECK_BITFIELD(thing.rad_flags, RAD_NO_CONTAMINATE) || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION) continue var/rad_strength = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT thing.AddComponent(/datum/component/radioactive, rad_strength, source)