From 20dd49a28413f7bfe569d1f8a8df04422581965c Mon Sep 17 00:00:00 2001 From: Ryal Date: Tue, 6 Apr 2021 05:59:37 -0700 Subject: [PATCH] Deploys the nuke by default (#15793) * Deploys the nuke by default * Update code/game/gamemodes/nuclear/nuclearbomb.dm Co-authored-by: dearmochi Co-authored-by: dearmochi --- code/game/gamemodes/nuclear/nuclearbomb.dm | 17 +++++++++++------ tgui/packages/tgui/interfaces/NuclearBomb.js | 2 +- tgui/packages/tgui/public/tgui.bundle.js | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index a1f214fa4a1..fa0ba2fbf0f 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -14,7 +14,8 @@ GLOBAL_VAR(bomb_set) icon_state = "nuclearbomb0" density = 1 resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF - var/extended = FALSE + anchored = TRUE + var/extended = TRUE var/lighthack = FALSE var/timeleft = 120 var/timing = FALSE @@ -34,6 +35,10 @@ GLOBAL_VAR(bomb_set) /obj/machinery/nuclearbomb/syndicate is_syndicate = TRUE +/obj/machinery/nuclearbomb/undeployed + extended = FALSE + anchored = FALSE + /obj/machinery/nuclearbomb/New() ..() r_code = rand(10000, 99999.0) // Creates a random code upon object spawn. @@ -269,11 +274,6 @@ GLOBAL_VAR(bomb_set) else code = "ERROR" return - - if(!yes_code) // All requests below here require both NAD inserted AND code correct - return - - switch(action) if("toggle_anchor") if(removal_stage == NUKE_MOBILE) anchored = FALSE @@ -288,6 +288,11 @@ GLOBAL_VAR(bomb_set) else visible_message("The anchoring bolts slide back into the depths of [src].") return + + if(!yes_code) // All requests below here require both NAD inserted AND code correct + return + + switch(action) if("set_time") var/time = input(usr, "Detonation time (seconds, min 120, max 600)", "Input Time", 120) as num|null if(time) diff --git a/tgui/packages/tgui/interfaces/NuclearBomb.js b/tgui/packages/tgui/interfaces/NuclearBomb.js index e3d7b1cc949..209fad1cbf3 100644 --- a/tgui/packages/tgui/interfaces/NuclearBomb.js +++ b/tgui/packages/tgui/interfaces/NuclearBomb.js @@ -49,7 +49,7 @@ export const NuclearBomb = (props, context) => {