Merge pull request #11611 from xxalpha/n_u_c_l_e_a_r

Nuke deconstruction rework
This commit is contained in:
Razharas
2015-09-17 03:53:49 +03:00
11 changed files with 121 additions and 98 deletions
@@ -1446,10 +1446,10 @@
"aBP" = (/obj/machinery/door/airlock/maintenance{name = "Garden Maintenance"; req_access_txt = "12"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor/plating,/area/maintenance/fpmaint2)
"aBQ" = (/turf/simulated/wall,/area/storage/primary)
"aBR" = (/turf/simulated/wall/r_wall,/area/storage/primary)
"aBS" = (/obj/machinery/light_switch{pixel_y = 28},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor/bluegrid{icon_state = "gcircuit"; luminosity = 2},/area/ai_monitored/nuke_storage)
"aBS" = (/obj/machinery/light_switch{pixel_y = 28},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor/bluegrid,/area/ai_monitored/nuke_storage)
"aBT" = (/obj/structure/closet/secure_closet/freezer/money,/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 8},/area/ai_monitored/nuke_storage)
"aBU" = (/obj/machinery/power/apc{dir = 1; name = "Vault APC"; pixel_x = 0; pixel_y = 25},/obj/structure/cable{icon_state = "0-2"; d2 = 2},/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/bluegrid{icon_state = "gcircuit"; luminosity = 2},/area/ai_monitored/nuke_storage)
"aBV" = (/obj/machinery/alarm{pixel_y = 23},/obj/machinery/light{dir = 1},/turf/simulated/floor/bluegrid{icon_state = "gcircuit"; luminosity = 2},/area/ai_monitored/nuke_storage)
"aBU" = (/obj/machinery/power/apc{dir = 1; name = "Vault APC"; pixel_x = 0; pixel_y = 25},/obj/structure/cable{icon_state = "0-2"; d2 = 2},/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/bluegrid,/area/ai_monitored/nuke_storage)
"aBV" = (/obj/machinery/alarm{pixel_y = 23},/obj/machinery/light{dir = 1},/turf/simulated/floor/bluegrid,/area/ai_monitored/nuke_storage)
"aBW" = (/obj/structure/filingcabinet,/obj/item/weapon/folder/documents,/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 8},/area/ai_monitored/nuke_storage)
"aBX" = (/obj/machinery/gateway{dir = 10},/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 4},/area/gateway)
"aBY" = (/obj/machinery/gateway{dir = 6},/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 1},/area/gateway)
@@ -1523,9 +1523,9 @@
"aDo" = (/turf/simulated/floor/plasteel,/area/storage/primary)
"aDp" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/turf/simulated/floor/plasteel,/area/storage/primary)
"aDq" = (/obj/machinery/vending/tool,/turf/simulated/floor/plasteel,/area/storage/primary)
"aDr" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 9},/turf/simulated/floor/bluegrid{icon_state = "gcircuit"; luminosity = 2},/area/ai_monitored/nuke_storage)
"aDr" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 9},/turf/simulated/floor/bluegrid,/area/ai_monitored/nuke_storage)
"aDs" = (/obj/machinery/atmospherics/components/unary/vent_scrubber{dir = 4; on = 1; scrub_N2O = 0; scrub_Toxins = 0},/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 1},/area/ai_monitored/nuke_storage)
"aDt" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 5},/turf/simulated/floor/bluegrid{icon_state = "gcircuit"; luminosity = 2},/area/ai_monitored/nuke_storage)
"aDt" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 5},/turf/simulated/floor/bluegrid,/area/ai_monitored/nuke_storage)
"aDu" = (/obj/machinery/nuclearbomb/selfdestruct{layer = 2},/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 8},/area/ai_monitored/nuke_storage)
"aDv" = (/obj/machinery/atmospherics/components/unary/vent_pump{dir = 8; on = 1},/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 4},/area/ai_monitored/nuke_storage)
"aDw" = (/obj/structure/window/reinforced,/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 10},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/gateway)
@@ -1596,9 +1596,9 @@
"aEJ" = (/obj/machinery/door/airlock{name = "Garden"; req_access_txt = "0"},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/turf/simulated/floor/plasteel,/area/hallway/secondary/construction{name = "\improper Garden"})
"aEK" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/plasteel,/area/storage/primary)
"aEL" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0},/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{tag = "icon-manifold-r-f (EAST)"; dir = 4},/turf/simulated/floor/plasteel,/area/storage/primary)
"aEM" = (/turf/simulated/floor/bluegrid{icon_state = "gcircuit"; luminosity = 2},/area/ai_monitored/nuke_storage)
"aEM" = (/turf/simulated/floor/bluegrid,/area/ai_monitored/nuke_storage)
"aEN" = (/obj/structure/closet/crate{name = "Gold Crate"},/obj/item/stack/sheet/mineral/gold{pixel_x = -1; pixel_y = 5},/obj/item/stack/sheet/mineral/gold{pixel_y = 2},/obj/item/stack/sheet/mineral/gold{pixel_x = 1; pixel_y = -2},/obj/item/weapon/storage/belt/champion,/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 1},/area/ai_monitored/nuke_storage)
"aEO" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/bluegrid{icon_state = "gcircuit"; luminosity = 2},/area/ai_monitored/nuke_storage)
"aEO" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/bluegrid,/area/ai_monitored/nuke_storage)
"aEP" = (/obj/item/weapon/coin/silver{pixel_x = 7; pixel_y = 12},/obj/item/weapon/coin/silver{pixel_x = 12; pixel_y = 7},/obj/item/weapon/coin/silver{pixel_x = 4; pixel_y = 8},/obj/item/weapon/coin/silver{pixel_x = -6; pixel_y = 5},/obj/item/weapon/coin/silver{pixel_x = 5; pixel_y = -8},/obj/structure/closet/crate{name = "Silver Crate"},/turf/simulated/floor/plasteel{icon_state = "vault"; dir = 4},/area/ai_monitored/nuke_storage)
"aEQ" = (/obj/structure/table,/obj/item/weapon/paper/pamphlet,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/plasteel,/area/gateway)
"aER" = (/obj/machinery/camera{c_tag = "Gateway"; dir = 4; network = list("SS13")},/obj/structure/table,/obj/structure/sign/biohazard{pixel_x = -32},/obj/item/weapon/storage/firstaid/regular,/turf/simulated/floor/plasteel,/area/gateway)
+60 -71
View File
@@ -1,8 +1,7 @@
#define NUKESTATE_INTACT 6
#define NUKESTATE_OPEN 5
#define NUKESTATE_OPEN_TRAP 4
#define NUKESTATE_WIRES_TIED 3
#define NUKESTATE_CUT_LINES 2
#define NUKESTATE_INTACT 5
#define NUKESTATE_UNSCREWED 4
#define NUKESTATE_PANEL_REMOVED 3
#define NUKESTATE_WELDED 2
#define NUKESTATE_CORE_EXPOSED 1
#define NUKESTATE_CORE_REMOVED 0
@@ -33,21 +32,20 @@ var/bomb_set
var/obj/item/nuke_core/core = null
var/deconstruction_state = NUKESTATE_INTACT
var/image/lights = null
var/image/panel = null
var/image/interior = null
var/image/glow = null
/obj/machinery/nuclearbomb/New()
..()
nuke_list += src
core = new /obj/item/nuke_core(src)
SSobj.processing -= core
update_icon()
previous_level = get_security_level()
/obj/machinery/nuclearbomb/selfdestruct
name = "station self-destruct terminal"
desc = "For when it all gets too much to bear. Do not taunt."
icon = 'icons/obj/machines/bignuke.dmi'
icon = 'icons/obj/machines/nuke_terminal.dmi'
icon_state = "nuclearbomb_base"
anchored = 1 //stops it being moved
layer = 4
@@ -65,67 +63,69 @@ var/bomb_set
if(NUKESTATE_INTACT)
if(istype(I, /obj/item/weapon/screwdriver/nuke))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>You start removing the front panel's screws...</span>"
if(do_after(user, 100,target=src))
deconstruction_state = NUKESTATE_OPEN
user << "<span class='notice'>You remove the screws and the front panel slides open.</span>"
user << "<span class='notice'>You start removing [src]'s front panel's screws...</span>"
if(do_after(user, 60,target=src))
deconstruction_state = NUKESTATE_UNSCREWED
user << "<span class='notice'>You remove the screws from [src]'s front panel.</span>"
update_icon()
return
if(NUKESTATE_OPEN,NUKESTATE_OPEN_TRAP)
if((deconstruction_state == NUKESTATE_OPEN) && istype(I, /obj/item/weapon/wirecutters))
playsound(loc, 'sound/effects/sparks4.ogg', 100, 1)
playsound(loc, 'sound/effects/EMPulse.ogg', 100, 1)
user << "<span class='warning'>You must have cut the wrong wire!</span>"
for(var/mob/living/L in range(5,src))
L.irradiate(200)
deconstruction_state = NUKESTATE_OPEN_TRAP //cant cut wires no more
else
if(istype(I, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/S = I
user << "<span class='notice'>You start tying the wires...</span>"
if(do_after(user,30,target=src))
if(S.use(15))
user << "<span class='notice'>You tie the wires with some cable, clearing the insides of [src].</span>"
deconstruction_state = NUKESTATE_WIRES_TIED
update_icon()
else
user << "<span class='warning'>You need more cable to do that.</span>"
else
user << "<span class='warning'>You can't do anything with this tangle of cables in the way.</span>"
return
if(NUKESTATE_WIRES_TIED)
if(istype(I, /obj/item/weapon/pen))
user << "<span class='notice'>You start drawing cut lines...</span>"
if(NUKESTATE_UNSCREWED)
if(istype(I, /obj/item/weapon/crowbar))
user << "<span class='notice'>You start removing [src]'s front panel...</span>"
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
if(do_after(user,30,target=src))
user << "<span class='notice'>You draw cut lines inside [src].</span>"
deconstruction_state = NUKESTATE_CUT_LINES
user << "<span class='notice'>You remove [src]'s front panel.</span>"
deconstruction_state = NUKESTATE_PANEL_REMOVED
update_icon()
return
if(NUKESTATE_CUT_LINES)
if(NUKESTATE_PANEL_REMOVED)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/welder = I
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
user << "<span class='notice'>You start cutting into [src]'s warhead...</span>"
user << "<span class='notice'>You start cutting [src]'s inner plate...</span>"
if(welder.remove_fuel(1,user))
if(do_after(user,50,target=src))
playsound(loc, 'sound/items/Deconstruct.ogg', 100, 1)
user << "<span class='notice'>You cut into [src]'s warhead. You can see the core's green glow.</span>"
deconstruction_state = NUKESTATE_CORE_EXPOSED
if(do_after(user,80,target=src))
user << "<span class='notice'>You cut [src]'s inner plate.</span>"
deconstruction_state = NUKESTATE_WELDED
update_icon()
SSobj.processing += core
return
if(NUKESTATE_WELDED)
if(istype(I, /obj/item/weapon/crowbar))
user << "<span class='notice'>You start prying off [src]'s inner plate...</span>"
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
if(do_after(user,50,target=src))
user << "<span class='notice'>You pry off [src]'s inner plate. You can see the core's green glow!</span>"
deconstruction_state = NUKESTATE_CORE_EXPOSED
update_icon()
SSobj.processing += core
if(NUKESTATE_CORE_EXPOSED)
if(istype(I, /obj/item/nuke_core_container))
var/obj/item/nuke_core_container/core_box = I
user << "<span class='notice'>You start loading the plutonium core into [core_box]...</span>"
if(do_after(user,50,target=src))
if(core_box.load(core,src))
if(core_box.load(core, user))
user << "<span class='notice'>You load the plutonium core into [core_box].</span>"
deconstruction_state = NUKESTATE_CORE_REMOVED
update_icon()
core = null
else
user << "<span class='warning'>You fail to load the plutonium core into [core_box]. [core_box] has already been used!</span>"
return
if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(M.amount >= 20)
user << "<span class='notice'>You begin repairing [src]'s inner metal plate...</span>"
if(do_after(user, 100, target=src))
if(M.use(20))
user << "<span class='notice'>You repair [src]'s inner metal plate. The radiation is contained.</span>"
deconstruction_state = NUKESTATE_PANEL_REMOVED
SSobj.processing -= core
update_icon()
else
user << "<span class='warning'>You need more metal to do that!</span>"
else
user << "<span class='warning'>You need more metal to do that!</span>"
return
else
..()
@@ -143,6 +143,7 @@ var/bomb_set
if(deconstruction_state == NUKESTATE_INTACT)
switch(get_nuke_state())
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
icon_state = "nuclearbomb_base"
update_icon_interior()
update_icon_lights()
if(NUKE_ON_TIMING)
@@ -152,51 +153,39 @@ var/bomb_set
overlays.Cut()
icon_state = "nuclearbomb_exploding"
else
icon_state = "nuclearbomb_base"
update_icon_interior()
update_icon_lights()
/obj/machinery/nuclearbomb/proc/update_icon_interior()
overlays -= interior
overlays -= glow
switch(deconstruction_state)
if(NUKESTATE_OPEN_TRAP,NUKESTATE_OPEN)
glow = null
if(NUKESTATE_UNSCREWED)
interior = image(icon,"panel-unscrewed")
if(NUKESTATE_PANEL_REMOVED)
interior = image(icon,"panel-removed")
if(NUKESTATE_CORE_REMOVED,NUKESTATE_CUT_LINES,NUKESTATE_WIRES_TIED)
glow = null
interior = image(icon,"wires-sorted")
if(NUKESTATE_WELDED)
interior = image(icon,"plate-welded")
if(NUKESTATE_CORE_EXPOSED)
glow = image(icon,"core-exposed")
interior = image(icon,"wires-sorted")
interior = image(icon,"plate-removed")
if(NUKESTATE_CORE_REMOVED)
interior = image(icon,"core-removed")
if(NUKESTATE_INTACT)
glow = null
interior = image(icon,"panel-overlay")
interior = null
overlays += interior
overlays += glow
/obj/machinery/nuclearbomb/proc/update_icon_lights()
overlays -= lights
overlays -= panel
panel = null
switch(get_nuke_state())
if(NUKE_OFF_LOCKED)
lights = image(icon,"lights-off")
if(deconstruction_state != NUKESTATE_INTACT)
panel = image(icon,"panel-removed-blue")
lights = null
if(NUKE_OFF_UNLOCKED)
lights = image(icon,"lights-safety")
if(deconstruction_state != NUKESTATE_INTACT)
panel = image(icon,"panel-removed-blue")
if(NUKE_ON_TIMING)
lights = image(icon,"lights-timing")
if(deconstruction_state != NUKESTATE_INTACT)
panel = image(icon,"panel-removed-timing")
if(NUKE_ON_EXPLODING)
lights = image(icon,"lights-exploding")
if(deconstruction_state != NUKESTATE_INTACT)
panel = image(icon,"panel-removed-exploding")
overlays += lights
overlays += panel
/obj/machinery/nuclearbomb/process()
if (timing > 0)
@@ -391,7 +380,7 @@ This is here to make the tiles around the station mininuke change when it's arme
/obj/machinery/nuclearbomb/selfdestruct/proc/SetTurfs()
if(loc == initial(loc))
for(var/turf/simulated/floor/bluegrid/T in orange(src, 1))
T.icon_state = (timing ? "rcircuitanim" : "gcircuit")
T.icon_state = (timing ? "rcircuitanim" : "bcircuit")
/obj/machinery/nuclearbomb/selfdestruct/set_anchor()
return
+47 -19
View File
@@ -6,15 +6,25 @@
desc = "Extremely radioactive. Wear goggles."
icon = 'icons/obj/nuke_tools.dmi'
icon_state = "plutonium_core"
item_state = "plutoniumcore"
var/pulse = 0
var/cooldown = 0
/obj/item/nuke_core/New()
SSobj.processing += src
/obj/item/nuke_core/attackby(obj/item/nuke_core_container/container, mob/user)
if(istype(container))
container.load(src, user)
else
..()
/obj/item/nuke_core/process()
if(cooldown < world.time - 40)
if(cooldown < world.time - 60)
cooldown = world.time
for(var/mob/living/L in range(8,get_turf(src)))
var/rads = 100 - get_dist(L,src)*7
L.irradiate(rads)
flick("plutonium_core_pulse", src)
for(var/mob/living/L in range(4,get_turf(src)))
L.irradiate(40)
//nuke core box, for carrying the core
/obj/item/nuke_core_container
@@ -22,33 +32,51 @@
desc = "Solid container for radioactive objects."
icon = 'icons/obj/nuke_tools.dmi'
icon_state = "core_container_empty"
item_state = "tile"
var/obj/item/nuke_core/core = null
/obj/item/nuke_core_container/proc/load(obj/item/nuke_core/ncore, obj/machinery/nuclearbomb/nuke)
if(core)
/obj/item/nuke_core_container/proc/load(obj/item/nuke_core/ncore, mob/user)
if(core || !istype(ncore))
return 0
SSobj.processing -= ncore
ncore.loc = src
core = ncore
nuke.core = null
icon_state = "core_container_loaded"
user << "<span class='warning'>Container is sealing...</span>"
spawn(50)
SSobj.processing -= core
icon_state = "core_container_sealed"
playsound(loc, 'sound/items/Deconstruct.ogg', 100, 1)
if(loc == user)
user << "<span class='warning'>Container is sealed, the radiation is contained.</span>"
return 1
/obj/item/nuke_core_container/attackby(obj/item/nuke_core/core, mob/user)
if(istype(core))
if(!user.unEquip(core))
user << "<span class='warning'>The [core] is stuck to your hand!</span>"
return
else
load(core, user)
else
..()
//snowflake screwdriver, works as a key to start nuke theft, traitor only
/obj/item/weapon/screwdriver/nuke
name = "screwdriver"
desc = "A screwdriver with an ultra thin tip."
icon = 'icons/obj/nuke_tools.dmi'
icon_state = "screwdriver_nuke"
item_state = "screwdriver_nuke"
/obj/item/weapon/screwdriver/nuke/New()
//to skip screwdriver icon update
/obj/item/weapon/paper/nuke_instructions
info = "How to break into a Nanotrasen self-destruct terminal and remove it's plutonium core:<br>\
info = "How to break into a Nanotrasen self-destruct terminal and remove its plutonium core:<br>\
<ul>\
<li>Use a screwdriver with a very thin tip (provided) to unscrew the terminal's front panel;</li>\
<li>The insides of the terminal should be mostly hollow and you should have a clear way to the warhead's weak spot;</li>\
<li>Use something to draw cut lines on the warhead, according to the provided plans;</li>\
<li>With a welding tool, cut a hole in the warhead, following the previously drawn cut lines;</li>\
<li>After you breach the warhead, you may notice the very subtle glow of the plutonium core;</li>\
<li>Place the provided core container in the hole and poke the core until it falls into the container;</li>\
<li>Once the core is inside the container, the container will lock shut. Deliver the container to your commander.</li>"
/obj/item/weapon/paper/nuke_plans
info = "Nuclear warhead breaching plans:"
<li>Use a screwdriver with a very thin tip (provided) to unscrew the terminal's front panel</li>\
<li>Dislodge and remove the front panel with a crowbar</li>\
<li>Cut the inner metal plate with a welding tool</li>\
<li>Pry off the inner plate with a crowbar to expose the radioactive core</li>\
<li>Use the core container to remove the plutonium core; the container will take some time to seal</li>\
<li>???</li>"
@@ -223,4 +223,3 @@
new /obj/item/weapon/screwdriver/nuke(src)
new /obj/item/nuke_core_container(src)
new /obj/item/weapon/paper/nuke_instructions(src)
new /obj/item/weapon/paper/nuke_plans(src)
@@ -0,0 +1,7 @@
author: xxalpha
delete-after: True
changes:
- tweak: "Reworked nuke deconstruction: Standardized steps, partial reparation (use metal) to contain radiation."
- rscadd: "New portable nuke, self-destruct terminal, syndie screwdriver sprites by WJohnston."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB