mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
[MIRROR] Multi-tile airlocks [MDB IGNORE] (#23000)
* Multi-tile airlocks * remove SR edits as this is upstreamed * Update airlock.dm * Update airlock.dm * Update tgstation.dme * Delete 23000_airlock_repath.txt --------- Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
@@ -6,26 +6,51 @@
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
max_integrity = 200
|
||||
/// Airlock's current construction state
|
||||
var/state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
var/base_name = "Airlock"
|
||||
var/created_name = null
|
||||
var/mineral = null
|
||||
var/obj/item/electronics/airlock/electronics = null
|
||||
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
|
||||
/// Do we perform the extra checks required for multi-tile (large) airlocks
|
||||
var/multi_tile = FALSE
|
||||
/// The type path of the airlock once completed (solid version)
|
||||
var/airlock_type = /obj/machinery/door/airlock
|
||||
/// The type path of the airlock once completed (glass version)
|
||||
var/glass_type = /obj/machinery/door/airlock/glass
|
||||
var/glass = 0 // 0 = glass can be installed. 1 = glass is already installed.
|
||||
var/created_name = null
|
||||
var/heat_proof_finished = 0 //whether to heat-proof the finished airlock
|
||||
/// FALSE = glass can be installed. TRUE = glass is already installed.
|
||||
var/glass = FALSE
|
||||
/// Whether to heat-proof the finished airlock
|
||||
var/heat_proof_finished = FALSE
|
||||
/// If you're changing the airlock material, what is the previous type
|
||||
var/previous_assembly = /obj/structure/door_assembly
|
||||
var/noglass = FALSE //airlocks with no glass version, also cannot be modified with sheets
|
||||
var/nomineral = FALSE //airlock with glass version, but cannot be modified with sheets
|
||||
/// Airlocks with no glass version, also cannot be modified with sheets
|
||||
var/noglass = FALSE
|
||||
/// Airlock with glass version, but cannot be modified with sheets
|
||||
var/nomineral = FALSE
|
||||
/// What type of material the airlock drops when deconstructed
|
||||
var/material_type = /obj/item/stack/sheet/iron
|
||||
/// Amount of material the airlock drops when deconstructed
|
||||
var/material_amt = 4
|
||||
|
||||
/obj/structure/door_assembly/multi_tile
|
||||
dir = EAST
|
||||
multi_tile = TRUE
|
||||
|
||||
/obj/structure/door_assembly/Initialize(mapload)
|
||||
. = ..()
|
||||
update_appearance()
|
||||
update_name()
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Initialize(mapload)
|
||||
. = ..()
|
||||
set_bounds()
|
||||
update_overlays()
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Move()
|
||||
. = ..()
|
||||
set_bounds()
|
||||
|
||||
/obj/structure/door_assembly/examine(mob/user)
|
||||
. = ..()
|
||||
var/doorname = ""
|
||||
@@ -78,7 +103,7 @@
|
||||
to_chat(user, span_notice("You weld the glass panel out."))
|
||||
if(heat_proof_finished)
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||
heat_proof_finished = 0
|
||||
heat_proof_finished = FALSE
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = 0
|
||||
@@ -259,10 +284,6 @@
|
||||
else
|
||||
door = new airlock_type( loc )
|
||||
door.setDir(dir)
|
||||
//SKYRAT EDIT ADDITION BEGIN - LARGE_DOORS
|
||||
if(door.multi_tile)
|
||||
door.set_bounds()
|
||||
//SKYRAT EDIT END
|
||||
door.unres_sides = electronics.unres_sides
|
||||
//door.req_access = req_access
|
||||
door.electronics = electronics
|
||||
@@ -364,3 +385,18 @@
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Updates the bounds of the airlock assembly
|
||||
* Sets the bounds of the airlock assembly according to the direction.
|
||||
* This ensures that the bounds are always correct, even if the airlock is rotated.
|
||||
*/
|
||||
/obj/structure/door_assembly/multi_tile/proc/set_bounds()
|
||||
var/size = get_size_in_tiles(src)
|
||||
|
||||
if(dir in list(NORTH, SOUTH))
|
||||
bound_width = size * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = size * world.icon_size
|
||||
|
||||
@@ -267,6 +267,15 @@
|
||||
nomineral = TRUE
|
||||
material_flags = MATERIAL_EFFECTS | MATERIAL_ADD_PREFIX | MATERIAL_GREYSCALE | MATERIAL_AFFECT_STATISTICS
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/glass
|
||||
name = "large glass airlock assembly"
|
||||
base_name = "large glass airlock"
|
||||
icon = 'icons/obj/doors/airlocks/glass_large/glass_large.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/glass_large/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/multi_tile/glass
|
||||
glass_type = /obj/machinery/door/airlock/multi_tile/glass
|
||||
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_material/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
Reference in New Issue
Block a user