mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Make multitile airlocks/poddoors directional (#28928)
* Update multitile airlocks * Update shuttle_rotate.dm * updatepaths * code review changes + linters * i failed my own linters * updatepaths
This commit is contained in:
@@ -136,29 +136,80 @@
|
||||
icon = 'icons/obj/doors/airlocks/glass_large/glass_large.dmi'
|
||||
base_name = "large airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/glass_large/overlays.dmi'
|
||||
dir = EAST
|
||||
var/width = 2
|
||||
var/list/fillers
|
||||
airlock_type = /obj/machinery/door/airlock/multi_tile
|
||||
glass_type = /obj/machinery/door/airlock/multi_tile/glass
|
||||
material_amt = 8
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Initialize(mapload)
|
||||
. = ..()
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
update_bounds()
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Move()
|
||||
/obj/structure/door_assembly/multi_tile/Move(new_loc, new_dir)
|
||||
. = ..()
|
||||
update_bounds()
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/start_pulling(atom/movable/AM, state, force, show_message)
|
||||
. = ..()
|
||||
if(fillers)
|
||||
for(var/i in 1 to width)
|
||||
var/obj/airlock_filler_object/filler = fillers[i]
|
||||
filler.density = FALSE
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/stop_pulling()
|
||||
. = ..()
|
||||
if(fillers)
|
||||
for(var/i in 1 to width)
|
||||
var/obj/airlock_filler_object/filler = fillers[i]
|
||||
filler.density = TRUE
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/proc/update_bounds()
|
||||
if(width <= 1)
|
||||
return
|
||||
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
bound_y = 0
|
||||
pixel_y = 0
|
||||
if(dir == WEST)
|
||||
bound_x = -(width - 1) * world.icon_size
|
||||
pixel_x = -(width - 1) * world.icon_size
|
||||
else
|
||||
bound_x = 0
|
||||
pixel_x = 0
|
||||
|
||||
else
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
bound_x = 0
|
||||
pixel_x = 0
|
||||
if(dir == SOUTH)
|
||||
bound_y = -(width - 1) * world.icon_size
|
||||
pixel_y = -(width - 1) * world.icon_size
|
||||
else
|
||||
bound_y = 0
|
||||
pixel_y = 0
|
||||
|
||||
QDEL_LIST_CONTENTS(fillers)
|
||||
LAZYINITLIST(fillers)
|
||||
|
||||
var/obj/last_filler = src
|
||||
for(var/i in 1 to width)
|
||||
var/obj/airlock_filler_object/filler
|
||||
|
||||
if(length(fillers) < i)
|
||||
filler = new(src)
|
||||
filler.pair_assembly(src)
|
||||
fillers += filler
|
||||
else
|
||||
filler = fillers[i]
|
||||
|
||||
filler.loc = get_step(last_filler, dir)
|
||||
filler.set_opacity(opacity)
|
||||
|
||||
last_filler = filler
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult
|
||||
name = "cult airlock assembly"
|
||||
|
||||
Reference in New Issue
Block a user