tgstation/tgstation#40662 - Stops using the rad insulation component to provide default rad insulation features in order to save a bit of memory
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/datum/component/mirage_border/Initialize(turf/target, direction, range=world.view)
|
||||
if(!isturf(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
if(!target || !istype(target) || !direction)
|
||||
if(!target || !direction)
|
||||
. = COMPONENT_INCOMPATIBLE
|
||||
CRASH("[type] improperly instanced with the following args: target=\[[target]\], direction=\[[direction]\], range=\[[range]\]")
|
||||
|
||||
|
||||
@@ -21,4 +21,5 @@
|
||||
return COMPONENT_BLOCK_CONTAMINATION
|
||||
|
||||
/datum/component/rad_insulation/proc/rad_pass(datum/source, datum/radiation_wave/wave, width)
|
||||
wave.intensity = wave.intensity*(1-((1-amount)/width)) // The further out the rad wave goes the less it's affected by insulation (larger width)
|
||||
wave.intensity = wave.intensity*(1-((1-amount)/width)) // The further out the rad wave goes the less it's affected by insulation (larger width)
|
||||
return COMPONENT_RAD_WAVE_HANDLED
|
||||
|
||||
@@ -81,7 +81,10 @@
|
||||
var/atom/thing = atoms[k]
|
||||
if(!thing)
|
||||
continue
|
||||
SEND_SIGNAL(thing, COMSIG_ATOM_RAD_WAVE_PASSING, src, width)
|
||||
if (SEND_SIGNAL(thing, COMSIG_ATOM_RAD_WAVE_PASSING, src, width) & COMPONENT_RAD_WAVE_HANDLED)
|
||||
continue
|
||||
if (thing.rad_insulation != RAD_NO_INSULATION)
|
||||
intensity *= (1-((1-thing.rad_insulation)/width))
|
||||
|
||||
/datum/radiation_wave/proc/radiate(list/atoms, strength)
|
||||
var/contamination_chance = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_CHANCE_COEFFICIENT * min(1, 1/(steps*range_modifier))
|
||||
@@ -92,7 +95,7 @@
|
||||
thing.rad_act(strength)
|
||||
|
||||
// This list should only be for types which don't get contaminated but you want to look in their contents
|
||||
// If you don't want to look in their contents and you don't want to rad_act them:
|
||||
// If you don't want to look in their contents and you don't want to rad_act them:
|
||||
// modify the ignored_things list in __HELPERS/radiation.dm instead
|
||||
var/static/list/blacklisted = typecacheof(list(
|
||||
/turf,
|
||||
@@ -109,4 +112,4 @@
|
||||
if(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)
|
||||
thing.AddComponent(/datum/component/radioactive, rad_strength, source)
|
||||
|
||||
Reference in New Issue
Block a user