[MDB Ignore] Make shuttle windows deconstructable (#61694)

* shuttle windows

* refactor reinf windows

plasma and shuttle only

* messed up one change

* i am actually blind

* made and did file
This commit is contained in:
Mooshimi
2021-09-28 20:45:38 +01:00
committed by GitHub
parent a66ef318a0
commit 496a7685dc
98 changed files with 356 additions and 381 deletions
+16 -76
View File
@@ -321,7 +321,6 @@
update_nearby_icons()
return ..()
/obj/structure/window/Move()
var/turf/T = loc
. = ..()
@@ -537,7 +536,7 @@
/obj/structure/window/plasma/unanchored
anchored = FALSE
/obj/structure/window/plasma/reinforced
/obj/structure/window/reinforced/plasma
name = "reinforced plasma window"
desc = "A window made out of a plasma-silicate alloy and a rod matrix. It looks hopelessly tough to break and is most likely nigh fireproof."
icon_state = "plasmarwindow"
@@ -549,80 +548,19 @@
explosion_block = 2
glass_type = /obj/item/stack/sheet/plasmarglass
/obj/structure/window/plasma/reinforced/BlockSuperconductivity()
/obj/structure/window/reinforced/plasma/BlockSuperconductivity()
return TRUE
//entirely copypasted code
//take this out when construction is made a component or otherwise modularized in some way
/obj/structure/window/plasma/reinforced/attackby(obj/item/I, mob/living/user, params)
switch(state)
if(RWINDOW_SECURE)
if(I.tool_behaviour == TOOL_WELDER && user.combat_mode)
user.visible_message(span_notice("[user] holds \the [I] to the security screws on \the [src]..."),
span_notice("You begin heating the security screws on \the [src]..."))
if(I.use_tool(src, user, 180, volume = 100))
to_chat(user, span_notice("The security screws are glowing white hot and look ready to be removed."))
state = RWINDOW_BOLTS_HEATED
addtimer(CALLBACK(src, .proc/cool_bolts), 300)
return
if(RWINDOW_BOLTS_HEATED)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
user.visible_message(span_notice("[user] digs into the heated security screws and starts removing them..."),
span_notice("You dig into the heated screws hard and they start turning..."))
if(I.use_tool(src, user, 80, volume = 50))
state = RWINDOW_BOLTS_OUT
to_chat(user, span_notice("The screws come out, and a gap forms around the edge of the pane."))
return
if(RWINDOW_BOLTS_OUT)
if(I.tool_behaviour == TOOL_CROWBAR)
user.visible_message(span_notice("[user] wedges \the [I] into the gap in the frame and starts prying..."),
span_notice("You wedge \the [I] into the gap in the frame and start prying..."))
if(I.use_tool(src, user, 50, volume = 50))
state = RWINDOW_POPPED
to_chat(user, span_notice("The panel pops out of the frame, exposing some thin metal bars that looks like they can be cut."))
return
if(RWINDOW_POPPED)
if(I.tool_behaviour == TOOL_WIRECUTTER)
user.visible_message(span_notice("[user] starts cutting the exposed bars on \the [src]..."),
span_notice("You start cutting the exposed bars on \the [src]"))
if(I.use_tool(src, user, 30, volume = 50))
state = RWINDOW_BARS_CUT
to_chat(user, span_notice("The panels falls out of the way exposing the frame bolts."))
return
if(RWINDOW_BARS_CUT)
if(I.tool_behaviour == TOOL_WRENCH)
user.visible_message(span_notice("[user] starts unfastening \the [src] from the frame..."),
span_notice("You start unfastening the bolts from the frame..."))
if(I.use_tool(src, user, 50, volume = 50))
to_chat(user, span_notice("You unfasten the bolts from the frame and the window pops loose."))
state = WINDOW_OUT_OF_FRAME
set_anchored(FALSE)
return
return ..()
/obj/structure/window/plasma/reinforced/examine(mob/user)
. = ..()
switch(state)
if(RWINDOW_SECURE)
. += span_notice("It's been screwed in with one way screws, you'd need to <b>heat them</b> to have any chance of backing them out.")
if(RWINDOW_BOLTS_HEATED)
. += span_notice("The screws are glowing white hot, and you'll likely be able to <b>unscrew them</b> now.")
if(RWINDOW_BOLTS_OUT)
. += span_notice("The screws have been removed, revealing a small gap you could fit a <b>prying tool</b> in.")
if(RWINDOW_POPPED)
. += span_notice("The main plate of the window has popped out of the frame, exposing some bars that look like they can be <b>cut</b>.")
if(RWINDOW_BARS_CUT)
. += span_notice("The main pane can be easily moved out of the way to reveal some <b>bolts</b> holding the frame in.")
/obj/structure/window/plasma/reinforced/spawner/east
/obj/structure/window/reinforced/plasma/spawner/east
dir = EAST
/obj/structure/window/plasma/reinforced/spawner/west
/obj/structure/window/reinforced/plasma/spawner/west
dir = WEST
/obj/structure/window/plasma/reinforced/spawner/north
/obj/structure/window/reinforced/plasma/spawner/north
dir = NORTH
/obj/structure/window/plasma/reinforced/unanchored
/obj/structure/window/reinforced/plasma/unanchored
anchored = FALSE
state = WINDOW_OUT_OF_FRAME
@@ -666,7 +604,7 @@
/obj/structure/window/plasma/fulltile/unanchored
anchored = FALSE
/obj/structure/window/plasma/reinforced/fulltile
/obj/structure/window/reinforced/plasma/fulltile
icon = 'icons/obj/smooth_structures/rplasma_window.dmi'
icon_state = "rplasma_window-0"
base_icon_state = "rplasma_window"
@@ -679,7 +617,7 @@
canSmoothWith = list(SMOOTH_GROUP_WINDOW_FULLTILE)
glass_amount = 2
/obj/structure/window/plasma/reinforced/fulltile/unanchored
/obj/structure/window/reinforced/plasma/fulltile/unanchored
anchored = FALSE
state = WINDOW_OUT_OF_FRAME
@@ -718,7 +656,8 @@
max_integrity = 150
glass_amount = 2
/obj/structure/window/shuttle
//there is a sub shuttle window in survival_pod.dm for mining pods
/obj/structure/window/reinforced/shuttle//this is called reinforced because it is reinforced w/titanium
name = "shuttle window"
desc = "A reinforced, air-locked pod window."
icon = 'icons/obj/smooth_structures/shuttle_window.dmi'
@@ -726,6 +665,7 @@
base_icon_state = "shuttle_window"
max_integrity = 150
wtype = "shuttle"
reinf = TRUE
fulltile = TRUE
flags_1 = PREVENT_CLICK_UNDER_1
reinf = TRUE
@@ -739,16 +679,16 @@
glass_amount = 2
receive_ricochet_chance_mod = 1.2
/obj/structure/window/shuttle/narsie_act()
/obj/structure/window/reinforced/shuttle/narsie_act()
add_atom_colour("#3C3434", FIXED_COLOUR_PRIORITY)
/obj/structure/window/shuttle/tinted
/obj/structure/window/reinforced/shuttle/tinted
opacity = TRUE
/obj/structure/window/shuttle/unanchored
/obj/structure/window/reinforced/shuttle/unanchored
anchored = FALSE
/obj/structure/window/plasma/reinforced/plastitanium
/obj/structure/window/reinforced/plasma/plastitanium
name = "plastitanium window"
desc = "A durable looking window made of an alloy of of plasma and titanium."
icon = 'icons/obj/smooth_structures/plastitanium_window.dmi'
@@ -769,7 +709,7 @@
glass_amount = 2
rad_insulation = RAD_HEAVY_INSULATION
/obj/structure/window/plasma/reinforced/plastitanium/unanchored
/obj/structure/window/reinforced/plasma/plastitanium/unanchored
anchored = FALSE
state = WINDOW_OUT_OF_FRAME