From 9ad2d5b5c2a98ae1ef6ccba9a0fe73b9832098ad Mon Sep 17 00:00:00 2001 From: Giacomand Date: Sun, 27 Oct 2013 12:45:02 +0000 Subject: [PATCH] The doppler array will now state the theoretical size of the explosion, which is the size of the explosion if there were no bomb cap. --- code/game/machinery/doppler_array.dm | 14 +++++++++++--- code/game/objects/explosion.dm | 7 ++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index ab84288bfea..0b1e4ba91fd 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -39,7 +39,8 @@ var/list/doppler_arrays = list() src.dir = turn(src.dir, 90) return -/obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range,var/took) +/obj/machinery/doppler_array/proc/sense_explosion(var/x0,var/y0,var/z0,var/devastation_range,var/heavy_impact_range,var/light_impact_range, + var/took,var/orig_dev_range,var/orig_heavy_range,var/orig_light_range) if(stat & NOPOWER) return if(z != z0) return @@ -60,10 +61,17 @@ var/list/doppler_arrays = list() if(distance > 100) return if(!(direct & dir)) return - var/message = "Explosive disturbance detected - Epicenter at: grid ([x0],[y0]). Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range]. Temporal displacement of tachyons: [took] seconds." + var/list/messages = list("Explosive disturbance detected.", \ + "Epicenter at: grid ([x0],[y0]). Temporal displacement of tachyons: [took] seconds.", \ + "Factual: Epicenter radius: [devastation_range]. Outer radius: [heavy_impact_range]. Shockwave radius: [light_impact_range].") + + // If the bomb was capped, say it's theoretical size. + if(devastation_range < orig_dev_range || heavy_impact_range < orig_heavy_range || light_impact_range < orig_light_range) + messages += "Theoretical: Epicenter radius: [orig_dev_range]. Outer radius: [orig_heavy_range]. Shockwave radius: [orig_light_range]." for(var/mob/O in hearers(src, null)) - O.show_message("[src] states coldly, \"[message]\"",2) + for(var/message in messages) + O.show_message("[src] states coldly, \"[message]\"",2) /obj/machinery/doppler_array/power_change() diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index deca5ba80a7..a095f7bff6a 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -11,6 +11,11 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa src = null //so we don't abort once src is deleted epicenter = get_turf(epicenter) + // Archive the uncapped explosion for the doppler array + var/orig_dev_range = devastation_range + var/orig_heavy_range = heavy_impact_range + var/orig_light_range = light_impact_range + if(!ignorecap) // Clamp all values to MAX_EXPLOSION_RANGE devastation_range = min (MAX_EX_DEVESTATION_RANGE, devastation_range) @@ -91,7 +96,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa for(var/i,i<=doppler_arrays.len,i++) var/obj/machinery/doppler_array/Array = doppler_arrays[i] if(Array) - Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took) + Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took,orig_dev_range,orig_heavy_range,orig_light_range) sleep(8)