From fb488fdfff3a22b2803fc9a824680651b5b86d4e Mon Sep 17 00:00:00 2001 From: TemporalOroboros Date: Sat, 20 Mar 2021 16:03:59 -0700 Subject: [PATCH] Some explosions code cleanup (#57493) Clears out two deprecated explosions systems (explosion ids and explosion levels) Refactors a bunch of contents_explosions procs to be maybe slightly faster. Cleans up a bunch of ex_act code. Slightly cleaner code A few less unused vars on /atom and /turf --- code/controllers/subsystem/explosions.dm | 3 -- code/game/atoms_movable.dm | 9 ---- code/game/machinery/PDApainter.dm | 20 ++++++-- code/game/machinery/_machinery.dm | 11 ++++- code/game/machinery/aug_manipulator.dm | 12 ++++- code/game/machinery/camera/camera.dm | 4 +- code/game/machinery/doors/door.dm | 2 +- code/game/machinery/doors/passworddoor.dm | 2 +- code/game/machinery/doors/poddoor.dm | 6 +-- code/game/objects/effects/anomalies.dm | 2 +- code/game/objects/effects/decals/cleanable.dm | 2 +- .../effects/decals/cleanable/aliens.dm | 2 +- .../effects/decals/cleanable/humans.dm | 2 +- .../objects/effects/decals/cleanable/misc.dm | 4 +- .../effects/decals/cleanable/robots.dm | 2 +- code/game/objects/effects/effects.dm | 2 +- code/game/objects/effects/phased_mob.dm | 2 +- code/game/objects/items/chrono_eraser.dm | 2 +- .../items/devices/portable_chem_mixer.dm | 4 +- code/game/objects/items/latexballoon.dm | 4 +- code/game/objects/items/melee/misc.dm | 6 ++- code/game/objects/items/puzzle_pieces.dm | 2 +- code/game/objects/items/storage/storage.dm | 15 +++--- code/game/objects/obj_defense.dm | 9 ++-- .../structures/crates_lockers/closets.dm | 15 +++--- .../crates_lockers/closets/secure/freezer.dm | 7 ++- code/game/objects/structures/extinguisher.dm | 18 ++++---- code/game/objects/structures/guncase.dm | 15 +++--- code/game/objects/structures/reflector.dm | 5 +- code/game/objects/structures/safe.dm | 2 +- code/game/objects/structures/tank_holder.dm | 12 ++++- .../transit_tubes/transit_tube_pod.dm | 17 ++++--- code/game/turfs/change_turf.dm | 5 -- code/game/turfs/closed/minerals.dm | 18 ++++---- code/game/turfs/closed/wall/mineral_walls.dm | 2 +- code/game/turfs/closed/walls.dm | 14 +++--- code/game/turfs/open/floor.dm | 23 +++++----- code/game/turfs/open/floor/plating.dm | 2 +- code/game/turfs/open/floor/reinf_floor.dm | 14 +++--- code/game/turfs/turf.dm | 4 -- code/modules/antagonists/revenant/revenant.dm | 2 +- .../antagonists/slaughter/slaughter.dm | 6 +-- .../components/unary_devices/cryo.dm | 20 ++++---- .../portable/portable_atmospherics.dm | 5 +- code/modules/cargo/supplypod.dm | 2 +- code/modules/hydroponics/biogenerator.dm | 20 ++++---- code/modules/lighting/lighting_object.dm | 2 +- code/modules/mining/machine_redemption.dm | 2 +- code/modules/mining/machine_vending.dm | 2 +- code/modules/mining/ores_coins.dm | 10 ++-- code/modules/mob/living/brain/brain.dm | 2 +- .../mob/living/carbon/alien/alien_defense.dm | 6 ++- .../mob/living/carbon/human/human_defense.dm | 7 +-- code/modules/mob/living/living_defense.dm | 4 +- .../mob/living/silicon/ai/ai_defense.dm | 6 +-- .../mob/living/silicon/pai/pai_defense.dm | 6 +-- .../mob/living/silicon/robot/robot_defense.dm | 6 +-- .../living/simple_animal/animal_defense.dm | 7 +-- .../mob/living/simple_animal/bot/mulebot.dm | 10 ++-- .../living/simple_animal/guardian/guardian.dm | 8 ++-- .../simple_animal/guardian/types/protector.dm | 6 +-- .../living/simple_animal/hostile/cockroach.dm | 2 +- .../hostile/megafauna/blood_drunk_miner.dm | 2 +- .../hostile/megafauna/bubblegum.dm | 3 +- .../hostile/megafauna/demonic_frost_miner.dm | 2 +- .../simple_animal/hostile/megafauna/drake.dm | 4 +- .../hostile/mining_mobs/basilisk.dm | 6 +-- .../computers/machinery/modular_computer.dm | 20 ++++---- code/modules/power/cell.dm | 20 ++++---- code/modules/power/gravitygenerator.dm | 2 +- code/modules/power/singularity/singularity.dm | 14 +++--- .../projectiles/guns/misc/blastcannon.dm | 2 +- .../chemistry/machinery/chem_dispenser.dm | 23 ++++++---- .../chemistry/machinery/chem_master.dm | 31 +++++++------ .../chemistry/machinery/reagentgrinder.dm | 18 ++++---- code/modules/reagents/reagent_containers.dm | 2 +- code/modules/recycling/disposal/holder.dm | 2 +- code/modules/recycling/disposal/pipe.dm | 3 +- code/modules/recycling/sortingmachinery.dm | 30 ++++++------ .../xenobiology/crossbreeding/burning.dm | 7 +-- code/modules/shuttle/special.dm | 2 +- code/modules/station_goals/bsa.dm | 2 +- code/modules/vehicles/mecha/mecha_defense.dm | 46 ++++++++++--------- 83 files changed, 358 insertions(+), 326 deletions(-) diff --git a/code/controllers/subsystem/explosions.dm b/code/controllers/subsystem/explosions.dm index 23505f19673..010e57be1f4 100644 --- a/code/controllers/subsystem/explosions.dm +++ b/code/controllers/subsystem/explosions.dm @@ -470,7 +470,6 @@ SUBSYSTEM_DEF(explosions) lowturf = list() for(var/thing in low_turf) var/turf/turf_thing = thing - turf_thing.explosion_level = max(turf_thing.explosion_level, EXPLODE_LIGHT) turf_thing.ex_act(EXPLODE_LIGHT) cost_lowturf = MC_AVERAGE(cost_lowturf, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) @@ -479,7 +478,6 @@ SUBSYSTEM_DEF(explosions) medturf = list() for(var/thing in med_turf) var/turf/turf_thing = thing - turf_thing.explosion_level = max(turf_thing.explosion_level, EXPLODE_HEAVY) turf_thing.ex_act(EXPLODE_HEAVY) cost_medturf = MC_AVERAGE(cost_medturf, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) @@ -488,7 +486,6 @@ SUBSYSTEM_DEF(explosions) highturf = list() for(var/thing in high_turf) var/turf/turf_thing = thing - turf_thing.explosion_level = max(turf_thing.explosion_level, EXPLODE_DEVASTATE) turf_thing.ex_act(EXPLODE_DEVASTATE) cost_highturf = MC_AVERAGE(cost_highturf, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 6633dfeedd8..3e8bcc75ad3 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -36,7 +36,6 @@ var/atom/movable/moving_from_pull //attempt to resume grab after moving instead of before. var/list/client_mobs_in_contents // This contains all the client mobs within this container var/list/area_sensitive_contents // A (nested) list of contents that need to be sent signals to when moving between areas. Can include src. - var/list/acted_explosions //for explosion dodging var/datum/forced_movement/force_moving = null //handled soley by forced_movement.dm /** @@ -939,14 +938,6 @@ . += "" . += "" -/atom/movable/proc/ex_check(ex_id) - if(!ex_id) - return TRUE - LAZYINITLIST(acted_explosions) - if(ex_id in acted_explosions) - return FALSE - acted_explosions += ex_id - return TRUE /* Language procs * Unless you are doing something very specific, these are the ones you want to use. diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 7af1a74f626..0247ae08d9a 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -78,10 +78,22 @@ stored_id_card = null /obj/machinery/pdapainter/contents_explosion(severity, target) - if(stored_pda) - stored_pda.ex_act(severity, target) - if(stored_id_card) - stored_id_card.ex_act(severity, target) + switch(severity) + if(EXPLODE_DEVASTATE) + if(stored_pda) + SSexplosions.high_mov_atom += stored_pda + if(stored_id_card) + SSexplosions.high_mov_atom += stored_id_card + if(EXPLODE_HEAVY) + if(stored_pda) + SSexplosions.med_mov_atom += stored_pda + if(stored_id_card) + SSexplosions.med_mov_atom += stored_id_card + if(EXPLODE_LIGHT) + if(stored_pda) + SSexplosions.low_mov_atom += stored_pda + if(stored_id_card) + SSexplosions.low_mov_atom += stored_id_card /obj/machinery/pdapainter/handle_atom_del(atom/A) if(A == stored_pda) diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 374515af453..4e658b658c7 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -548,7 +548,16 @@ return TRUE /obj/machinery/contents_explosion(severity, target) - occupant?.ex_act(severity, target) + if(!occupant) + return + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += occupant + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += occupant + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += occupant /obj/machinery/handle_atom_del(atom/A) if(A == occupant) diff --git a/code/game/machinery/aug_manipulator.dm b/code/game/machinery/aug_manipulator.dm index 5dc2bdbfbf6..92782e1df22 100644 --- a/code/game/machinery/aug_manipulator.dm +++ b/code/game/machinery/aug_manipulator.dm @@ -42,8 +42,16 @@ storedpart = null /obj/machinery/aug_manipulator/contents_explosion(severity, target) - if(storedpart) - storedpart.ex_act(severity, target) + if(!storedpart) + return + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += storedpart + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += storedpart + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += storedpart /obj/machinery/aug_manipulator/handle_atom_del(atom/A) if(A == storedpart) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 38ce60ade20..b4230cdc737 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -173,8 +173,8 @@ /obj/machinery/camera/ex_act(severity, target) if(invuln) - return - ..() + return FALSE + return ..() /obj/machinery/camera/proc/setViewRange(num = 7) src.view_range = num diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index a80bcf82ec2..f2bcf4e271c 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -432,7 +432,7 @@ /obj/machinery/door/ex_act(severity, target) //if it blows up a wall it should blow up a door - ..(severity ? max(1, severity - 1) : 0, target) + return ..(severity ? max(1, severity - 1) : 0, target) /obj/machinery/door/GetExplosionBlock() return density ? real_explosion_block : 0 diff --git a/code/game/machinery/doors/passworddoor.dm b/code/game/machinery/doors/passworddoor.dm index efe87f016e5..c6b13af7640 100644 --- a/code/game/machinery/doors/passworddoor.dm +++ b/code/game/machinery/doors/passworddoor.dm @@ -68,4 +68,4 @@ return /obj/machinery/door/password/ex_act(severity, target) - return + return FALSE diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index c521d1a99a8..a5876d78485 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -141,9 +141,9 @@ //"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS. /obj/machinery/door/poddoor/ex_act(severity, target) - if(severity == 3) - return - ..() + if(severity == EXPLODE_LIGHT) + return FALSE + return ..() /obj/machinery/door/poddoor/do_animate(animation) switch(animation) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 7f23e6ba1b7..988711468fd 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -75,7 +75,7 @@ return /obj/effect/anomaly/ex_act(severity, target) - if(severity == 1) + if(severity == EXPLODE_DEVASTATE) qdel(src) /obj/effect/anomaly/proc/anomalyNeutralize() diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 1756ff7d7e7..be1a4005910 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -73,7 +73,7 @@ if(reagents) for(var/datum/reagent/R in reagents.reagent_list) R.on_ex_act() - ..() + return ..() /obj/effect/decal/cleanable/fire_act(exposed_temperature, exposed_volume) if(reagents) diff --git a/code/game/objects/effects/decals/cleanable/aliens.dm b/code/game/objects/effects/decals/cleanable/aliens.dm index 8ce3fb14405..8b0c82cce75 100644 --- a/code/game/objects/effects/decals/cleanable/aliens.dm +++ b/code/game/objects/effects/decals/cleanable/aliens.dm @@ -54,7 +54,7 @@ streak(dirs) /obj/effect/decal/cleanable/xenoblood/xgibs/ex_act() - return + return FALSE /obj/effect/decal/cleanable/xenoblood/xgibs/up icon_state = "xgibup1" diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 9eceb1d1729..a73a0f44862 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -109,7 +109,7 @@ AddComponent(/datum/component/rot/gibs) /obj/effect/decal/cleanable/blood/gibs/ex_act(severity, target) - return + return FALSE /obj/effect/decal/cleanable/blood/gibs/Crossed(atom/movable/L) if(isliving(L) && has_gravity(loc)) diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index 7ff889e20c0..847daa4766b 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -89,7 +89,7 @@ beauty = -300 /obj/effect/decal/cleanable/greenglow/ex_act() - return + return FALSE /obj/effect/decal/cleanable/greenglow/filled/Initialize() . = ..() @@ -181,7 +181,7 @@ mergeable_decal = FALSE /obj/effect/decal/cleanable/shreds/ex_act(severity, target) - if(severity == 1) //so shreds created during an explosion aren't deleted by the explosion. + if(severity == EXPLODE_DEVASTATE) //so shreds created during an explosion aren't deleted by the explosion. qdel(src) /obj/effect/decal/cleanable/shreds/Initialize(mapload, oldname) diff --git a/code/game/objects/effects/decals/cleanable/robots.dm b/code/game/objects/effects/decals/cleanable/robots.dm index 359a3c838f8..32ed80734d2 100644 --- a/code/game/objects/effects/decals/cleanable/robots.dm +++ b/code/game/objects/effects/decals/cleanable/robots.dm @@ -45,7 +45,7 @@ streak(dirs) /obj/effect/decal/cleanable/robot_debris/ex_act() - return + return FALSE /obj/effect/decal/cleanable/robot_debris/limb icon_state = "gibarm" diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm index 839fb8fcebd..6337dea1596 100644 --- a/code/game/objects/effects/effects.dm +++ b/code/game/objects/effects/effects.dm @@ -27,7 +27,7 @@ return /obj/effect/ex_act(severity, target) - return + return FALSE /obj/effect/singularity_act() qdel(src) diff --git a/code/game/objects/effects/phased_mob.dm b/code/game/objects/effects/phased_mob.dm index bdbed11ffc9..ce221c97d6c 100644 --- a/code/game/objects/effects/phased_mob.dm +++ b/code/game/objects/effects/phased_mob.dm @@ -32,7 +32,7 @@ return ..() /obj/effect/dummy/phased_mob/ex_act() - return + return FALSE /obj/effect/dummy/phased_mob/bullet_act(blah) return BULLET_ACT_FORCE_PIERCE diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index e6b2d46fe90..22dc58eeed3 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -271,7 +271,7 @@ return /obj/structure/chrono_field/ex_act() - return + return FALSE /obj/structure/chrono_field/blob_act(obj/structure/blob/B) return diff --git a/code/game/objects/items/devices/portable_chem_mixer.dm b/code/game/objects/items/devices/portable_chem_mixer.dm index 1e600b7df08..7e666969234 100644 --- a/code/game/objects/items/devices/portable_chem_mixer.dm +++ b/code/game/objects/items/devices/portable_chem_mixer.dm @@ -36,8 +36,8 @@ return ..() /obj/item/storage/portable_chem_mixer/ex_act(severity, target) - if(severity < 3) - ..() + if(severity < EXPLODE_LIGHT) + return ..() /obj/item/storage/portable_chem_mixer/attackby(obj/item/I, mob/user, params) var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index b48482579c7..20c4473eae3 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -44,9 +44,9 @@ /obj/item/latexballon/ex_act(severity, target) burst() switch(severity) - if (1) + if (EXPLODE_DEVASTATE) qdel(src) - if (2) + if (EXPLODE_HEAVY) if (prob(50)) qdel(src) diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 20c532309f6..eb4a55fe77b 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -487,8 +487,10 @@ balanced = 0 /obj/item/melee/supermatter_sword/ex_act(severity, target) - visible_message("The blast wave smacks into [src] and rapidly flashes to ash.",\ - "You hear a loud crack as you are washed with a wave of heat.") + visible_message( + "The blast wave smacks into [src] and rapidly flashes to ash.", + "You hear a loud crack as you are washed with a wave of heat." + ) consume_everything() /obj/item/melee/supermatter_sword/acid_act() diff --git a/code/game/objects/items/puzzle_pieces.dm b/code/game/objects/items/puzzle_pieces.dm index be5813c4e97..a4aa37ae4fa 100644 --- a/code/game/objects/items/puzzle_pieces.dm +++ b/code/game/objects/items/puzzle_pieces.dm @@ -55,7 +55,7 @@ return /obj/machinery/door/keycard/ex_act(severity, target) - return + return FALSE /obj/machinery/door/keycard/try_to_activate_door(mob/user) add_fingerprint(user) diff --git a/code/game/objects/items/storage/storage.dm b/code/game/objects/items/storage/storage.dm index 9c1d1e1bcd6..ee01bea8eba 100644 --- a/code/game/objects/items/storage/storage.dm +++ b/code/game/objects/items/storage/storage.dm @@ -19,14 +19,13 @@ return FALSE /obj/item/storage/contents_explosion(severity, target) - for(var/thing in contents) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += thing - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += thing - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += thing + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += contents + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += contents + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += contents /obj/item/storage/canStrip(mob/who) . = ..() diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 20d0f526305..95f67108db3 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -57,18 +57,19 @@ /obj/ex_act(severity, target) if(resistance_flags & INDESTRUCTIBLE) return - ..() //contents explosion + + . = ..() //contents explosion if(QDELETED(src)) return if(target == src) take_damage(INFINITY, BRUTE, BOMB, 0) return switch(severity) - if(1) + if(EXPLODE_DEVASTATE) take_damage(INFINITY, BRUTE, BOMB, 0) - if(2) + if(EXPLODE_HEAVY) take_damage(rand(100, 250), BRUTE, BOMB, 0) - if(3) + if(EXPLODE_LIGHT) take_damage(rand(10, 90), BRUTE, BOMB, 0) /obj/bullet_act(obj/projectile/P) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 32b01f20e49..bc7317e270b 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -502,14 +502,13 @@ req_access += pick(SSid_access.get_region_access_list(list(REGION_ALL_STATION))) /obj/structure/closet/contents_explosion(severity, target) - for(var/thing in contents) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += thing - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += thing - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += thing + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += contents + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += contents + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += contents /obj/structure/closet/singularity_act() dump_contents() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm index eb316a830c5..d2f0d3983e2 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm @@ -21,10 +21,9 @@ recursive_organ_check(src) /obj/structure/closet/secure_closet/freezer/ex_act() - if(!jones) - jones = TRUE - else - ..() + if(jones) + return ..() + jones = TRUE /obj/structure/closet/secure_closet/freezer/kitchen name = "kitchen cabinet" diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index d8bda5d73dc..fbbd268945a 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -32,14 +32,16 @@ return ..() /obj/structure/extinguisher_cabinet/contents_explosion(severity, target) - if(stored_extinguisher) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += stored_extinguisher - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += stored_extinguisher - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += stored_extinguisher + if(!stored_extinguisher) + return + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += stored_extinguisher + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += stored_extinguisher + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += stored_extinguisher /obj/structure/extinguisher_cabinet/handle_atom_del(atom/A) if(A == stored_extinguisher) diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index 0b48c748f4b..32a0387931d 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -113,14 +113,13 @@ update_appearance() /obj/structure/guncase/contents_explosion(severity, target) - for(var/thing in contents) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += thing - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += thing - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += thing + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += contents + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += contents + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += contents /obj/structure/guncase/shotgun name = "shotgun locker" diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index 229d663b6c0..d76cdd49b48 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -246,9 +246,8 @@ /obj/structure/reflector/ex_act() if(admin) - return - else - return ..() + return FALSE + return ..() /obj/structure/reflector/singularity_act() if(admin) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 6ec84a5fb23..c335e1b08fe 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -83,7 +83,7 @@ FLOOR SAFES return /obj/structure/safe/ex_act(severity, target) - if(((severity == 2 && target == src) || severity == 1) && explosion_count < BROKEN_THRESHOLD) + if(((severity == EXPLODE_HEAVY && target == src) || severity == EXPLODE_DEVASTATE) && explosion_count < BROKEN_THRESHOLD) explosion_count++ switch(explosion_count) if(1) diff --git a/code/game/objects/structures/tank_holder.dm b/code/game/objects/structures/tank_holder.dm index 7b087bf6dcf..2dff1e3b840 100644 --- a/code/game/objects/structures/tank_holder.dm +++ b/code/game/objects/structures/tank_holder.dm @@ -80,8 +80,16 @@ return ..() /obj/structure/tank_holder/contents_explosion(severity, target) - if(tank) - tank.ex_act(severity, target) + if(!tank) + return + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += tank + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += tank + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += tank /// Call this after taking the tank from contents in order to update references, icon /// and density. diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index f703c2a2f53..9100bfbd6c4 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -60,19 +60,18 @@ qdel(src) /obj/structure/transit_tube_pod/ex_act(severity, target) - ..() + . = ..() if(!QDELETED(src)) empty_pod() /obj/structure/transit_tube_pod/contents_explosion(severity, target) - for(var/thing in contents) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += thing - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += thing - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += thing + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += contents + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += contents + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += contents /obj/structure/transit_tube_pod/singularity_pull(S, current_size) ..() diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index 427ff037b8f..f9d77b3393b 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -82,8 +82,6 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( var/old_corners = corners var/old_directional_opacity = directional_opacity - var/old_exl = explosion_level - var/old_exi = explosion_id var/old_bp = blueprint_data blueprint_data = null @@ -108,9 +106,6 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( else W.baseturfs = baseturfs_string_list(old_baseturfs, W) //Just to be safe - W.explosion_id = old_exi - W.explosion_level = old_exl - if(!(flags & CHANGETURF_DEFER_CHANGE)) W.AfterChange(flags, old_type) diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm index 87ff072a022..56abd57ca86 100644 --- a/code/game/turfs/closed/minerals.dm +++ b/code/game/turfs/closed/minerals.dm @@ -162,16 +162,16 @@ ScrapeAway() /turf/closed/mineral/ex_act(severity, target) - ..() + . = ..() switch(severity) - if(3) - if (prob(75)) - gets_drilled(null, FALSE) - if(2) - if (prob(90)) - gets_drilled(null, FALSE) - if(1) + if(EXPLODE_DEVASTATE) gets_drilled(null, FALSE) + if(EXPLODE_HEAVY) + if(prob(90)) + gets_drilled(null, FALSE) + if(EXPLODE_LIGHT) + if(prob(75)) + gets_drilled(null, FALSE) return /turf/closed/mineral/random @@ -674,6 +674,6 @@ return /turf/closed/mineral/strong/ex_act(severity, target) - return + return FALSE #undef MINING_MESSAGE_COOLDOWN diff --git a/code/game/turfs/closed/wall/mineral_walls.dm b/code/game/turfs/closed/wall/mineral_walls.dm index f1bc8bf8e32..cb80a8f2754 100644 --- a/code/game/turfs/closed/wall/mineral_walls.dm +++ b/code/game/turfs/closed/wall/mineral_walls.dm @@ -349,7 +349,7 @@ /turf/closed/wall/mineral/plastitanium/explosive/ex_act(severity) var/obj/item/bombcore/large/bombcore = new(get_turf(src)) bombcore.detonate() - ..() + return ..() /turf/closed/wall/mineral/plastitanium/hulk_recoil(obj/item/bodypart/arm, mob/living/carbon/human/hulkman, damage = 41) return ..() diff --git a/code/game/turfs/closed/walls.dm b/code/game/turfs/closed/walls.dm index c75450e382a..131128f82cd 100644 --- a/code/game/turfs/closed/walls.dm +++ b/code/game/turfs/closed/walls.dm @@ -62,7 +62,7 @@ /turf/closed/wall/attack_tk() return -/turf/closed/wall/proc/dismantle_wall(devastated=0, explode=0) +/turf/closed/wall/proc/dismantle_wall(devastated = FALSE, explode = FALSE) if(devastated) devastate_wall() else @@ -92,18 +92,16 @@ if(target == src) dismantle_wall(1,1) return + switch(severity) - if(1) + if(EXPLODE_DEVASTATE) //SN src = null var/turf/NT = ScrapeAway() NT.contents_explosion(severity, target) return - if(2) - if (prob(50)) - dismantle_wall(0,1) - else - dismantle_wall(1,1) - if(3) + if(EXPLODE_HEAVY) + dismantle_wall(prob(50), TRUE) + if(EXPLODE_LIGHT) if (prob(hardness)) dismantle_wall(0,1) if(!density) diff --git a/code/game/turfs/open/floor.dm b/code/game/turfs/open/floor.dm index f4588d79ec3..6d15de4d9ff 100644 --- a/code/game/turfs/open/floor.dm +++ b/code/game/turfs/open/floor.dm @@ -61,21 +61,22 @@ return ..() /turf/open/floor/ex_act(severity, target) - var/shielded = is_shielded() - ..() - if(severity != 1 && shielded && target != src) - return + . = ..() + if(target == src) ScrapeAway(flags = CHANGETURF_INHERIT_AIR) - return - if(target != null) - severity = 3 + return TRUE + if(severity != EXPLODE_DEVASTATE && is_shielded()) + return FALSE + + if(target) + severity = EXPLODE_LIGHT switch(severity) - if(1) + if(EXPLODE_DEVASTATE) ScrapeAway(2, flags = CHANGETURF_INHERIT_AIR) - if(2) - switch(rand(1,3)) + if(EXPLODE_HEAVY) + switch(rand(1, 3)) if(1) if(!length(baseturfs) || !ispath(baseturfs[baseturfs.len-1], /turf/open/floor)) ScrapeAway(flags = CHANGETURF_INHERIT_AIR) @@ -94,7 +95,7 @@ hotspot_expose(1000,CELL_VOLUME) if(prob(33)) new /obj/item/stack/sheet/iron(src) - if(3) + if(EXPLODE_LIGHT) if (prob(50)) src.break_tile() src.hotspot_expose(1000,CELL_VOLUME) diff --git a/code/game/turfs/open/floor/plating.dm b/code/game/turfs/open/floor/plating.dm index 7f21037352f..d5749b8055a 100644 --- a/code/game/turfs/open/floor/plating.dm +++ b/code/game/turfs/open/floor/plating.dm @@ -144,7 +144,7 @@ return FALSE /turf/open/floor/plating/foam/ex_act() - ..() + . = ..() ScrapeAway(flags = CHANGETURF_INHERIT_AIR) /turf/open/floor/plating/foam/tool_act(mob/living/user, obj/item/I, tool_type) diff --git a/code/game/turfs/open/floor/reinf_floor.dm b/code/game/turfs/open/floor/reinf_floor.dm index 4262199ab42..b577cbed6af 100644 --- a/code/game/turfs/open/floor/reinf_floor.dm +++ b/code/game/turfs/open/floor/reinf_floor.dm @@ -53,16 +53,16 @@ acidpwr = min(acidpwr, 50) //we reduce the power so reinf floor never get melted. return ..() -/turf/open/floor/engine/ex_act(severity,target) - var/shielded = is_shielded() +/turf/open/floor/engine/ex_act(severity, target) contents_explosion(severity, target) - if(severity != 1 && shielded && target != src) - return if(target == src) ScrapeAway(flags = CHANGETURF_INHERIT_AIR) - return + return TRUE + if(severity != EXPLODE_DEVASTATE && is_shielded()) + return FALSE + switch(severity) - if(1) + if(EXPLODE_DEVASTATE) if(prob(80)) if(!length(baseturfs) || !ispath(baseturfs[baseturfs.len-1], /turf/open/floor)) ScrapeAway(flags = CHANGETURF_INHERIT_AIR) @@ -73,7 +73,7 @@ ScrapeAway(2, flags = CHANGETURF_INHERIT_AIR) else ScrapeAway(flags = CHANGETURF_INHERIT_AIR) - if(2) + if(EXPLODE_HEAVY) if(prob(50)) ScrapeAway(flags = CHANGETURF_INHERIT_AIR) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index bdc3b992e7b..600d26446dd 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -24,8 +24,6 @@ GLOBAL_LIST_EMPTY(station_turfs) var/list/image/blueprint_data //for the station blueprints, images of objects eg: pipes - var/explosion_level = 0 //for preventing explosion dodging - var/explosion_id = 0 var/list/explosion_throw_details var/requires_activation //add to air processing after initialize? @@ -480,8 +478,6 @@ GLOBAL_LIST_EMPTY(station_turfs) var/atom/movable/movable_thing = thing if(QDELETED(movable_thing)) continue - if(!movable_thing.ex_check(explosion_id)) - continue switch(severity) if(EXPLODE_DEVASTATE) SSexplosions.high_mov_atom += movable_thing diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm index ffdc5d6e618..e34c97cf12c 100644 --- a/code/modules/antagonists/revenant/revenant.dm +++ b/code/modules/antagonists/revenant/revenant.dm @@ -174,7 +174,7 @@ //Immunities /mob/living/simple_animal/revenant/ex_act(severity, target) - return 1 //Immune to the effects of explosions. + return FALSE //Immune to the effects of explosions. /mob/living/simple_animal/revenant/blob_act(obj/structure/blob/B) return //blah blah blobs aren't in tune with the spirit world, or something. diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm index 5c533447a7e..ac1e58c5596 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -249,11 +249,11 @@ /mob/living/simple_animal/hostile/imp/slaughter/laughter/ex_act(severity) switch(severity) - if(1) + if(EXPLODE_DEVASTATE) death() - if(2) + if(EXPLODE_HEAVY) adjustBruteLoss(60) - if(3) + if(EXPLODE_LIGHT) adjustBruteLoss(30) /mob/living/simple_animal/hostile/imp/slaughter/laughter/proc/release_friends() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index cfcf780b0f0..f4fb746422b 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -163,15 +163,17 @@ return ..() /obj/machinery/atmospherics/components/unary/cryo_cell/contents_explosion(severity, target) - ..() - if(beaker) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += beaker - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += beaker - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += beaker + . = ..() + if(!beaker) + return + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += beaker + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += beaker + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += beaker /obj/machinery/atmospherics/components/unary/cryo_cell/handle_atom_del(atom/A) ..() diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm index 071aea43888..a6b904efabc 100644 --- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm +++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm @@ -33,8 +33,9 @@ /obj/machinery/portable_atmospherics/ex_act(severity, target) if(resistance_flags & INDESTRUCTIBLE) - return //Indestructable cans shouldn't release air - if(severity == 1 || target == src) + return FALSE //Indestructable cans shouldn't release air + + if(severity == EXPLODE_DEVASTATE || target == src) //This explosion will destroy the can, release its air. var/turf/T = get_turf(src) T.assume_air(air_contents) diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 160a0fe01a4..02b4269931b 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -188,7 +188,7 @@ ..() /obj/structure/closet/supplypod/ex_act() //Explosions dont do SHIT TO US! This is because supplypods create explosions when they land. - return + return FALSE /obj/structure/closet/supplypod/contents_explosion() //Supplypods also protect their contents from the harmful effects of fucking exploding. return diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index b200711bf8e..f553ab0f74b 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -27,15 +27,17 @@ return ..() /obj/machinery/biogenerator/contents_explosion(severity, target) - ..() - if(beaker) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += beaker - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += beaker - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += beaker + . = ..() + if(!beaker) + return + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += beaker + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += beaker + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += beaker /obj/machinery/biogenerator/handle_atom_del(atom/A) ..() diff --git a/code/modules/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm index 60e3b88650f..84f2e14da98 100644 --- a/code/modules/lighting/lighting_object.dm +++ b/code/modules/lighting/lighting_object.dm @@ -131,7 +131,7 @@ // Variety of overrides so the overlays don't get affected by weird things. /atom/movable/lighting_object/ex_act(severity) - return + return FALSE /atom/movable/lighting_object/singularity_act() return diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 05eb945f1fd..2f0f4534693 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -347,7 +347,7 @@ /obj/machinery/mineral/ore_redemption/ex_act(severity, target) do_sparks(5, TRUE, src) - ..() + return ..() /obj/machinery/mineral/ore_redemption/update_icon_state() icon_state = "[initial(icon_state)][powered() ? null : "-off"]" diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 8859d7a2cdd..6c6270b88cb 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -200,7 +200,7 @@ /obj/machinery/mineral/equipment_vendor/ex_act(severity, target) do_sparks(5, TRUE, src) - if(prob(50 / severity) && severity < 3) + if(prob(50 / severity) && severity < EXPLODE_LIGHT) qdel(src) /****************Golem Point Vendor**************************/ diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index faacf5a4768..c3771b741c6 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -131,9 +131,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ qdel(src) /obj/item/stack/ore/glass/ex_act(severity, target) - if (severity == EXPLODE_NONE) - return - qdel(src) + if(severity != EXPLODE_NONE) + qdel(src) /obj/item/stack/ore/glass/basalt name = "volcanic ash" @@ -335,9 +334,8 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ pixel_y = base_pixel_y + rand(0, 8) - 8 /obj/item/stack/ore/ex_act(severity, target) - if (!severity || severity >= 2) - return - qdel(src) + if(severity == EXPLODE_DEVASTATE) + qdel(src) /*****************************Coin********************************/ diff --git a/code/modules/mob/living/brain/brain.dm b/code/modules/mob/living/brain/brain.dm index 1b26beb385e..7396d0fb45d 100644 --- a/code/modules/mob/living/brain/brain.dm +++ b/code/modules/mob/living/brain/brain.dm @@ -38,7 +38,7 @@ /mob/living/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up. - return + return FALSE /mob/living/brain/blob_act(obj/structure/blob/B) return diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm index 0caf502b23e..b0984f13b37 100644 --- a/code/modules/mob/living/carbon/alien/alien_defense.dm +++ b/code/modules/mob/living/carbon/alien/alien_defense.dm @@ -102,10 +102,12 @@ In all, this is a lot like the monkey code. /N /mob/living/carbon/alien/ex_act(severity, target, origin) if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src)) - return - ..() + return FALSE + + . = ..() if(QDELETED(src)) return + var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS) switch (severity) if (EXPLODE_DEVASTATE) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 58b832a06e1..20c2fd0524b 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -378,8 +378,9 @@ /mob/living/carbon/human/ex_act(severity, target, origin) if(TRAIT_BOMBIMMUNE in dna.species.species_traits) - return - ..() + return FALSE + + . = ..() if (!severity || QDELETED(src)) return var/brute_loss = 0 @@ -433,7 +434,7 @@ take_overall_damage(brute_loss,burn_loss) //attempt to dismember bodyparts - if(severity <= 2 || !bomb_armor) + if(severity <= EXPLODE_HEAVY || !bomb_armor) var/max_limb_loss = round(4/severity) //so you don't lose four limbs at severity 3. for(var/X in bodyparts) var/obj/item/bodypart/BP = X diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 5559eab7320..e655901eee5 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -326,8 +326,8 @@ /mob/living/ex_act(severity, target, origin) if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src)) - return - ..() + return FALSE + return ..() //Looking for irradiate()? It's been moved to radiation.dm under the rad_act() for mobs. diff --git a/code/modules/mob/living/silicon/ai/ai_defense.dm b/code/modules/mob/living/silicon/ai/ai_defense.dm index 0ce126d945a..9e87703c877 100644 --- a/code/modules/mob/living/silicon/ai/ai_defense.dm +++ b/code/modules/mob/living/silicon/ai/ai_defense.dm @@ -41,13 +41,13 @@ /mob/living/silicon/ai/ex_act(severity, target) switch(severity) - if(1) + if(EXPLODE_DEVASTATE) gib() - if(2) + if(EXPLODE_HEAVY) if (stat != DEAD) adjustBruteLoss(60) adjustFireLoss(60) - if(3) + if(EXPLODE_LIGHT) if (stat != DEAD) adjustBruteLoss(30) diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm index 066ab897af6..92bf7ea215a 100644 --- a/code/modules/mob/living/silicon/pai/pai_defense.dm +++ b/code/modules/mob/living/silicon/pai/pai_defense.dm @@ -30,13 +30,13 @@ /mob/living/silicon/pai/ex_act(severity, target) take_holo_damage(severity * 50) switch(severity) - if(1) //RIP + if(EXPLODE_DEVASTATE) //RIP qdel(card) qdel(src) - if(2) + if(EXPLODE_HEAVY) fold_in(force = 1) Paralyze(400) - if(3) + if(EXPLODE_LIGHT) fold_in(force = 1) Paralyze(200) diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 3e13c423cc4..ea7713f225b 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -393,14 +393,14 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real /mob/living/silicon/robot/ex_act(severity, target) switch(severity) - if(1) + if(EXPLODE_DEVASTATE) gib() return - if(2) + if(EXPLODE_HEAVY) if (stat != DEAD) adjustBruteLoss(60) adjustFireLoss(60) - if(3) + if(EXPLODE_LIGHT) if (stat != DEAD) adjustBruteLoss(30) diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index c4872482ba3..d48157937f0 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -142,8 +142,9 @@ /mob/living/simple_animal/ex_act(severity, target, origin) if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src)) - return - ..() + return FALSE + + . = ..() if(QDELETED(src)) return var/bomb_armor = getarmor(null, BOMB) @@ -160,7 +161,7 @@ bloss = bloss / 1.5 adjustBruteLoss(bloss) - if(EXPLODE_LIGHT) + if (EXPLODE_LIGHT) var/bloss = 30 if(prob(bomb_armor)) bloss = bloss / 1.5 diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 6fe9c0a987c..cfe44d151fd 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -213,12 +213,12 @@ /mob/living/simple_animal/bot/mulebot/ex_act(severity) unload(0) switch(severity) - if(1) + if(EXPLODE_DEVASTATE) qdel(src) - if(2) - for(var/i = 1; i < 3; i++) - wires.cut_random() - if(3) + if(EXPLODE_HEAVY) + wires.cut_random() + wires.cut_random() + if(EXPLODE_LIGHT) wires.cut_random() diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 15c0dc2bf1f..609232c8d42 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -270,12 +270,12 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians /mob/living/simple_animal/hostile/guardian/ex_act(severity, target) switch(severity) - if(1) + if(EXPLODE_DEVASTATE) gib() - return - if(2) + return TRUE + if(EXPLODE_HEAVY) adjustBruteLoss(60) - if(3) + if(EXPLODE_LIGHT) adjustBruteLoss(30) /mob/living/simple_animal/hostile/guardian/gib() diff --git a/code/modules/mob/living/simple_animal/guardian/types/protector.dm b/code/modules/mob/living/simple_animal/guardian/types/protector.dm index 22252c5ed52..2eeb8573343 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/protector.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/protector.dm @@ -13,12 +13,12 @@ var/toggle = FALSE /mob/living/simple_animal/hostile/guardian/protector/ex_act(severity) - if(severity == 1) + if(severity == EXPLODE_DEVASTATE) adjustBruteLoss(400) //if in protector mode, will do 20 damage and not actually necessarily kill the summoner else - ..() + . = ..() if(QDELETED(src)) - return + return FALSE if(toggle) visible_message("The explosion glances off [src]'s energy shielding!") diff --git a/code/modules/mob/living/simple_animal/hostile/cockroach.dm b/code/modules/mob/living/simple_animal/hostile/cockroach.dm index 66b3f64d74c..9c362d4c0ba 100644 --- a/code/modules/mob/living/simple_animal/hostile/cockroach.dm +++ b/code/modules/mob/living/simple_animal/hostile/cockroach.dm @@ -74,7 +74,7 @@ ..() /mob/living/simple_animal/hostile/cockroach/ex_act() //Explosions are a terrible way to handle a cockroach. - return + return FALSE /mob/living/simple_animal/hostile/cockroach/hauberoach name = "hauberoach" diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 5b414d364d5..9f0422e27fb 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -140,7 +140,7 @@ Difficulty: Medium /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/ex_act(severity, target) if(dash()) - return + return FALSE return ..() /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/MeleeAction(patience = TRUE) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 0542edef734..91699a3367d 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -439,7 +439,8 @@ Difficulty: Hard /mob/living/simple_animal/hostile/megafauna/bubblegum/ex_act(severity, target) if(severity >= EXPLODE_LIGHT) - return + return FALSE + severity = EXPLODE_LIGHT // puny mortals return ..() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm index 6caae679cf7..9d8245545ac 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm @@ -151,7 +151,7 @@ Difficulty: Extremely Hard target.ex_act(EXPLODE_HEAVY) /mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/ex_act(severity, target) - adjustBruteLoss(30 * severity - 120) + adjustBruteLoss((30 * severity) - 120) visible_message("[src] absorbs the explosion!", "You absorb the explosion!") /mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/Goto(target, delay, minimum_distance) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 9e74381fdfc..7d6fd7939ae 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -402,8 +402,8 @@ /mob/living/simple_animal/hostile/megafauna/dragon/ex_act(severity, target) if(severity == EXPLODE_LIGHT) - return - ..() + return FALSE + return ..() /mob/living/simple_animal/hostile/megafauna/dragon/adjustHealth(amount, updating_health = TRUE, forced = FALSE) if(!forced && (swooping & SWOOP_INVULNERABLE)) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm index ea0cc8e3c34..9568393bd60 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm @@ -62,11 +62,11 @@ /mob/living/simple_animal/hostile/asteroid/basilisk/ex_act(severity, target) switch(severity) - if(1) + if(EXPLODE_DEVASTATE) gib() - if(2) + if(EXPLODE_HEAVY) adjustBruteLoss(140) - if(3) + if(EXPLODE_LIGHT) adjustBruteLoss(110) /mob/living/simple_animal/hostile/asteroid/basilisk/AttackingTarget() diff --git a/code/modules/modular_computers/computers/machinery/modular_computer.dm b/code/modules/modular_computers/computers/machinery/modular_computer.dm index 2293e317bed..4031126d2f1 100644 --- a/code/modules/modular_computers/computers/machinery/modular_computer.dm +++ b/code/modules/modular_computers/computers/machinery/modular_computer.dm @@ -128,15 +128,17 @@ // Stronger explosions cause serious damage to internal components // Minor explosions are mostly mitigitated by casing. /obj/machinery/modular_computer/ex_act(severity) - if(cpu) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += cpu - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += cpu - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += cpu - ..() + if(!cpu) + return ..() + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += cpu + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += cpu + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += cpu + return ..() // EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components /obj/machinery/modular_computer/emp_act(severity) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 252343ecd74..ad6155093dc 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -136,15 +136,17 @@ charge = 0 /obj/item/stock_parts/cell/ex_act(severity, target) - ..() - if(!QDELETED(src)) - switch(severity) - if(2) - if(prob(50)) - corrupt() - if(3) - if(prob(25)) - corrupt() + . = ..() + if(QDELETED(src)) + return + + switch(severity) + if(EXPLODE_HEAVY) + if(prob(50)) + corrupt() + if(EXPLODE_LIGHT) + if(prob(25)) + corrupt() /obj/item/stock_parts/cell/attack_self(mob/user) if(isethereal(user)) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index b2d055840c7..e4b38cf7828 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -38,7 +38,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne return FALSE /obj/machinery/gravity_generator/ex_act(severity, target) - if(severity == 1) // Very sturdy. + if(severity == EXPLODE_DEVASTATE) // Very sturdy. set_broken() /obj/machinery/gravity_generator/blob_act(obj/structure/blob/B) diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index b660b613298..4b66c3cda46 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -121,17 +121,17 @@ /obj/singularity/ex_act(severity, target) switch(severity) - if(1) + if(EXPLODE_DEVASTATE) if(current_size <= STAGE_TWO) investigate_log("has been destroyed by a heavy explosion.", INVESTIGATE_SINGULO) qdel(src) return - else - energy -= round(((energy+1)/2),1) - if(2) - energy -= round(((energy+1)/3),1) - if(3) - energy -= round(((energy+1)/4),1) + + energy -= round(((energy + 1) / 2), 1) + if(EXPLODE_HEAVY) + energy -= round(((energy + 1) / 3), 1) + if(EXPLODE_LIGHT) + energy -= round(((energy + 1) / 4), 1) /obj/singularity/process(delta_time) if(current_size >= STAGE_TWO) diff --git a/code/modules/projectiles/guns/misc/blastcannon.dm b/code/modules/projectiles/guns/misc/blastcannon.dm index 673d793b812..51739ea171c 100644 --- a/code/modules/projectiles/guns/misc/blastcannon.dm +++ b/code/modules/projectiles/guns/misc/blastcannon.dm @@ -171,4 +171,4 @@ return /obj/projectile/blastwave/ex_act() - return + return FALSE diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 70af7d42cce..52effbdad48 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -162,19 +162,22 @@ obj_flags |= EMAGGED /obj/machinery/chem_dispenser/ex_act(severity, target) - if(severity < 3) - ..() + if(severity >= EXPLODE_LIGHT) // Note that the explosion defines are inverted. Stronger explosions have smaller numbers. + return FALSE + return ..() /obj/machinery/chem_dispenser/contents_explosion(severity, target) ..() - if(beaker) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += beaker - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += beaker - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += beaker + if(!beaker) + return + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += beaker + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += beaker + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += beaker /obj/machinery/chem_dispenser/handle_atom_del(atom/A) ..() diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index c76b133881b..b3bf6e8672c 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -65,26 +65,27 @@ reagents.maximum_volume += B.reagents.maximum_volume /obj/machinery/chem_master/ex_act(severity, target) - if(severity < 3) - ..() + if(severity >= EXPLODE_LIGHT) // This actually makes the dispenser immune to explosions at least as weak as [EXPLODE_LIGHT]. Don't ask me why the defines are inverted. I don't know. + return FALSE + return ..() /obj/machinery/chem_master/contents_explosion(severity, target) - ..() - if(beaker) - switch(severity) - if(EXPLODE_DEVASTATE) + . = ..() + switch(severity) + if(EXPLODE_DEVASTATE) + if(beaker) SSexplosions.high_mov_atom += beaker - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += beaker - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += beaker - if(bottle) - switch(severity) - if(EXPLODE_DEVASTATE) + if(bottle) SSexplosions.high_mov_atom += bottle - if(EXPLODE_HEAVY) + if(EXPLODE_HEAVY) + if(beaker) + SSexplosions.med_mov_atom += beaker + if(bottle) SSexplosions.med_mov_atom += bottle - if(EXPLODE_LIGHT) + if(EXPLODE_LIGHT) + if(beaker) + SSexplosions.low_mov_atom += beaker + if(bottle) SSexplosions.low_mov_atom += bottle /obj/machinery/chem_master/handle_atom_del(atom/A) diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 7ac7e8dd3fb..ce26ea5e985 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -52,14 +52,16 @@ return ..() /obj/machinery/reagentgrinder/contents_explosion(severity, target) - if(beaker) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += beaker - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += beaker - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += beaker + if(!beaker) + return + + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += beaker + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += beaker + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += beaker /obj/machinery/reagentgrinder/RefreshParts() speed = 1 diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 3469e28122c..ce3c845961c 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -134,7 +134,7 @@ for(var/datum/reagent/R in reagents.reagent_list) R.on_ex_act() if(!QDELETED(src)) - ..() + return ..() /obj/item/reagent_containers/fire_act(exposed_temperature, exposed_volume) reagents.expose_temperature(exposed_temperature) diff --git a/code/modules/recycling/disposal/holder.dm b/code/modules/recycling/disposal/holder.dm index 87d29e5e11c..1d80af38590 100644 --- a/code/modules/recycling/disposal/holder.dm +++ b/code/modules/recycling/disposal/holder.dm @@ -144,4 +144,4 @@ return TRUE /obj/structure/disposalholder/ex_act(severity, target) - return + return FALSE diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm index ea212bed07e..0dcbdba858a 100644 --- a/code/modules/recycling/disposal/pipe.dm +++ b/code/modules/recycling/disposal/pipe.dm @@ -119,8 +119,7 @@ // pipe affected by explosion /obj/structure/disposalpipe/contents_explosion(severity, target) var/obj/structure/disposalholder/H = locate() in src - if(H) - H.contents_explosion(severity, target) + H?.contents_explosion(severity, target) //welding tool: unfasten and convert to obj/disposalconstruct diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 6420c061d16..09e99cea0ce 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -26,14 +26,13 @@ return ..() /obj/structure/big_delivery/contents_explosion(severity, target) - for(var/thing in contents) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += thing - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += thing - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += thing + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += contents + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += contents + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += contents /obj/structure/big_delivery/examine(mob/user) . = ..() @@ -177,14 +176,13 @@ var/obj/item/barcode/sticker /obj/item/small_delivery/contents_explosion(severity, target) - for(var/thing in contents) - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += thing - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += thing - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += thing + switch(severity) + if(EXPLODE_DEVASTATE) + SSexplosions.high_mov_atom += contents + if(EXPLODE_HEAVY) + SSexplosions.med_mov_atom += contents + if(EXPLODE_LIGHT) + SSexplosions.low_mov_atom += contents /obj/item/small_delivery/attack_self(mob/user) to_chat(user, "You start to unwrap the package...") diff --git a/code/modules/research/xenobiology/crossbreeding/burning.dm b/code/modules/research/xenobiology/crossbreeding/burning.dm index 9ac0e1d67d8..1152e6606e5 100644 --- a/code/modules/research/xenobiology/crossbreeding/burning.dm +++ b/code/modules/research/xenobiology/crossbreeding/burning.dm @@ -262,12 +262,13 @@ Burning extracts: user.visible_message("[user] activates [src]. It's going to explode!", "You activate [src]. It crackles in anticipation") addtimer(CALLBACK(src, .proc/boom), 50) +/// Inflicts a blastwave upon every mob within a small radius. /obj/item/slimecross/burning/oil/proc/boom() var/turf/T = get_turf(src) playsound(T, 'sound/effects/explosion2.ogg', 200, TRUE) - for(var/mob/living/M in range(2, T)) - new /obj/effect/temp_visual/explosion(get_turf(M)) - M.ex_act(EXPLODE_HEAVY) + for(var/mob/living/target in range(2, T)) + new /obj/effect/temp_visual/explosion(get_turf(target)) + SSexplosions.med_mov_atom += target qdel(src) /obj/item/slimecross/burning/black diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index 0ff61ce7a6e..f77bf76a3f1 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -44,7 +44,7 @@ return /obj/machinery/power/emitter/energycannon/magical/ex_act(severity) - return + return FALSE /obj/machinery/power/emitter/energycannon/magical/emag_act(mob/user) return diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index bb1b559a875..96d7b4568f7 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -227,7 +227,7 @@ var/obj/machinery/parent /obj/structure/filler/ex_act() - return + return FALSE /obj/machinery/computer/bsa_control name = "bluespace artillery control" diff --git a/code/modules/vehicles/mecha/mecha_defense.dm b/code/modules/vehicles/mecha/mecha_defense.dm index 24c7490fd9b..193aa8164e8 100644 --- a/code/modules/vehicles/mecha/mecha_defense.dm +++ b/code/modules/vehicles/mecha/mecha_defense.dm @@ -122,31 +122,33 @@ if(prob(deflect_chance)) severity++ log_message("Armor saved, changing severity to [severity]", LOG_MECHA) - . = ..() + return ..() /obj/vehicle/sealed/mecha/contents_explosion(severity, target) severity++ - for(var/X in equipment) - var/obj/item/mecha_parts/mecha_equipment/ME = X - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += ME - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += ME - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += ME - for(var/Y in trackers) - var/obj/item/mecha_parts/mecha_tracking/MT = Y - switch(severity) - if(EXPLODE_DEVASTATE) - SSexplosions.high_mov_atom += MT - if(EXPLODE_HEAVY) - SSexplosions.med_mov_atom += MT - if(EXPLODE_LIGHT) - SSexplosions.low_mov_atom += MT - for(var/Z in occupants) - var/mob/living/occupant = Z - occupant.ex_act(severity,target) + + switch(severity) + if(EXPLODE_DEVASTATE) + if(equipment) + SSexplosions.high_mov_atom += equipment + if(trackers) + SSexplosions.high_mov_atom += trackers + if(occupants) + SSexplosions.high_mov_atom += occupants + if(EXPLODE_HEAVY) + if(equipment) + SSexplosions.med_mov_atom += equipment + if(trackers) + SSexplosions.med_mov_atom += trackers + if(occupants) + SSexplosions.med_mov_atom += occupants + if(EXPLODE_LIGHT) + if(equipment) + SSexplosions.low_mov_atom += equipment + if(trackers) + SSexplosions.low_mov_atom += trackers + if(occupants) + SSexplosions.low_mov_atom += occupants /obj/vehicle/sealed/mecha/handle_atom_del(atom/A) if(A in occupants)