From 1a7341f2c432e7156f0761c55972adeffe638511 Mon Sep 17 00:00:00 2001 From: BordListian Date: Tue, 16 Jan 2018 15:35:58 +0100 Subject: [PATCH 1/2] Stray bullets and explosions don't blow up the entire syndi lava base anymore (#34401) * - Changes explosions to save a reference to the epicenter atom - Changes syndicate bomb cores to have themselves as the epicenter, removing a redundant get_turf call - Changes explosive plastitanium walls to only be triggered by bomb core explosions. This is a tad cumbersome but there's only 12 of these walls in the game. * - Removes debug code * - Can't hurt --- code/datums/explosion.dm | 3 +++ code/game/machinery/syndicatebomb.dm | 2 +- code/game/turfs/simulated/wall/mineral_walls.dm | 13 +++++++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index 0616d0e4c6..8c7d957b34 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -14,6 +14,7 @@ GLOBAL_LIST_EMPTY(explosions) /datum/explosion var/explosion_id + var/atom/explosion_source var/started_at var/running = TRUE var/stopped = 0 //This is the number of threads stopped !DOESN'T COUNT THREAD 2! @@ -37,6 +38,7 @@ GLOBAL_LIST_EMPTY(explosions) var/id = ++id_counter explosion_id = id + explosion_source = epicenter epicenter = get_turf(epicenter) if(!epicenter) @@ -323,6 +325,7 @@ GLOBAL_LIST_EMPTY(explosions) if(stopped < 2) //wait for main thread and spiral_range thread return QDEL_HINT_IWILLGC GLOB.explosions -= src + explosion_source = null return ..() /client/proc/check_bomb_impacts() diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 528faba57f..872c83decd 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -293,7 +293,7 @@ if(adminlog) message_admins(adminlog) log_game(adminlog) - explosion(get_turf(src), range_heavy, range_medium, range_light, flame_range = range_flame) + explosion(src, range_heavy, range_medium, range_light, flame_range = range_flame) if(loc && istype(loc, /obj/machinery/syndicatebomb/)) qdel(loc) qdel(src) diff --git a/code/game/turfs/simulated/wall/mineral_walls.dm b/code/game/turfs/simulated/wall/mineral_walls.dm index e8975c41aa..b49d8c966e 100644 --- a/code/game/turfs/simulated/wall/mineral_walls.dm +++ b/code/game/turfs/simulated/wall/mineral_walls.dm @@ -250,10 +250,15 @@ /turf/closed/wall/mineral/plastitanium/overspace icon_state = "map-overspace" fixed_underlay = list("space"=1) - -/turf/closed/wall/mineral/plastitanium/explosive/dismantle_wall(devastated, explode) - var/obj/item/bombcore/large/bombcore = new(get_turf(src)) - if(devastated || explode) + +/turf/closed/wall/mineral/plastitanium/explosive/ex_act(severity) + var/datum/explosion/acted_explosion = null + for(var/datum/explosion/E in GLOB.explosions) + if(E.explosion_id == explosion_id) + acted_explosion = E + break + if(acted_explosion && istype(acted_explosion.explosion_source, /obj/item/bombcore)) + var/obj/item/bombcore/large/bombcore = new(get_turf(src)) bombcore.detonate() ..()