mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-10 13:50:25 +01:00
ebf7fdbfd2
* initial changes * Rad wave is working. now to implement the rest * Makes the waves square * Makes wave square * multiplies the strength in all instances of radiation_pulse by 4 because each pulse makes one wave instead of 4 now * Undef thing and apply suggestion * Make radiation_pulse() not radiate the radiation source and implements contamination * Adds contamination to uranium walls and meteors * Fixes stuff * Handle some contamination on attack still need to take care of meteors * Fixed the meteor stuff * Introduce emission types * moves contaminate_touch to an atom proc and renames it to contaminate_atom * deduplicates some contamination code * Move inherent radioactivity to a component and signals from the atom vars and behaviour * fix some things with the new component * Update inherent_radioactivity.dm * implement contaminating things that hit things that are inherently radioactive * window things * adds emission type to the rad_act call * Changes radiation insulation values on a bunch of stuff * fixes radioactive component radiating the wrong type * more adjustments * refactros rad_act * adjustments to collector power production * Adds plastitaniumglass windows and makes further adjustments * Adds sprites to the shards and plastitanium directional window * Update misc_cleanables.dm * removes alpha rad insulation from floor turfs * Fixes a bug with the starting tile of radiation waves * More adjustments * Adjusting singularity rad production * reduces window half life a bit to make power smoother and buffs full window rad conversion * Strengthens gamma and beta radiation effect on mobs. * Makes radsuit block radiation completely * Fixes Geiger Counters * Fixes contamination not irradiating the contaminated thing * Fixes inherent radioactivity not processing. Also makes it stop processing when a nuke core is contained * Fixes ghost contamination * Adds info to the collector * Handles alpha radiation better on humans and changes some instances of rad_act to base_rad_act * oops * adjustments and fixes to alpha rad handling on mobs * Make collector info more compact * Core no longer radiates and contaminates from within the nuke until the plates are removed * Contamination no longer counts as being inside a mob(it is supposed to be surface level) * Adds inherent radioactivity to a bunch of uranium things. makes it all process. * Nerf full windows * Adjustments to collector and fulltile window radiation absorption * Reduces passive contamination, especially while on the floor * Adds different rad types to the geiger counter and fixes a runtime * Makes full tile windows strong again and disallows building them on top of collectors * adds emissive blockers to the rad blacklist and gives windows and collectors priority when irradiating for increased consistency * Gives each contamination type it's own color. * Gives each contamination type it's own color. And makes the rad hud display them separately * Changes how much the radiation wave affects the source tile, adds decay for performance reasons and adjusts collector parameters as well as SM and singulo rad production * improves performance at very high rad amounts * Fixes supermatter sliver box not containing radiation * Restores supermatter sliver to old behaviour(not inherently radioactive) * Slight nerf to fulltile windows and removes an unnecessary multiplication from rad wave processing * Removes redundant line from window rad act * Fixes radiation waves ignoring walls * fixes it better * more adjustments to collector stats * Adjustment to collector gamma absorption * increases grille beta blocking * Review changes
69 lines
2.9 KiB
Plaintext
69 lines
2.9 KiB
Plaintext
PROCESSING_SUBSYSTEM_DEF(radiation)
|
|
name = "Radiation"
|
|
flags = SS_BACKGROUND | SS_NO_INIT
|
|
wait = 1 SECONDS
|
|
offline_implications = "Radiation will no longer function; power generation may not happen. A restart may or may not be required, depending on the situation."
|
|
cpu_display = SS_CPUDISPLAY_HIGH
|
|
var/list/warned_atoms = list()
|
|
// Cache radiation levels for each turf so it doesn't need to be done iteratively
|
|
// turf_rad_cache is the state in the current loop, and may not be 100% representative
|
|
// until processing is complete.
|
|
// prev_rad_cache is the fully evaluated radiation state cache from the previous tick.
|
|
var/last_rad_cache_update = 0
|
|
var/rad_cache_update_interval = 5 SECONDS
|
|
var/list/turf_rad_cache = list()
|
|
var/list/prev_rad_cache = list()
|
|
/// Lazy list of all radioactive components
|
|
var/list/all_radiations
|
|
|
|
|
|
/datum/controller/subsystem/processing/radiation/proc/warn(datum/component/radioactive/contamination)
|
|
if(!contamination || QDELETED(contamination))
|
|
return
|
|
var/ref = contamination.parent.UID()
|
|
if(warned_atoms[ref])
|
|
return
|
|
warned_atoms[ref] = TRUE
|
|
var/atom/master = contamination.parent
|
|
SSblackbox.record_feedback("tally", "contaminated", 1, master.type)
|
|
var/msg = "has become contaminated with enough radiation to emit radiation waves || Source: [contamination.source] || Strength: [contamination.alpha_strength + contamination.beta_strength + contamination.gamma_strength]"
|
|
master.investigate_log(msg, "radiation")
|
|
|
|
/datum/controller/subsystem/processing/radiation/fire(resumed)
|
|
if(world.time > last_rad_cache_update + rad_cache_update_interval)
|
|
refresh_rad_cache()
|
|
last_rad_cache_update = world.time
|
|
. = ..()
|
|
|
|
/datum/controller/subsystem/processing/radiation/proc/get_turf_radiation(turf/place)
|
|
if(prev_rad_cache[place])
|
|
return prev_rad_cache[place]
|
|
else
|
|
return 0
|
|
|
|
/datum/controller/subsystem/processing/radiation/proc/update_rad_cache_contaminated(datum/component/radioactive/thing)
|
|
var/atom/owner = thing.parent
|
|
var/turf/place = get_turf(owner)
|
|
if(turf_rad_cache[place])
|
|
turf_rad_cache[place][1] += thing.alpha_strength
|
|
turf_rad_cache[place][2] += thing.beta_strength
|
|
turf_rad_cache[place][3] += thing.gamma_strength
|
|
else
|
|
turf_rad_cache[place] = list(thing.alpha_strength, thing.beta_strength, thing.gamma_strength)
|
|
|
|
/datum/controller/subsystem/processing/radiation/proc/update_rad_cache_inherent(datum/component/inherent_radioactivity/thing)
|
|
var/atom/owner = thing.parent
|
|
var/turf/place = get_turf(owner)
|
|
if(turf_rad_cache[place])
|
|
turf_rad_cache[place][1] += thing.radioactivity_alpha
|
|
turf_rad_cache[place][2] += thing.radioactivity_beta
|
|
turf_rad_cache[place][3] += thing.radioactivity_gamma
|
|
else
|
|
turf_rad_cache[place] = list(thing.radioactivity_alpha, thing.radioactivity_beta, thing.radioactivity_gamma)
|
|
|
|
|
|
/datum/controller/subsystem/processing/radiation/proc/refresh_rad_cache()
|
|
prev_rad_cache.Cut()
|
|
prev_rad_cache = turf_rad_cache
|
|
turf_rad_cache = list()
|