diff --git a/code/__DEFINES/research/anomalies.dm b/code/__DEFINES/research/anomalies.dm index 005045dbc26..b67b9e7e36c 100644 --- a/code/__DEFINES/research/anomalies.dm +++ b/code/__DEFINES/research/anomalies.dm @@ -5,3 +5,8 @@ #define MAX_CORES_VORTEX 8 #define MAX_CORES_PYRO 8 #define MAX_CORES_HALLUCINATION 8 + +///Defines for the different types of explosion a flux anomaly can have +#define FLUX_NO_EXPLOSION 0 +#define FLUX_EXPLOSIVE 1 +#define FLUX_LOW_EXPLOSIVE 2 diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 58b50c830d2..f047a34f708 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -195,11 +195,11 @@ aSignal = /obj/item/assembly/signaler/anomaly/flux var/canshock = FALSE var/shockdamage = 20 - var/explosive = TRUE + var/explosive = FLUX_EXPLOSIVE -/obj/effect/anomaly/flux/Initialize(mapload, new_lifespan, drops_core = TRUE, _explosive = TRUE) +/obj/effect/anomaly/flux/Initialize(mapload, new_lifespan, drops_core = TRUE, explosive = FLUX_EXPLOSIVE) . = ..() - explosive = _explosive + src.explosive = explosive var/static/list/loc_connections = list( COMSIG_ATOM_ENTERED = .proc/on_entered, ) @@ -231,11 +231,13 @@ M.electrocute_act(shockdamage, name, flags = SHOCK_NOGLOVES) /obj/effect/anomaly/flux/detonate() - if(explosive) - explosion(src, devastation_range = 1, heavy_impact_range = 4, light_impact_range = 16, flash_range = 18) //Low devastation, but hits a lot of stuff. - else - new /obj/effect/particle_effect/sparks(loc) - + switch(explosive) + if(FLUX_EXPLOSIVE) + explosion(src, devastation_range = 1, heavy_impact_range = 4, light_impact_range = 16, flash_range = 18) //Low devastation, but hits a lot of stuff. + if(FLUX_LOW_EXPLOSIVE) + explosion(src, heavy_impact_range = 1, light_impact_range = 4, flash_range = 6) + if(FLUX_NO_EXPLOSION) + new /obj/effect/particle_effect/sparks(loc) ///////////////////// diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 42feec67ab3..52418d2f78c 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -521,8 +521,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) return switch(type) if(FLUX_ANOMALY) - var/obj/effect/anomaly/flux/flux = new(local_turf, has_changed_lifespan ? rand(250, 350) : null, FALSE) - flux.explosive = !has_changed_lifespan + var/explosive = has_changed_lifespan ? FLUX_NO_EXPLOSION : FLUX_LOW_EXPLOSIVE + new /obj/effect/anomaly/flux(local_turf, has_changed_lifespan ? rand(250, 350) : null, FALSE, explosive) if(GRAVITATIONAL_ANOMALY) new /obj/effect/anomaly/grav(local_turf, has_changed_lifespan ? rand(200, 300) : null, FALSE) if(PYRO_ANOMALY) diff --git a/code/modules/power/supermatter/supermatter_delamination.dm b/code/modules/power/supermatter/supermatter_delamination.dm index 11b02e4d473..5b8347e5bfd 100644 --- a/code/modules/power/supermatter/supermatter_delamination.dm +++ b/code/modules/power/supermatter/supermatter_delamination.dm @@ -9,11 +9,11 @@ setup_anomalies() /datum/supermatter_delamination/proc/setup_anomalies() - anomalies_to_spawn = max(round(0.005 * supermatter_power, 1) + rand(-2, 5), 1) + anomalies_to_spawn = max(round(0.004 * supermatter_power, 1) + rand(-2, 2), 1) spawn_anomalies() /datum/supermatter_delamination/proc/spawn_anomalies() - var/list/anomaly_types = list(FLUX_ANOMALY = 65, GRAVITATIONAL_ANOMALY = 55, HALLUCINATION_ANOMALY = 45, PYRO_ANOMALY = 5, VORTEX_ANOMALY = 1) + var/list/anomaly_types = list(GRAVITATIONAL_ANOMALY = 55, HALLUCINATION_ANOMALY = 45, FLUX_ANOMALY = 35, PYRO_ANOMALY = 5, VORTEX_ANOMALY = 1) var/list/anomaly_places = GLOB.generic_event_spawns var/currently_spawning_anomalies = round(anomalies_to_spawn * 0.5, 1) anomalies_to_spawn -= currently_spawning_anomalies @@ -26,7 +26,7 @@ /datum/supermatter_delamination/proc/spawn_overtime() - var/list/anomaly_types = list(FLUX_ANOMALY = 65, GRAVITATIONAL_ANOMALY = 55, HALLUCINATION_ANOMALY = 45, PYRO_ANOMALY = 5, VORTEX_ANOMALY = 1) + var/list/anomaly_types = list(GRAVITATIONAL_ANOMALY = 55, HALLUCINATION_ANOMALY = 45, FLUX_ANOMALY = 35, PYRO_ANOMALY = 5, VORTEX_ANOMALY = 1) var/list/anomaly_places = GLOB.generic_event_spawns var/current_spawn = rand(5 SECONDS, 10 SECONDS)