diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index e8896283018..57f88c9f23f 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -14,7 +14,7 @@ GLOBAL_VAR(bomb_set)
/obj/machinery/nuclearbomb
name = "\improper Nuclear Fission Explosive"
desc = "Uh oh. RUN!!!!"
- icon = 'icons/obj/stationobjs.dmi'
+ icon = 'icons/obj/nuclearbomb.dmi'
icon_state = "nuclearbomb0"
density = TRUE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
@@ -23,13 +23,21 @@ GLOBAL_VAR(bomb_set)
power_state = NO_POWER_USE
requires_power = FALSE
+ /// Are our bolts *supposed* to be in the floor, may not actually cause anchoring if the bolts are cut
var/extended = TRUE
+ /// If true, prevents the lights on the nuke
var/lighthack = FALSE
+ /// Countdown to boom
var/timeleft = 120
+ /// Are we counting down?
var/timing = FALSE
+ /// Have we gone boom yet?
var/exploded = FALSE
+ /// Random code between 10000 and 99999
var/r_code = "ADMIN"
+ /// Code entered by user
var/code
+ /// Is the most recently inputted code correct?
var/yes_code = FALSE
var/safety = TRUE
var/obj/item/disk/nuclear/auth = null
@@ -65,6 +73,7 @@ GLOBAL_VAR(bomb_set)
GLOB.poi_list |= src
core = new /obj/item/nuke_core/plutonium(src)
STOP_PROCESSING(SSobj, core) //Let us not irradiate the vault by default.
+ update_icon(UPDATE_OVERLAYS)
/obj/machinery/nuclearbomb/Destroy()
SStgui.close_uis(wires)
@@ -115,7 +124,22 @@ GLOBAL_VAR(bomb_set)
set_light(1, LIGHTING_MINIMUM_POWER)
if(panel_open)
- . += "npanel_open"
+ . += "hackpanel_open"
+
+ if(anchored) // Using anchored due to removal_stage deanchoring having multiple steps
+ . += "nukebolts"
+
+ // Selected stage lets us show the open core, even if the front panel is closed
+ var/selected_stage = removal_stage
+ if(removal_stage < NUKE_CORE_EVERYTHING_FINE) // Because we need to show the core
+ selected_stage = core_stage
+ switch(selected_stage)
+ if(NUKE_CORE_PANEL_EXPOSED)
+ . += "nukecore1"
+ if(NUKE_CORE_PANEL_UNWELDED)
+ . += "nukecore2"
+ if(NUKE_CORE_FULLY_EXPOSED)
+ . += core ? "nukecore3" : "nukecore4"
/obj/machinery/nuclearbomb/attackby(obj/item/O as obj, mob/user as mob, params)
if(istype(O, /obj/item/disk/nuclear))
@@ -144,6 +168,7 @@ GLOBAL_VAR(bomb_set)
removal_stage = NUKE_CORE_PANEL_UNWELDED
if(core)
STOP_PROCESSING(SSobj, core)
+ update_icon(UPDATE_OVERLAYS)
return
if(istype(O, /obj/item/stack/sheet/metal) && removal_stage == NUKE_CORE_PANEL_EXPOSED)
var/obj/item/stack/S = O
@@ -157,6 +182,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] repairs [src]'s outer core plate.", \
"You repair [src]'s outer core plate.")
removal_stage = NUKE_CORE_EVERYTHING_FINE
+ update_icon(UPDATE_OVERLAYS)
return
if(istype(O, /obj/item/nuke_core/plutonium) && removal_stage == NUKE_CORE_FULLY_EXPOSED)
if(do_after(user, 2 SECONDS, target = src))
@@ -208,6 +234,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] crowbars [src] off of the anchors. It can now be moved.", "You jam the crowbar under the nuclear device and lift it off its anchors. You can now move it!")
anchored = FALSE
removal_stage = NUKE_MOBILE
+ update_icon(UPDATE_OVERLAYS)
/obj/machinery/nuclearbomb/wrench_act(mob/user, obj/item/I)
if(!anchored)
@@ -222,6 +249,7 @@ GLOBAL_VAR(bomb_set)
return
user.visible_message("[user] unwrenches the anchoring bolts on [src].", "You unwrench the anchoring bolts.")
removal_stage = NUKE_UNWRENCHED
+ update_icon(UPDATE_OVERLAYS)
/obj/machinery/nuclearbomb/multitool_act(mob/user, obj/item/I)
if(!panel_open)
@@ -303,6 +331,7 @@ GLOBAL_VAR(bomb_set)
visible_message("[user] cuts apart the anchoring system sealant on [src].",\
"You cut apart the anchoring system's sealant.")
removal_stage = NUKE_SEALANT_OPEN
+ update_icon(UPDATE_OVERLAYS)
/obj/machinery/nuclearbomb/attack_ghost(mob/user as mob)
attack_hand(user)
@@ -320,6 +349,7 @@ GLOBAL_VAR(bomb_set)
user.visible_message("[user] pulls [core] out of [src]!", "You pull [core] out of [src]! Might want to put it somewhere safe.")
core.forceMove(loc)
core = null
+ update_icon(UPDATE_OVERLAYS)
/obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.physical_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -374,7 +404,7 @@ GLOBAL_VAR(bomb_set)
if(!lighthack)
flick("nuclearbombc", src)
icon_state = "nuclearbomb1"
- update_icon(UPDATE_OVERLAYS)
+ update_icon(UPDATE_OVERLAYS)
extended = TRUE
return
if("auth")
@@ -413,6 +443,7 @@ GLOBAL_VAR(bomb_set)
if("toggle_anchor")
if(removal_stage == NUKE_MOBILE)
anchored = FALSE
+ update_icon(UPDATE_OVERLAYS)
visible_message("[src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
return
@@ -425,6 +456,7 @@ GLOBAL_VAR(bomb_set)
return
anchored = !(anchored)
+ update_icon(UPDATE_OVERLAYS)
if(anchored)
visible_message("With a steely snap, bolts slide out of [src] and anchor it to the flooring.")
return
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index 3425e0b6f49..bc1c5124902 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -274,7 +274,7 @@
desc = "One of the more successful achievements of the Nanotrasen Corporate Warfare Division, their nuclear fission explosives are renowned for being cheap\
to produce and devestatingly effective. Signs explain that though this is just a model, every Nanotrasen station is equipped with one, just in case. \
All Captains carefully guard the disk needed to detonate them - at least, the sign says they do. There seems to be a tap on the back."
- icon = 'icons/obj/stationobjs.dmi'
+ icon = 'icons/obj/nuclearbomb.dmi'
icon_state = "nuclearbomb0"
anchored = TRUE
diff --git a/icons/mob/blob.dmi b/icons/mob/blob.dmi
index ecb9ff43d62..a0059a69de7 100644
Binary files a/icons/mob/blob.dmi and b/icons/mob/blob.dmi differ
diff --git a/icons/obj/nuclearbomb.dmi b/icons/obj/nuclearbomb.dmi
new file mode 100644
index 00000000000..bb86ae4a618
Binary files /dev/null and b/icons/obj/nuclearbomb.dmi differ