rad flags fixes.

This commit is contained in:
Ghommie
2019-11-08 19:15:58 +01:00
parent c9cd27c38c
commit 03a7fc3818
3 changed files with 5 additions and 2 deletions
+1
View File
@@ -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)
+1 -1
View File
@@ -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))
+3 -1
View File
@@ -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)