From d9d97b6cc654371bc378d58864595dfdd4c98641 Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Mon, 13 Jul 2020 11:26:17 +0100 Subject: [PATCH] More Tcomms Fixes --- .../RandomRuins/SpaceRuins/blowntcommsat.dmm | 12 ++---------- code/game/machinery/tcomms/core.dm | 5 ++++- code/game/machinery/tcomms/relay.dm | 10 ++++++++++ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm b/_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm index 768bb5b30a5..de2ab18f8ab 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/blowntcommsat.dmm @@ -411,17 +411,9 @@ /obj/structure/chair, /turf/simulated/floor/plating/airless, /area/ruin/tcommsat) -"bu" = ( -/obj/machinery/door/airlock/maintenance_hatch, -/turf/simulated/floor/plating/airless{ - icon_state = "dark" - }, -/area/ruin/tcommsat) "bv" = ( /obj/machinery/door/airlock/hatch, -/turf/simulated/floor/plating/airless{ - icon_state = "dark" - }, +/turf/simulated/floor/plating/airless, /area/ruin/tcommsat) "bw" = ( /obj/structure/window/reinforced{ @@ -2709,7 +2701,7 @@ aD aC aC ai -bu +bC ai ak ak diff --git a/code/game/machinery/tcomms/core.dm b/code/game/machinery/tcomms/core.dm index f1599edd8b8..88846a5de33 100644 --- a/code/game/machinery/tcomms/core.dm +++ b/code/game/machinery/tcomms/core.dm @@ -57,6 +57,9 @@ * * zlevel - The input z level to test */ /obj/machinery/tcomms/core/proc/zlevel_reachable(zlevel) + // Nothing is reachable if the core is offline, unpowered, or ion'd + if(!active || (stat & NOPOWER) || ion) + return FALSE if(zlevel in reachable_zlevels) return TRUE else @@ -113,7 +116,7 @@ // Add all the linked relays in for(var/obj/machinery/tcomms/relay/R in linked_relays) // Only if the relay is active - if(R.active) + if(R.active && !(R.stat & NOPOWER)) reachable_zlevels |= R.loc.z diff --git a/code/game/machinery/tcomms/relay.dm b/code/game/machinery/tcomms/relay.dm index 9309a6109da..2cd2a44b1af 100644 --- a/code/game/machinery/tcomms/relay.dm +++ b/code/game/machinery/tcomms/relay.dm @@ -76,6 +76,16 @@ linked_core = null linked = FALSE +/** + * Power Change Handler + * + * Proc which ensures the host core has its zlevels updated (icons are updated by parent call) + */ +/obj/machinery/tcomms/relay/power_change() + ..() + if(linked_core) + linked_core.refresh_zlevels() + ////////////// // UI STUFF // //////////////