diff --git a/code/__DEFINES/explosions.dm b/code/__DEFINES/explosions.dm index 855c5e6c9a537..3bac016833b29 100644 --- a/code/__DEFINES/explosions.dm +++ b/code/__DEFINES/explosions.dm @@ -26,9 +26,7 @@ target.ex_act(##args); // Explodable component deletion values -/// Makes the explodable component queue to reset its exploding status when it detonates. -#define EXPLODABLE_NO_DELETE 0 /// Makes the explodable component delete itself when it detonates. -#define EXPLODABLE_DELETE_SELF 1 +#define EXPLODABLE_DELETE_SELF 0 /// Makes the explodable component delete its parent when it detonates. -#define EXPLODABLE_DELETE_PARENT 2 +#define EXPLODABLE_DELETE_PARENT 1 diff --git a/code/controllers/subsystem/explosion.dm b/code/controllers/subsystem/explosion.dm index b3aefebebff7e..12a3dcf6730a9 100644 --- a/code/controllers/subsystem/explosion.dm +++ b/code/controllers/subsystem/explosion.dm @@ -558,7 +558,9 @@ SUBSYSTEM_DEF(explosions) new /obj/effect/hotspot(T) //Mostly for ambience! cost_flameturf = MC_AVERAGE(cost_flameturf, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) - if (low_turf.len || med_turf.len || high_turf.len) + // If a significant amount of turfs change, then we will run lighter for the rest of the tick + // because maptick is going to have an unexpected increase. + if (low_turf.len + med_turf.len + high_turf.len > 10) Master.laggy_byond_map_update_incoming() if(currentpart == SSEXPLOSIONS_MOVABLES) diff --git a/code/datums/components/explodable.dm b/code/datums/components/explodable.dm index 1d5e69085fa81..7175e68cf58fe 100644 --- a/code/datums/components/explodable.dm +++ b/code/datums/components/explodable.dm @@ -10,8 +10,6 @@ var/delete_after /// For items, lets us determine where things should be hit. var/equipped_slot - /// it won't explode again if cooldown is on. This is necessary because explosion() proc through SSexplosion doesn't tell if it's exploded - COOLDOWN_DECLARE(explosion_cooling) /datum/component/explodable/Initialize(devastation_range, heavy_impact_range, light_impact_range, flash_range, uncapped = FALSE, delete_after = EXPLODABLE_DELETE_PARENT) if(!isatom(parent)) @@ -125,9 +123,6 @@ /// Expldoe and remove the object /datum/component/explodable/proc/detonate() SIGNAL_HANDLER - if(!COOLDOWN_FINISHED(src, explosion_cooling)) - return // If we don't do this and this doesn't delete it can lock the MC into only processing Input, Timers, and Explosions. - COOLDOWN_START(src, explosion_cooling, 1) var/atom/bomb = parent explosion(bomb, devastation_range, heavy_impact_range, light_impact_range, flash_range, uncapped) //epic explosion time diff --git a/code/datums/materials/basemats.dm b/code/datums/materials/basemats.dm index d7ecd240afd6a..94db9c8246f14 100644 --- a/code/datums/materials/basemats.dm +++ b/code/datums/materials/basemats.dm @@ -90,7 +90,7 @@ Unless you know what you're doing, only use the first three numbers. They're in . = ..() if(ismovable(source)) source.AddElement(/datum/element/firestacker, amount=1) - source.AddComponent(/datum/component/explodable, 0, 0, amount / 1000, amount / 500, delete_after = EXPLODABLE_NO_DELETE) + source.AddComponent(/datum/component/explodable, 0, 0, amount / 1000, amount / 500, delete_after = EXPLODABLE_DELETE_PARENT) /datum/material/plasma/on_removed(atom/source, amount, material_flags) . = ..()