Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Artemchik542 <32270644+Artemchik542@users.noreply.github.com>
  • Loading branch information
Huz2e and Artemchik542 authored Jul 29, 2024
1 parent 2160a1a commit 7b6f22b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
18 changes: 11 additions & 7 deletions code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
/obj/machinery/door/firedoor/proc/start_activation_process(code = FIRELOCK_ALARM_TYPE_GENERIC)
if(active)
return //We're already active
// soundloop.start() - MASSMETA EDIT DELETION
// soundloop.start() //MASSMETA EDIT REMOVAL
is_playing_alarm = TRUE
my_area.fault_status = AREA_FAULT_AUTOMATIC
my_area.fault_location = name
Expand All @@ -342,7 +342,7 @@
* in the merge group datum. sets our alarm type to null, signifying no alarm.
*/
/obj/machinery/door/firedoor/proc/start_deactivation_process()
// soundloop.stop() - MASSMETA EDIT DELETION
// soundloop.stop() //MASSMETA EDIT REMOVAL
is_playing_alarm = FALSE
my_area.fault_status = AREA_FAULT_NONE
my_area.fault_location = null
Expand Down Expand Up @@ -397,7 +397,7 @@
alarm_type = null
active = FALSE
remove_as_source()
// soundloop.stop() - MASSMETA EDIT DELETION
// soundloop.stop() //MASSMETA EDIT REMOVAL
is_playing_alarm = FALSE
update_appearance(UPDATE_ICON) //Sets the door lights even if the door doesn't move.
correct_state()
Expand All @@ -414,7 +414,7 @@
if(!length(issue_turfs)) // Generic alarms get out
alarm_type = null

// soundloop.stop() - MASSMETA EDIT DELETION
// soundloop.stop() //MASSMETA EDIT REMOVAL
is_playing_alarm = FALSE
remove_as_source()
update_appearance(UPDATE_ICON) //Sets the door lights even if the door doesn't move.
Expand Down Expand Up @@ -469,15 +469,19 @@
/obj/machinery/door/firedoor/proc/on_power_loss()
SIGNAL_HANDLER

// soundloop.stop() - MASSMETA EDIT DELETION
// soundloop.stop() //MASSMETA EDIT REMOVAL

/obj/machinery/door/firedoor/proc/on_power_restore()
SIGNAL_HANDLER

correct_state()

// if(is_playing_alarm) - MASSMETA EDIT DELETION
// soundloop.start()
// MASSMETA EDIT REMOVAL BEGIN
/*
if(is_playing_alarm)
soundloop.start()
*/
// MASSMETA EDIT REMOVAL END


/obj/machinery/door/firedoor/attack_hand(mob/living/user, list/modifiers)
Expand Down
6 changes: 4 additions & 2 deletions code/game/machinery/firealarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@
/obj/machinery/firealarm/proc/set_status()
if(!(my_area.fire || LAZYLEN(my_area.active_firelocks)) || (obj_flags & EMAGGED))
soundloop.stop()
else // MASSMETA EDIT ADDITION START
soundloop.start() // MASSMETA EDIT ADDITION END
// MASSMETA EDIT ADDITION START
else
soundloop.start()
// MASSMETA EDIT ADDITION END
update_appearance()

/obj/machinery/firealarm/update_appearance(updates)
Expand Down

0 comments on commit 7b6f22b

Please sign in to comment.