Adds detailed examine to the nuclear fission explosive (#20534)

* Adds detailed examine to the nuclear bomb

* Adds missing screwdriver action to examine

* Better examine logic

* Removes outdated comment
This commit is contained in:
Adri
2023-03-13 22:30:00 +00:00
committed by GitHub
parent 74cbfc57a3
commit 82651eec28
+41 -8
View File
@@ -45,7 +45,8 @@ GLOBAL_VAR(bomb_set)
var/anchor_stage = NUKE_INTACT
///This is so that we can check if the internal components are sealed up properly when the outer hatch is closed.
var/core_stage = NUKE_CORE_EVERYTHING_FINE
///How many sheets of various metals we need to fix it
var/sheets_to_fix = 5
/obj/machinery/nuclearbomb/syndicate
is_syndicate = TRUE
@@ -79,6 +80,30 @@ GLOBAL_VAR(bomb_set)
INVOKE_ASYNC(src, PROC_REF(explode))
return
/obj/machinery/nuclearbomb/examine(mob/user)
. = ..()
if(!panel_open)
. += "<span class='notice'>The outer panel is <b>screwed shut</b>.</span>"
switch(removal_stage)
if(NUKE_INTACT)
. += "<span class='notice'>The anchoring bolt covers are <b>welded shut</b>.</span>"
if(NUKE_COVER_OFF)
. += "<span class='notice'>The cover plate is <b>pried into</b> place.</span>"
if(NUKE_COVER_OPEN)
. += "<span class='notice'>The anchoring system sealant is <b>welded shut</b>.</span>"
if(NUKE_SEALANT_OPEN)
. += "<span class='notice'>The bolts are <b>wrenched</b> in place.</span>"
if(NUKE_UNWRENCHED)
. += "<span class='notice'>The device can be <b>pried off</b> its anchors.</span>"
if(NUKE_CORE_EVERYTHING_FINE)
. += "<span class='notice'>The outer panel can be <b>pried open</b> or it can be <i>screwed</i> back on.</span>"
if(NUKE_CORE_PANEL_EXPOSED)
. += "<span class='notice'>The outer plate can be fixed by <b>[sheets_to_fix] metal sheets</b>, while the inner core plate is <i>welded shut</i>.</span>"
if(NUKE_CORE_PANEL_UNWELDED)
. += "<span class='notice'>The inner core plate can be <b>welded shut</b> or it can be <i>pried open</i>.</span>"
if(NUKE_CORE_FULLY_EXPOSED)
. += "<span class='notice'>The inner core plate can be fixed by <b>[sheets_to_fix] titanium sheets</b>, [core ? "or the plutonium core can be <i>removed</i>" : "though the plutonium core is <i>missing</i>"].</span>"
/obj/machinery/nuclearbomb/update_overlays()
. = ..()
underlays.Cut()
@@ -105,23 +130,31 @@ GLOBAL_VAR(bomb_set)
to_chat(user, "<span class='notice'>You need to deploy [src] first.</span>")
return
if(istype(O, /obj/item/stack/sheet/mineral/titanium) && removal_stage == NUKE_CORE_FULLY_EXPOSED)
var/obj/item/stack/S = O
if(S.get_amount() < sheets_to_fix)
to_chat(user, "<span class='warning'>You need at least [sheets_to_fix] sheets of titanium to repair [src]'s inner core plate!</span>")
return
if(do_after(user, 2 SECONDS, target = src))
var/obj/item/stack/S = O
if(!loc || !S || S.get_amount() < 5)
if(!loc || !S || S.get_amount() < sheets_to_fix)
return
S.use(5)
user.visible_message("<span class='notice'>[user] repairs [src]'s inner core plate.</span>", "<span class='notice'>You repair [src]'s inner core plate. The radiation is contained.</span>")
S.use(sheets_to_fix)
user.visible_message("<span class='notice'>[user] repairs [src]'s inner core plate.</span>", \
"<span class='notice'>You repair [src]'s inner core plate. The radiation is contained.</span>")
removal_stage = NUKE_CORE_PANEL_UNWELDED
if(core)
STOP_PROCESSING(SSobj, core)
return
if(istype(O, /obj/item/stack/sheet/metal) && removal_stage == NUKE_CORE_PANEL_EXPOSED)
var/obj/item/stack/S = O
if(S.get_amount() < sheets_to_fix)
to_chat(user, "<span class='warning'>You need at least [sheets_to_fix] sheets of metal to repair [src]'s outer core plate!</span>")
return
if(do_after(user, 2 SECONDS, target = src))
if(!loc || !S || S.get_amount() < 5)
if(!loc || !S || S.get_amount() < sheets_to_fix)
return
S.use(5)
user.visible_message("<span class='notice'>[user] repairs [src]'s outer core plate.</span>", "<span class='notice'>You repair [src]'s outer core plate.</span>")
S.use(sheets_to_fix)
user.visible_message("<span class='notice'>[user] repairs [src]'s outer core plate.</span>", \
"<span class='notice'>You repair [src]'s outer core plate.</span>")
removal_stage = NUKE_CORE_EVERYTHING_FINE
return
if(istype(O, /obj/item/nuke_core/plutonium) && removal_stage == NUKE_CORE_FULLY_EXPOSED)