Order tweaks, removal of duplicate

This commit is contained in:
Qwertytoforty
2021-07-23 14:36:18 -04:00
parent 5326447264
commit eeb8f7054c
5 changed files with 35 additions and 49 deletions
+13 -16
View File
@@ -29,13 +29,13 @@ GLOBAL_VAR(bomb_set)
var/yes_code = FALSE
var/safety = TRUE
var/obj/item/disk/nuclear/auth = null
var/removal_stage = NUKE_INTACT
var/obj/item/nuke_core/plutonium/core = null
var/lastentered
var/is_syndicate = FALSE
use_power = NO_POWER_USE
var/previous_level = ""
var/datum/wires/nuclearbomb/wires = null
var/removal_stage = NUKE_INTACT
///The same state removal stage is, until someone opens the panel of the nuke. This way we can have someone open the front of the nuke, while keeping track of where in the world we are on the anchoring bolts.
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.
@@ -252,21 +252,18 @@ GLOBAL_VAR(bomb_set)
attack_hand(user)
/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
if(panel_open)
if(removal_stage == NUKE_CORE_FULLY_EXPOSED && core)
if(timing) //removing the core is less risk then cutting wires, and doesnt take long, so we should not let crew do it while the nuke is armed. You can however get to it, without the special screwdriver, if you put the NAD in.
to_chat(user, "<span class='warning'>[core] won't budge, metal clamps keep it in!</span>")
return
user.visible_message("<span class='notice'>[user] starts to pull [core] out of [src]!</span>", "<span class='notice'>You start to pull [core] out of [src]!</span>")
if(do_after(user, 5 SECONDS, target = src))
user.visible_message("<span class='notice'>[user] pulls [core] out of [src]!</span>", "<span class='notice'>You pull [core] out of [src]! Might want to put it somewhere safe.</span>")
core.forceMove(loc)
core = null
else
wires.Interact(user)
else
ui_interact(user)
if(!panel_open)
return ui_interact(user)
if(removal_stage != NUKE_CORE_FULLY_EXPOSED || !core)
return wires.Interact(user)
if(timing) //removing the core is less risk then cutting wires, and doesnt take long, so we should not let crew do it while the nuke is armed. You can however get to it, without the special screwdriver, if you put the NAD in.
to_chat(user, "<span class='warning'>[core] won't budge, metal clamps keep it in!</span>")
return
user.visible_message("<span class='notice'>[user] starts to pull [core] out of [src]!</span>", "<span class='notice'>You start to pull [core] out of [src]!</span>")
if(do_after(user, 5 SECONDS, target = src))
user.visible_message("<span class='notice'>[user] pulls [core] out of [src]!</span>", "<span class='notice'>You pull [core] out of [src]! Might want to put it somewhere safe.</span>")
core.forceMove(loc)
core = null
/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)
+17 -29
View File
@@ -57,13 +57,12 @@
/obj/item/nuke_core_container/proc/load(obj/item/nuke_core/plutonium/new_core, mob/user)
if(core || !istype(new_core))
return FALSE
return
new_core.forceMove(src)
core = new_core
icon_state = "core_container_loaded"
to_chat(user, "<span class='warning'>Container is sealing...</span>")
addtimer(CALLBACK(src, .proc/seal), 10 SECONDS)
return TRUE
/obj/item/nuke_core_container/proc/seal()
if(!QDELETED(core))
@@ -83,16 +82,6 @@
else
load(core, user)
//snowflake screwdriver, works as a key to start nuke theft, traitor only
/obj/item/screwdriver/nuke
name = "screwdriver"
desc = "A screwdriver with an ultra thin tip that's carefully designed to boost screwing speed."
icon = 'icons/obj/nuke_tools.dmi'
icon_state = "screwdriver_nuke"
item_state = "screwdriver_nuke"
toolspeed = 0.5
random_color = FALSE
/obj/item/paper/guides/antag/nuke_instructions
info = "How to break into a Nanotrasen nuclear device and remove its plutonium core:<br>\
<ul>\
@@ -131,9 +120,9 @@
/obj/item/nuke_core/supermatter_sliver/can_be_pulled(user) // no drag memes
return FALSE
/obj/item/nuke_core/supermatter_sliver/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/retractor/supermatter))
var/obj/item/retractor/supermatter/tongs = W
/obj/item/nuke_core/supermatter_sliver/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/retractor/supermatter))
var/obj/item/retractor/supermatter/tongs = I
if(tongs.sliver)
to_chat(user, "<span class='warning'>[tongs] are already holding a supermatter sliver!</span>")
return FALSE
@@ -142,13 +131,13 @@
tongs.icon_state = "supermatter_tongs_loaded"
tongs.item_state = "supermatter_tongs_loaded"
to_chat(user, "<span class='notice'>You carefully pick up [src] with [tongs].</span>")
else if(istype(W, /obj/item/scalpel/supermatter) || istype(W, /obj/item/nuke_core_container/supermatter)) // we don't want it to dust
else if(istype(I, /obj/item/scalpel/supermatter) || istype(I, /obj/item/nuke_core_container/supermatter)) // we don't want it to dust
return
else
to_chat(user, "<span class='danger'>As it touches [src], both [src] and [W] burst into dust!</span>")
to_chat(user, "<span class='danger'>As it touches [src], both [src] and [I] burst into dust!</span>")
radiation_pulse(user, 100)
playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
qdel(W)
qdel(I)
qdel(src)
/obj/item/nuke_core/supermatter_sliver/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
@@ -193,18 +182,17 @@
QDEL_NULL(sliver)
return ..()
/obj/item/nuke_core_container/supermatter/load(obj/item/retractor/supermatter/T, mob/user)
if(!istype(T) || !T.sliver)
return FALSE
T.sliver.forceMove(src)
sliver = T.sliver
T.sliver = null
T.icon_state = "supermatter_tongs"
T.item_state = "supermatter_tongs"
/obj/item/nuke_core_container/supermatter/load(obj/item/retractor/supermatter/I, mob/user)
if(!istype(I) || !I.sliver)
return
I.sliver.forceMove(src)
sliver = I.sliver
I.sliver = null
I.icon_state = "supermatter_tongs"
I.item_state = "supermatter_tongs"
icon_state = "supermatter_container_loaded"
to_chat(user, "<span class='warning'>Container is sealing...</span>")
addtimer(CALLBACK(src, .proc/seal), 10 SECONDS)
return TRUE
/obj/item/nuke_core_container/supermatter/seal()
if(!QDELETED(sliver))
@@ -229,11 +217,11 @@
toolspeed = 0.5
damtype = BURN
usesound = 'sound/weapons/bladeslice.ogg'
var/usesLeft
var/uses_left
/obj/item/scalpel/supermatter/Initialize()
. = ..()
usesLeft = rand(2, 4)
uses_left = rand(2, 4)
/obj/item/retractor/supermatter
name = "supermatter extraction tongs"
@@ -27,6 +27,7 @@
desc = "A screwdriver with an ultra thin tip."
icon_state = "screwdriver_nuke"
toolspeed = 0.5
random_color = FALSE
/obj/item/screwdriver/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -717,12 +717,12 @@
var/obj/item/scalpel/supermatter/scalpel = I
to_chat(user, "<span class='notice'>You carefully begin to scrape [src] with [I]...</span>")
if(I.use_tool(src, user, 10 SECONDS, volume = 100))
if(scalpel.usesLeft)
to_chat(user, "<span class='danger'>You extract a sliver from [src]. [src] begins to react violently!</span>")
if(scalpel.uses_left)
to_chat(user, "<span class='danger'>You extract a sliver from [src], and it begins to react violently!</span>")
new /obj/item/nuke_core/supermatter_sliver(drop_location())
matter_power += 800
scalpel.usesLeft--
if(!scalpel.usesLeft)
scalpel.uses_left--
if(!scalpel.uses_left)
to_chat(user, "<span class='notice'>A tiny piece of [I] falls off, rendering it useless!</span>")
else
to_chat(user, "<span class='warning'>You fail to extract a sliver from [src]! [I] isn't sharp enough anymore.</span>")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB