mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Makes blast doors/shutters and blast door controllers buildable and deconstructible (#56486)
This commit is contained in:
@@ -1077,6 +1077,28 @@
|
||||
)
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/shutters
|
||||
name = "Shutters"
|
||||
reqs = list(/obj/item/stack/sheet/plasteel = 10,
|
||||
/obj/item/stack/cable_coil = 10,
|
||||
/obj/item/electronics/airlock = 1
|
||||
)
|
||||
result = /obj/machinery/door/poddoor/shutters/preopen
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_MULTITOOL, TOOL_WIRECUTTER, TOOL_WELDER)
|
||||
time = 15 SECONDS
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/blast_doors
|
||||
name = "Blast Door"
|
||||
reqs = list(/obj/item/stack/sheet/plasteel = 15,
|
||||
/obj/item/stack/cable_coil = 15,
|
||||
/obj/item/electronics/airlock = 1
|
||||
)
|
||||
result = /obj/machinery/door/poddoor/preopen
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_MULTITOOL, TOOL_WIRECUTTER, TOOL_WELDER)
|
||||
time = 30 SECONDS
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/aquarium
|
||||
name = "Aquarium"
|
||||
result = /obj/structure/aquarium
|
||||
|
||||
@@ -15,6 +15,53 @@
|
||||
resistance_flags = FIRE_PROOF
|
||||
damage_deflection = 70
|
||||
poddoor = TRUE
|
||||
var/ertblast = FALSE //If this is true the blast door cannot be deconstructed
|
||||
var/deconstruction = INTACT //For the deconstruction steps
|
||||
|
||||
/obj/machinery/door/poddoor/attackby(obj/item/W, mob/user, params)
|
||||
. = ..()
|
||||
if(ertblast && W.tool_behaviour == TOOL_SCREWDRIVER) // This makes it so ERT members cannot cheese by opening their blast doors.
|
||||
to_chat(user, "<span class='warning'>This shutter has a different kind of screw, you cannot unscrew the panel open.</span>")
|
||||
return
|
||||
|
||||
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(density)
|
||||
to_chat(user, "<span class='warning'>You need to open [src] before opening its maintenance panel.</span>")
|
||||
return
|
||||
else if(default_deconstruction_screwdriver(user, icon_state, icon_state, W))
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>")
|
||||
return TRUE
|
||||
|
||||
if(panel_open)
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
var/change_id = input("Set the shutters/blast door/blast door controllers ID. It must be a number between 1 and 100.", "ID", id) as num|null
|
||||
if(change_id)
|
||||
id = clamp(round(change_id, 1), 1, 100)
|
||||
to_chat(user, "<span class='notice'>You change the ID to [id].</span>")
|
||||
|
||||
if(W.tool_behaviour == TOOL_CROWBAR && deconstruction == INTACT)
|
||||
to_chat(user, "<span class='notice'>You start to remove the airlock electronics.</span>")
|
||||
if(do_after(user, 10 SECONDS, target = src))
|
||||
new /obj/item/electronics/airlock(loc)
|
||||
id = null
|
||||
deconstruction = FALSE
|
||||
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER && deconstruction == FALSE)
|
||||
to_chat(user, "<span class='notice'>You start to remove the internal cables.</span>")
|
||||
if(do_after(user, 10 SECONDS, target = src))
|
||||
deconstruction = TRUE
|
||||
|
||||
if(W.tool_behaviour == TOOL_WELDER && deconstruction == TRUE)
|
||||
to_chat(user, "<span class='notice'>You start tearing apart the [src].</span>")
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 50, 1)
|
||||
if(do_after(user, 15 SECONDS, target = src))
|
||||
new /obj/item/stack/sheet/plasteel(loc, 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/door/poddoor/examine(mob/user)
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
. += "<span class='<span class='notice'>The maintenance panel is [panel_open ? "opened" : "closed"].</span>"
|
||||
|
||||
/obj/machinery/door/poddoor/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock)
|
||||
id = "[port.id]_[id]"
|
||||
@@ -27,10 +74,12 @@
|
||||
/obj/machinery/door/poddoor/ert
|
||||
name = "hardened blast door"
|
||||
desc = "A heavy duty blast door that only opens for dire emergencies."
|
||||
ertblast = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
//special poddoors that open when emergency shuttle docks at centcom
|
||||
/obj/machinery/door/poddoor/shuttledock
|
||||
ertblast = TRUE
|
||||
var/checkdir = 4 //door won't open if turf in this dir is `turftype`
|
||||
var/turftype = /turf/open/space
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/indestructible
|
||||
name = "hardened shutters"
|
||||
ertblast = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/radiation
|
||||
|
||||
@@ -13,6 +13,12 @@
|
||||
if(id)
|
||||
. += "<span class='notice'>Its channel ID is '[id]'.</span>"
|
||||
|
||||
/obj/item/assembly/control/multitool_act(mob/living/user)
|
||||
var/change_id = input("Set the shutters/blast door/blast door controllers ID. It must be a number between 1 and 100.", "ID", id) as num|null
|
||||
if(change_id)
|
||||
id = clamp(round(change_id, 1), 1, 100)
|
||||
to_chat(user, "<span class='notice'>You change the ID to [id].</span>")
|
||||
|
||||
/obj/item/assembly/control/activate()
|
||||
var/openclose
|
||||
if(cooldown)
|
||||
|
||||
@@ -1203,3 +1203,11 @@
|
||||
materials = list(/datum/material/iron = 75)
|
||||
build_path = /obj/item/chisel
|
||||
category = list("initial","Tools")
|
||||
|
||||
/datum/design/control
|
||||
name = "Blast Door Controller"
|
||||
id = "blast"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(/datum/material/iron = 100, /datum/material/glass = 50)
|
||||
build_path = /obj/item/assembly/control
|
||||
category = list("initial","Misc")
|
||||
|
||||
Reference in New Issue
Block a user