From 82c6595926e90f0a941dfd759afd9ea29c872d09 Mon Sep 17 00:00:00 2001 From: denghis1 <63977635+denghis1@users.noreply.github.com> Date: Fri, 3 Jul 2020 19:30:04 +0200 Subject: [PATCH 1/2] fixes syndicate bomb not triggering defuse properly Moves active = false from wires\syndicatebomb\UpdateCut() to machinery\syndicatebomb\process() removes a redundant check for if the bomb is not active in machinery\syndicatebomb\process() This fixes the bomb not triggering payload.defuse() in process(), and thus makes the training bomb actually work again --- code/datums/wires/syndicatebomb.dm | 1 - code/game/machinery/syndicatebomb.dm | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/wires/syndicatebomb.dm b/code/datums/wires/syndicatebomb.dm index b490d150efe..430b5ce88aa 100644 --- a/code/datums/wires/syndicatebomb.dm +++ b/code/datums/wires/syndicatebomb.dm @@ -96,7 +96,6 @@ if(BOMB_WIRE_ACTIVATE) if(!mended && B.active) holder.visible_message("[bicon(B)] The timer stops! The bomb has been defused!") - B.active = FALSE B.defused = TRUE B.update_icon() ..() diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 2d15472f521..84e5e159981 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -77,7 +77,8 @@ update_icon() try_detonate(TRUE) //Counter terrorists win - else if(!active || defused) + else if(defused) + active = FALSE if(defused && (payload in src)) payload.defuse() countdown.stop() From 7c976a7c98c499bc817198e253806f461bc6980a Mon Sep 17 00:00:00 2001 From: denghis1 <63977635+denghis1@users.noreply.github.com> Date: Fri, 3 Jul 2020 20:34:11 +0200 Subject: [PATCH 2/2] cleans up the defused part of process() a little Removes countdown.stop and stop_processing from the else if (defused) part, since this will be run on next tick of process() no need to run this twice. Also removes the defused part of if(defused && (payload in src)) since we already check for defused above --- code/game/machinery/syndicatebomb.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 84e5e159981..181d5e494da 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -79,10 +79,8 @@ //Counter terrorists win else if(defused) active = FALSE - if(defused && (payload in src)) + if(payload in src) payload.defuse() - countdown.stop() - STOP_PROCESSING(SSfastprocess, src) /obj/machinery/syndicatebomb/New() wires = new(src)