mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-23 13:57:03 +01:00
1c8c0c2221
Fixes several runtimes from the past few weeks, some additional material repath regressions, and the fact that if I shoot you with a stream of ionized deuterium particles, it doesn't riddle you with cancer. changes: - bugfix: "Fixes emergency shields runtiming when hit by thrown objects." - bugfix: "Fixes several stale global list runtimes." - bugfix: "Fixes several health percentage checks that could use unset initial health values." - bugfix: "Fixes additional materials regressions in INDRA code." - bugfix: "Fixes invalid fuel injector depletion math." - bugfix: "Makes accelerated particles apply radiation damage to living mobs they pass through."
43 lines
1.5 KiB
Plaintext
43 lines
1.5 KiB
Plaintext
// explosion logic is in code/controllers/Processes/explosives.dm now
|
|
|
|
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN, spreading = GLOB.config.use_spreading_explosions)
|
|
UNLINT(src = null) //so we don't abort once src is deleted
|
|
var/datum/explosiondata/data = new
|
|
data.epicenter = epicenter
|
|
data.devastation_range = devastation_range
|
|
data.heavy_impact_range = heavy_impact_range
|
|
data.light_impact_range = light_impact_range
|
|
data.flash_range = flash_range
|
|
data.adminlog = adminlog
|
|
data.z_transfer = z_transfer
|
|
data.spreading = spreading
|
|
data.rec_pow = max(0,devastation_range) * 2 + max(0,heavy_impact_range) + max(0,light_impact_range)
|
|
|
|
// queue work
|
|
SSexplosives.queue(data)
|
|
|
|
//Machines which report explosions.
|
|
var/list/invalid_doppler_arrays
|
|
for(var/thing in GLOB.doppler_arrays)
|
|
if(!istype(thing, /obj/structure/machinery/doppler_array))
|
|
LAZYADD(invalid_doppler_arrays, thing)
|
|
continue
|
|
var/obj/structure/machinery/doppler_array/Array = thing
|
|
if(QDELETED(Array))
|
|
LAZYADD(invalid_doppler_arrays, thing)
|
|
continue
|
|
Array.sense_explosion(epicenter.x,epicenter.y,epicenter.z,devastation_range,heavy_impact_range,light_impact_range)
|
|
if(invalid_doppler_arrays)
|
|
GLOB.doppler_arrays -= invalid_doppler_arrays
|
|
|
|
// == Recursive Explosions stuff ==
|
|
|
|
/client/proc/kaboom()
|
|
var/power = input(src, "power?", "power?") as num
|
|
var/turf/T = get_turf(src.mob)
|
|
var/datum/explosiondata/d = new
|
|
d.spreading = TRUE
|
|
d.epicenter = T
|
|
d.rec_pow = power
|
|
SSexplosives.queue(d)
|