mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
upstream-merge-16484 [MDB IGNORE] (#9289)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -18,12 +18,12 @@
|
||||
/datum/radiation_source/proc/update_rad_power(var/new_power = null)
|
||||
if(new_power == null || new_power == rad_power)
|
||||
return // No change
|
||||
else if(new_power <= CONFIG_GET(number/radiation_lower_limit)) // CHOMPEdit
|
||||
else if(new_power <= CONFIG_GET(number/radiation_lower_limit))
|
||||
qdel(src) // Decayed to nothing
|
||||
else
|
||||
rad_power = new_power
|
||||
if(!flat)
|
||||
range = min(round(sqrt(rad_power / CONFIG_GET(number/radiation_lower_limit))), 31) // R = rad_power / dist**2 - Solve for dist // CHOMPEdit
|
||||
range = min(round(sqrt(rad_power / CONFIG_GET(number/radiation_lower_limit))), 31) // R = rad_power / dist**2 - Solve for dist
|
||||
return
|
||||
|
||||
/turf
|
||||
@@ -38,7 +38,7 @@
|
||||
else if(O.density) //So open doors don't get counted
|
||||
var/datum/material/M = O.get_material()
|
||||
if(!M) continue
|
||||
cached_rad_resistance += (M.weight + M.radiation_resistance) / CONFIG_GET(number/radiation_material_resistance_divisor) // CHOMPEdit
|
||||
cached_rad_resistance += (M.weight + M.radiation_resistance) / CONFIG_GET(number/radiation_material_resistance_divisor)
|
||||
// Looks like storing the contents length is meant to be a basic check if the cache is stale due to items enter/exiting. Better than nothing so I'm leaving it as is. ~Leshana
|
||||
SSradiation.resistance_cache[src] = (length(contents) + 1)
|
||||
return
|
||||
@@ -49,7 +49,7 @@
|
||||
temp_rad_resistance += material.weight + material.radiation_resistance
|
||||
if(reinf_material)
|
||||
temp_rad_resistance += reinf_material.weight + reinf_material.radiation_resistance
|
||||
cached_rad_resistance = (density ? (temp_rad_resistance) / CONFIG_GET(number/radiation_material_resistance_divisor) : 0) // CHOMPEdit
|
||||
cached_rad_resistance = (density ? (temp_rad_resistance) / CONFIG_GET(number/radiation_material_resistance_divisor) : 0)
|
||||
return
|
||||
|
||||
/turf/simulated/mineral/calc_rad_resistance()
|
||||
|
||||
Reference in New Issue
Block a user