mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
* Revert "Remove useless fillers for multitile doors (#29402)"
This reverts commit e351e69ad5.
* keep em
* now we are safe
This commit is contained in:
@@ -175,6 +175,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
|
||||
|
||||
/obj/machinery/door/airlock/Destroy()
|
||||
SStgui.close_uis(wires)
|
||||
QDEL_LIST_CONTENTS(fillers)
|
||||
QDEL_NULL(electronics)
|
||||
QDEL_NULL(wires)
|
||||
QDEL_NULL(note)
|
||||
@@ -1267,9 +1268,13 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
|
||||
update_icon(AIRLOCK_OPENING, 1)
|
||||
sleep(1)
|
||||
set_opacity(0)
|
||||
if(width > 1)
|
||||
set_fillers_opacity(0)
|
||||
update_freelook_sight()
|
||||
sleep(4)
|
||||
density = FALSE
|
||||
if(width > 1)
|
||||
set_fillers_density(FALSE)
|
||||
sleep(1)
|
||||
layer = OPEN_DOOR_LAYER
|
||||
update_icon(AIRLOCK_OPEN, 1)
|
||||
@@ -1309,12 +1314,16 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
|
||||
if(!override)
|
||||
sleep(1)
|
||||
density = TRUE
|
||||
if(width > 1)
|
||||
set_fillers_density(TRUE)
|
||||
if(!override)
|
||||
sleep(4)
|
||||
if(!safe)
|
||||
crush()
|
||||
if((visible && !glass) || polarized_on)
|
||||
set_opacity(1)
|
||||
if(width > 1)
|
||||
set_fillers_opacity(1)
|
||||
update_freelook_sight()
|
||||
sleep(1)
|
||||
update_icon(AIRLOCK_CLOSED, 1)
|
||||
@@ -1531,6 +1540,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
|
||||
electronics = null
|
||||
ae.forceMove(loc)
|
||||
ae.is_installed = FALSE
|
||||
QDEL_LIST_CONTENTS(fillers)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/door/airlock/proc/note_type() //Returns a string representing the type of note pinned to this airlock
|
||||
|
||||
@@ -671,3 +671,78 @@ MAPPING_DIRECTIONAL_HELPERS_MULTITILE(/obj/machinery/door/airlock/multi_tile/gla
|
||||
/obj/machinery/door/airlock/multi_tile/glass
|
||||
opacity = FALSE
|
||||
glass = TRUE
|
||||
|
||||
/obj/airlock_filler_object
|
||||
name = "airlock fluff"
|
||||
desc = "You shouldn't be able to see this fluff!"
|
||||
icon = null
|
||||
icon_state = null
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
anchored = TRUE
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
obj_integrity = INFINITY // our parent airlock/assembly will handle that
|
||||
//atmos_canpass = CANPASS_DENSITY
|
||||
/// The door/airlock this fluff panel is attached to
|
||||
var/obj/machinery/door/filled_airlock
|
||||
/// The assembly this fluff panel is attached to
|
||||
var/obj/structure/door_assembly/filled_assembly
|
||||
|
||||
/obj/airlock_filler_object/Destroy()
|
||||
filled_airlock = null
|
||||
filled_assembly = null
|
||||
return ..()
|
||||
|
||||
/obj/airlock_filler_object/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = TRUE, attack_dir, armour_penetration_flat = 0, armour_penetration_percentage = 0)
|
||||
if(filled_airlock)
|
||||
filled_airlock.take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir)
|
||||
else if(filled_assembly)
|
||||
filled_assembly.take_damage(damage_amount, damage_type, damage_flag, sound_effect, attack_dir)
|
||||
return ..()
|
||||
|
||||
/obj/airlock_filler_object/ex_act(severity)
|
||||
if(filled_airlock)
|
||||
filled_airlock.ex_act(severity)
|
||||
else if(filled_assembly)
|
||||
filled_assembly.ex_act(severity)
|
||||
return ..()
|
||||
|
||||
/// Multi-tile airlocks pair with a filler panel, if one goes so does the other.
|
||||
/obj/airlock_filler_object/proc/pair_airlock(obj/machinery/door/parent_airlock)
|
||||
if(isnull(parent_airlock))
|
||||
stack_trace("Attempted to pair an airlock filler with no parent airlock specified!")
|
||||
|
||||
filled_airlock = parent_airlock
|
||||
RegisterSignal(filled_airlock, COMSIG_PARENT_QDELETING, PROC_REF(no_airlock))
|
||||
|
||||
/obj/airlock_filler_object/proc/pair_assembly(obj/structure/door_assembly/parent_assembly)
|
||||
if(isnull(parent_assembly))
|
||||
stack_trace("Attempted to pair an airlock filler with no parent assembly specified!")
|
||||
|
||||
filled_assembly = parent_assembly
|
||||
RegisterSignal(filled_assembly, COMSIG_PARENT_QDELETING, PROC_REF(no_assembly))
|
||||
|
||||
/obj/airlock_filler_object/proc/no_airlock()
|
||||
UnregisterSignal(filled_airlock)
|
||||
qdel(src)
|
||||
|
||||
/obj/airlock_filler_object/proc/no_assembly()
|
||||
UnregisterSignal(filled_assembly)
|
||||
qdel(src)
|
||||
|
||||
/// Multi-tile airlocks (using a filler panel) have special handling for movables with PASS_FLAG_GLASS
|
||||
/obj/airlock_filler_object/CanPass(atom/movable/mover, border_dir)
|
||||
if(mover == filled_assembly)
|
||||
return TRUE
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
if(istype(mover))
|
||||
return !opacity
|
||||
|
||||
/obj/airlock_filler_object/singularity_act()
|
||||
return
|
||||
|
||||
/obj/airlock_filler_object/singularity_pull(S, current_size)
|
||||
return
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
var/unres_sides = 0
|
||||
//Multi-tile doors
|
||||
var/width = 1
|
||||
/// List. Player view blocking fillers for multi-tile doors.
|
||||
var/list/fillers
|
||||
//Whether nonstandard door sounds (cmag laughter) are off cooldown.
|
||||
var/sound_ready = TRUE
|
||||
var/sound_cooldown = 1 SECONDS
|
||||
@@ -54,6 +56,7 @@
|
||||
/// So explosion doesn't deal extra damage for multitile airlocks
|
||||
COOLDOWN_DECLARE(explosion_cooldown)
|
||||
|
||||
|
||||
/obj/machinery/door/Initialize(mapload)
|
||||
. = ..()
|
||||
set_init_door_layer()
|
||||
@@ -88,7 +91,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/door/ex_act()
|
||||
if(width > 1)
|
||||
if(width > 1 && fillers)
|
||||
if(!COOLDOWN_FINISHED(src, explosion_cooldown))
|
||||
return
|
||||
COOLDOWN_START(src, explosion_cooldown, 1 SECONDS)
|
||||
@@ -382,12 +385,18 @@
|
||||
recalculate_atmos_connectivity()
|
||||
do_animate("opening")
|
||||
set_opacity(0)
|
||||
if(width > 1)
|
||||
set_fillers_opacity(0)
|
||||
sleep(5)
|
||||
density = FALSE
|
||||
if(width > 1)
|
||||
set_fillers_density(FALSE)
|
||||
sleep(5)
|
||||
layer = initial(layer)
|
||||
update_icon()
|
||||
set_opacity(0)
|
||||
if(width > 1)
|
||||
set_fillers_opacity(0)
|
||||
operating = NONE
|
||||
update_freelook_sight()
|
||||
if(autoclose)
|
||||
@@ -414,10 +423,14 @@
|
||||
layer = closingLayer
|
||||
sleep(5)
|
||||
density = TRUE
|
||||
if(width > 1)
|
||||
set_fillers_density(TRUE)
|
||||
sleep(5)
|
||||
update_icon()
|
||||
if(!glass || polarized_on)
|
||||
set_opacity(TRUE)
|
||||
if(width > 1)
|
||||
set_fillers_opacity(TRUE)
|
||||
operating = NONE
|
||||
recalculate_atmos_connectivity()
|
||||
update_freelook_sight()
|
||||
@@ -429,12 +442,9 @@
|
||||
|
||||
/obj/machinery/door/proc/get_airlock_turfs()
|
||||
var/list/airlock_turfs = list(get_turf(src))
|
||||
if(width > 1)
|
||||
var/turf/last_turf = get_turf(src)
|
||||
for(var/i in width - 1)
|
||||
var/turf/next_turf = get_step(last_turf, dir)
|
||||
airlock_turfs |= next_turf
|
||||
last_turf = next_turf
|
||||
if(width > 1 && fillers)
|
||||
for(var/obj/F in fillers)
|
||||
airlock_turfs |= get_turf(F)
|
||||
return airlock_turfs
|
||||
|
||||
/obj/machinery/door/proc/check_for_mobs()
|
||||
@@ -542,11 +552,15 @@
|
||||
/**
|
||||
* Sets the bounds of the airlock. For use with multi-tile airlocks.
|
||||
* If the airlock is multi-tile, it will set the bounds to be the size of the airlock.
|
||||
* If the airlock doesn't already have fillers, it will create them.
|
||||
* If the airlock already has fillers, it will move them to the correct location.
|
||||
*/
|
||||
/obj/machinery/door/proc/update_bounds()
|
||||
if(width <= 1)
|
||||
return
|
||||
|
||||
QDEL_LIST_CONTENTS(fillers)
|
||||
|
||||
if(dir in list(EAST, WEST))
|
||||
bound_width = width * world.icon_size
|
||||
bound_height = world.icon_size
|
||||
@@ -571,6 +585,39 @@
|
||||
bound_y = 0
|
||||
pixel_y = 0
|
||||
|
||||
LAZYINITLIST(fillers)
|
||||
|
||||
var/obj/last_filler = src
|
||||
for(var/i in 1 to width - 1)
|
||||
var/obj/airlock_filler_object/filler
|
||||
|
||||
if(length(fillers) < i)
|
||||
filler = new(src)
|
||||
filler.pair_airlock(src)
|
||||
fillers.Add(filler)
|
||||
else
|
||||
filler = fillers[i]
|
||||
|
||||
filler.loc = get_step(last_filler, dir)
|
||||
filler.density = density
|
||||
filler.set_opacity(opacity)
|
||||
|
||||
last_filler = filler
|
||||
|
||||
/obj/machinery/door/proc/set_fillers_density(density)
|
||||
if(!length(fillers))
|
||||
return
|
||||
|
||||
for(var/obj/airlock_filler_object/filler as anything in fillers)
|
||||
filler.density = density
|
||||
|
||||
/obj/machinery/door/proc/set_fillers_opacity(opacity)
|
||||
if(!length(fillers))
|
||||
return
|
||||
|
||||
for(var/obj/airlock_filler_object/filler as anything in fillers)
|
||||
filler.set_opacity(opacity)
|
||||
|
||||
#define MAX_FOAM_LEVEL 5
|
||||
// Adds foam to the airlock, which will block it from being opened
|
||||
/obj/machinery/door/proc/foam_up()
|
||||
|
||||
@@ -136,10 +136,11 @@
|
||||
icon = 'icons/obj/doors/airlocks/glass_large/glass_large.dmi'
|
||||
base_name = "large airlock"
|
||||
overlays_file = 'icons/obj/doors/airlocks/glass_large/overlays.dmi'
|
||||
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
|
||||
var/width = 2
|
||||
|
||||
/obj/structure/door_assembly/multi_tile/Initialize(mapload, direction)
|
||||
. = ..()
|
||||
@@ -179,6 +180,25 @@
|
||||
bound_y = 0
|
||||
pixel_y = 0
|
||||
|
||||
QDEL_LIST_CONTENTS(fillers)
|
||||
LAZYINITLIST(fillers)
|
||||
|
||||
var/obj/last_filler = src
|
||||
for(var/i in 1 to width - 1)
|
||||
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"
|
||||
icon = 'icons/obj/doors/airlocks/cult/runed/cult.dmi'
|
||||
|
||||
Reference in New Issue
Block a user