Skip to content

Commit

Permalink
Fix early return in airlock engineering override (#2212)
Browse files Browse the repository at this point in the history
* move override early returns

* fix CI on abductor airlock

Co-authored-by: lessthanthree <[email protected]>
  • Loading branch information
Steals-The-PRs and lessthnthree authored Mar 1, 2024
1 parent 6deefac commit 384f06b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Binary file not shown.
15 changes: 7 additions & 8 deletions modular_nova/modules/airlock_override/code/airlock_override.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@
///When the signal is received of a changed security level, check if it's orange.
/obj/machinery/door/airlock/check_security_level(datum/source, level)
. = ..()
var/area/source_area = get_area(src)
if(!source_area.engineering_override_eligible)
if(!door_area.engineering_override_eligible)
return

if(isnull(req_access) && isnull(req_one_access)) // no restrictions, no problem
Expand Down Expand Up @@ -161,6 +160,9 @@ GLOBAL_VAR_INIT(force_eng_override, FALSE)
/obj/machinery/door/airlock/proc/force_eng_override(datum/source, status)
SIGNAL_HANDLER

if(!door_area.engineering_override_eligible)
return

if(isnull(req_access) && isnull(req_one_access)) // no restrictions, no problem
return

Expand All @@ -170,9 +172,6 @@ GLOBAL_VAR_INIT(force_eng_override, FALSE)
update_appearance()
return

if(!door_area.engineering_override_eligible)
return

normalspeed = FALSE
update_appearance()

Expand All @@ -188,6 +187,9 @@ GLOBAL_VAR_INIT(force_eng_override, FALSE)
/obj/machinery/door/airlock/proc/update_fire_status(datum/source, fire)
SIGNAL_HANDLER

if(!door_area.engineering_override_eligible)
return

if(isnull(req_access) && isnull(req_one_access)) // no restrictions, no problem
return

Expand All @@ -197,9 +199,6 @@ GLOBAL_VAR_INIT(force_eng_override, FALSE)
update_appearance()
return

if(!door_area.engineering_override_eligible)
return

normalspeed = FALSE
update_appearance()

Expand Down

0 comments on commit 384f06b

Please sign in to comment.