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

Make crew monitors beep when someone dies / crits #2930

Merged
merged 11 commits into from
Feb 11, 2025

Conversation

Quanteey
Copy link
Contributor

@Quanteey Quanteey commented Feb 8, 2025

About the PR

This PR makes the handheld crew monitor and the crew monitoring console play a beeping sound in a small radius whenever a crew member with appropriate sensors enabled dies. This change does not affect the spy and syndicate crew monitors, and the alert behavior can be enabled / disabled in the YAML prototypes.

Alerts are issued whenever a crew member goes into critical / dead state, and no further alerts will be issued for that specific crew member until they get out of dead / critical state. A 15 second cooldown is in place between two alerts to reduce spam. Alerts require the monitor to be powered.

Why / Balance

Paramedics are expected to respond immediately when someone goes critical / dies. However, there is currently no system in place to actively alert them when that happens. This leaves paramedics either staring at the monitor for pretty much 2 hours, which is not optimal gameplay-wise, or checking every minute or two, which is not very efficient.

This change solves this issue altogether, allowing them to do other activities during downtime without having to worry about missing someone dying.

Technical details

Modified CrewMonitoringConsoleComponent to store a HashSet of crew members a given monitor has already alerted for, along with frame time tracking (for the cooldown, same implementation as the Morgue). Added 3 optional DataFields for enabling / disabling alerts, configuring cooldowns, and the sound.

The main logic is in the CrewMonitoringConsoleSystem's OnPacketReceived, along a new Update override for frame time tracking.

The new audio file comes from Pixabay with a CC0 license.

Media

2025-02-08.16-34-51.mov

Requirements

  • I have tested all added content and changes.
  • I have added media to this PR or it does not require an ingame showcase.

Breaking changes

Changelog

🆑

  • tweak: The crew monitor handheld and console now beep when a crew member goes into critical condition or dies!

@Quanteey Quanteey requested review from a team as code owners February 8, 2025 16:53
@github-actions github-actions bot added S: Needs Review size/M 64-255 lines Changes: YML Changes any yml files Changes: C# Changes any cs files Changes: Audio Changes any audio files and removed S: Needs Review size/M 64-255 lines labels Feb 8, 2025
@Quanteey Quanteey force-pushed the crew-monitor-beeping branch from f05efd2 to 278d1da Compare February 8, 2025 16:56
@github-actions github-actions bot added the size/M 64-255 lines label Feb 8, 2025
@Sifb26
Copy link
Contributor

Sifb26 commented Feb 8, 2025

Does this check if the crew monitoring server is powered as well?

@Sifb26
Copy link
Contributor

Sifb26 commented Feb 8, 2025

Also direction review will be around 24 hours

@Quanteey
Copy link
Contributor Author

Quanteey commented Feb 8, 2025

Yes, this checks power from both from a power cell or station power (for the machine version). Alerting does not use power, though.

EDIT: I have misunderstood the original question. My changes do not directly check the server, but I assume if it is down the monitors will not receive packets that would trigger my logic

@Quanteey
Copy link
Contributor Author

Quanteey commented Feb 9, 2025

Requested changes are completed and tested.

@ShepardToTheStars
Copy link
Contributor

ShepardToTheStars commented Feb 9, 2025

Actually, I have some questions:

  1. Would it be better to use something like the Atmos console alerting? With a visual indicator rather than sound. First one is no alarms, 2nd is at least one alarm (and its blinking). There's a warning state as well but not really relevant.
    image
    image

  2. Is there a way to turn off the sound? Like, in situations with nukies or zombies, where they are crew members that likely will not be recovered, it may be a bit grating on the ears to hear the beeping every 15 seconds for the remainder of the round.

@Quanteey
Copy link
Contributor Author

Quanteey commented Feb 9, 2025

To address your questions:

  1. I don't think so. Remember, we are not just talking about the crew monitoring console, but also the handheld item that every paramed spawns with. Most maps do not have an accessible crew monitoring console, and even though it is common for the CMO to move their console to an accessible location, this is not a guarantee, so limiting the alerts to just the console would be inconvenient. Giving this functionality to the handhelds would also allow parameds to move freely instead of having to stay at the console.
    Even if the handheld also had a visual alert too, there is a high chance that it would be missed if the paramed is talking with people and roleplaying, which is exactly what we want to avoid.

  2. It wouldn't be every 15 seconds though, unless there is actually a new person dying every 15 seconds. But, good call. No idea how the toggling should be implemented gameplay-wise.

@deltanedas
Copy link
Member

the paramed is talking with people and roleplaying, which is exactly what we want to avoid.

true, no rp allowed for parameds :trollface:

Lyndomen
Lyndomen previously approved these changes Feb 9, 2025
@Sifb26
Copy link
Contributor

Sifb26 commented Feb 9, 2025

Direction approved.
EDIT: I didn’t see Lyndo’s approval:Godo:

@Quanteey Quanteey requested a review from deltanedas February 10, 2025 12:50
@Quanteey
Copy link
Contributor Author

Quanteey commented Feb 10, 2025

Requested changes are made and tested. Actually using future timestamps now for the cooldown.
Since direction approved I guess this could be merged as-is (without the alert toggling). Considering the alert cooldown and the small range where this can be heard, I'd say this won't be too annoying. If it is I could always implement toggling in a separate PR.

@ShepardToTheStars
Copy link
Contributor

The toggle is already implemented though! Just remove battery from handheld or unanchor the console. :blunt:

@Quanteey
Copy link
Contributor Author

Also that.

@deltanedas deltanedas enabled auto-merge (squash) February 11, 2025 08:27
@deltanedas deltanedas merged commit ca4db5d into DeltaV-Station:master Feb 11, 2025
14 checks passed
@Quanteey Quanteey deleted the crew-monitor-beeping branch February 11, 2025 08:54
@Avalon-Proto
Copy link
Contributor

Okay so I have 1 SLIGHT annoyance with this. Thanks to the fact Aghosts have the crew monitor interface, its gets QUITE annoying hearing it randomly beep at you in the middle of handling an Ahelp

@Quanteey
Copy link
Contributor Author

Okay so I have 1 SLIGHT annoyance with this. Thanks to the fact Aghosts have the crew monitor interface, its gets QUITE annoying hearing it randomly beep at you in the middle of handling an Ahelp

Ah, did not know that. That sure sounds like it's QUITE annoying. I'll make a pr with a fix for that in a few days.

deltanedas pushed a commit to deltanedas/Delta-v that referenced this pull request Feb 14, 2025
* Make the crew monitors beep when someone dies or crits

* Cleanup

* Fix a comment that was not updated earlier.

Signed-off-by: Quanteey <[email protected]>

* Switch frame time tracking to using timespans

* use timestamps of next alert instead of frame time tracking

* Fix outdated docs

---------

Signed-off-by: Quanteey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Audio Changes any audio files Changes: C# Changes any cs files Changes: YML Changes any yml files S: Needs Review size/M 64-255 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants