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

Alarms #167

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all 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: 9 additions & 5 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()
// 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()
// 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()
// 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()
// 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()
// soundloop.stop() //MASSMETA EDIT REMOVAL

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

correct_state()

// 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
5 changes: 5 additions & 0 deletions code/game/machinery/firealarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@
/obj/machinery/firealarm/proc/set_status()
if(!(my_area.fire || LAZYLEN(my_area.active_firelocks)) || (obj_flags & EMAGGED))
soundloop.stop()
// MASSMETA EDIT ADDITION START
else
soundloop.start()
// MASSMETA EDIT ADDITION END
update_appearance()

/obj/machinery/firealarm/update_appearance(updates)
Expand Down Expand Up @@ -252,6 +256,7 @@
return

if(my_area.fire)
soundloop.start() // MASSMETA EDIT ADDITION
return //area alarm already active
my_area.alarm_manager.send_alarm(ALARM_FIRE, my_area)
// This'll setup our visual effects, so we only need to worry about the alarm
Expand Down
Loading