Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Door Speed #3883

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions _maps/shuttles/independent/independent_shetland.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Engineering";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/turf_decal/industrial/warning/fulltile,
Expand All @@ -647,7 +647,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Engineering";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/machinery/door/firedoor/border_only{
Expand Down Expand Up @@ -1727,7 +1727,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Engine Room";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/turf_decal/industrial/warning/fulltile,
Expand Down Expand Up @@ -2062,7 +2062,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Engineering";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/turf_decal/industrial/warning/fulltile,
Expand Down Expand Up @@ -2323,7 +2323,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Engineering";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/turf_decal/industrial/warning/fulltile,
Expand Down Expand Up @@ -3861,7 +3861,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Engine Room";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/turf_decal/industrial/warning/fulltile,
Expand Down Expand Up @@ -4379,7 +4379,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Electrical";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/turf_decal/industrial/warning/fulltile,
Expand Down
4 changes: 2 additions & 2 deletions _maps/shuttles/inteq/inteq_talos.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Engineering";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/turf_decal/industrial/warning/fulltile,
Expand Down Expand Up @@ -1614,7 +1614,7 @@
/obj/machinery/door/airlock/engineering{
dir = 4;
name = "Engineering";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/turf_decal/industrial/warning/fulltile,
Expand Down
16 changes: 8 additions & 8 deletions _maps/shuttles/syndicate/syndicate_ngr_derecho.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
/obj/machinery/door/airlock/hatch{
dir = 4;
name = "Command Deck";
normalspeed = 0;
fast_close = 1;
req_access_txt = "19"
},
/turf/open/floor/plasteel/tech/grid,
Expand Down Expand Up @@ -197,7 +197,7 @@
"bW" = (
/obj/machinery/door/airlock/hatch{
name = "Foreman's Office";
normalspeed = 0;
fast_close = 1;
req_access_txt = "56"
},
/turf/open/floor/plasteel/tech/grid,
Expand Down Expand Up @@ -826,7 +826,7 @@
/obj/machinery/door/airlock/hatch{
dir = 4;
name = "Life Support";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/decal/cleanable/dirt,
Expand Down Expand Up @@ -1534,7 +1534,7 @@
/obj/machinery/door/airlock/hatch{
dir = 1;
name = "Engineering";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/effect/decal/cleanable/dirt,
Expand Down Expand Up @@ -2170,7 +2170,7 @@
/obj/machinery/door/airlock/hatch{
dir = 4;
name = "Control Room";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/turf/open/floor/plasteel/tech/grid,
Expand Down Expand Up @@ -2834,7 +2834,7 @@
"xQ" = (
/obj/machinery/door/airlock/hatch{
name = "Foreman's Office";
normalspeed = 0;
fast_close = 1;
req_access_txt = "56"
},
/obj/machinery/door/firedoor/border_only{
Expand Down Expand Up @@ -3243,7 +3243,7 @@
/obj/machinery/door/airlock/hatch{
dir = 4;
name = "Bridge";
normalspeed = 0;
fast_close = 1;
req_access_txt = "19"
},
/turf/open/floor/plasteel/tech/grid,
Expand Down Expand Up @@ -5547,7 +5547,7 @@
/obj/machinery/door/airlock/hatch{
dir = 4;
name = "Command Deck";
normalspeed = 0;
fast_close = 1;
req_access_txt = "19"
},
/obj/structure/sign/directions/command{
Expand Down
14 changes: 7 additions & 7 deletions _maps/shuttles/syndicate/syndicate_ngr_kaliandhi.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@
/obj/machinery/door/airlock/hatch{
dir = 8;
name = "Armory";
normalspeed = 0;
fast_close = 1;
req_access = list(3)
},
/obj/machinery/door/firedoor/border_only{
Expand Down Expand Up @@ -2169,7 +2169,7 @@
"oc" = (
/obj/machinery/door/airlock/hatch{
name = "Bridge";
normalspeed = 0;
fast_close = 1;
req_access_txt = "19"
},
/obj/machinery/door/firedoor/border_only{
Expand Down Expand Up @@ -3156,7 +3156,7 @@
/obj/machinery/door/airlock/hatch{
dir = 8;
name = "Armory";
normalspeed = 0;
fast_close = 1;
req_access = list(3)
},
/obj/structure/cable{
Expand Down Expand Up @@ -5536,7 +5536,7 @@
},
/obj/machinery/door/airlock/hatch{
name = "Control Room";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2{
Expand Down Expand Up @@ -5865,7 +5865,7 @@
"MS" = (
/obj/machinery/door/airlock/hatch{
name = "Command Deck";
normalspeed = 0;
fast_close = 1;
req_access_txt = "19"
},
/obj/structure/cable{
Expand Down Expand Up @@ -5905,7 +5905,7 @@
/obj/machinery/door/airlock/hatch{
dir = 4;
name = "Engineering";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/structure/cable{
Expand Down Expand Up @@ -7629,7 +7629,7 @@
},
/obj/machinery/door/airlock/hatch{
name = "Life Support";
normalspeed = 0;
fast_close = 1;
req_access_txt = "10"
},
/obj/machinery/door/firedoor/border_only,
Expand Down
4 changes: 2 additions & 2 deletions code/datums/wires/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
status += "The AI connection light is [A.aiControlDisabled || (A.obj_flags & EMAGGED) ? "off" : "on"]."
status += "The check wiring light is [A.safe ? "off" : "on"]."
status += "The timer is powered [A.autoclose ? "on" : "off"]."
status += "The speed light is [A.normalspeed ? "on" : "off"]."
status += "The speed light is [A.fast_close ? "on" : "off"]."
status += "The emergency light is [A.emergency ? "on" : "off"]."
return status

Expand Down Expand Up @@ -94,7 +94,7 @@
if(!A.density)
A.close()
if(WIRE_TIMING)
A.normalspeed = !A.normalspeed
A.fast_close = !A.fast_close
if(WIRE_LIGHT)
A.lights = !A.lights
A.update_appearance()
Expand Down
10 changes: 6 additions & 4 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@
autoclose = TRUE
secondsElectrified = MACHINE_NOT_ELECTRIFIED //How many seconds remain until the door is no longer electrified. -1/MACHINE_ELECTRIFIED_PERMANENT = permanently electrified until someone fixes it.
assemblytype = /obj/structure/door_assembly
normalspeed = 1
fast_close = FALSE
explosion_block = 1
hud_possible = list(DIAG_AIRLOCK_HUD)
req_ship_access = TRUE

close_speed = 150

smoothing_groups = list(SMOOTH_GROUP_AIRLOCK)

FASTDMM_PROP(\
Expand Down Expand Up @@ -1260,7 +1262,7 @@
playsound(src, pry_open_sound, 30, TRUE, mono_adj = TRUE)

if(autoclose)
autoclose_in(normalspeed ? 150 : 15)
autoclose_in(fast_close ? clamp(close_speed/10, 10, 300) : close_speed)

if(!density)
return TRUE
Expand Down Expand Up @@ -1565,7 +1567,7 @@
data["locked"] = locked // bolted
data["lights"] = lights // bolt lights
data["safe"] = safe // safeties
data["speed"] = normalspeed // safe speed
data["operation speed"] = fast_close // safe speed
data["welded"] = welded // welded
data["opened"] = !density // opened

Expand Down Expand Up @@ -1633,7 +1635,7 @@
safe = !safe
. = TRUE
if("speed-toggle")
normalspeed = !normalspeed
fast_close = !fast_close
. = TRUE
if("open-close")
user_toggle_open(usr)
Expand Down
15 changes: 15 additions & 0 deletions code/game/machinery/doors/airlock_electronics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
name = "airlock electronics"
req_access = list(ACCESS_MAINT_TUNNELS)
custom_price = 50
///how fast the constructed airlock will close
var/close_speed = 15 SECONDS
/// A list of all granted accesses
var/list/accesses = list()
/// If the airlock should require ALL or only ONE of the listed accesses
Expand Down Expand Up @@ -47,6 +49,7 @@

/obj/item/electronics/airlock/ui_data()
var/list/data = list()
data["close_speed"] = close_speed
data["accesses"] = accesses
data["oneAccess"] = one_access
data["unres_direction"] = unres_sides
Expand Down Expand Up @@ -91,6 +94,18 @@
return
accesses -= get_region_accesses(region)
. = TRUE
if("close_speed")
var/tune = params["tune"]
var/adjust = text2num(params["adjust"])
if(adjust)
tune = close_speed + adjust * 10
. = TRUE
else if(text2num(tune) != null)
tune = tune * 10
Erikafox marked this conversation as resolved.
Show resolved Hide resolved
. = TRUE
if(.)
close_speed = clamp(tune, 0, 300)
. = TRUE

/obj/item/electronics/airlock/ui_host()
if(holder)
Expand Down
7 changes: 5 additions & 2 deletions code/game/machinery/doors/door.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
var/operating = FALSE
var/glass = FALSE
var/welded = FALSE
var/normalspeed = 1
///does this airlock close quickly
var/fast_close = 0
///how many seconds should this door close after, if it is autoclosing
var/close_speed = 60
Erikafox marked this conversation as resolved.
Show resolved Hide resolved
var/heat_proof = FALSE // For rglass-windowed airlocks and firedoors
var/emergency = FALSE // Emergency access override
var/sub_door = FALSE // true if it's meant to go under another door.
Expand Down Expand Up @@ -353,7 +356,7 @@
for(var/atom/movable/M in get_turf(src))
if(M.density && M != src) //something is blocking the door
if(autoclose)
autoclose_in(60)
autoclose_in(fast_close ? close_speed/10 : close_speed)
return

operating = TRUE
Expand Down
Loading
Loading