Skip to content

Security Levels & Announcements minor rework

Firartix requested to merge mekkiti/colonial-warfare:secalert_refactor into dev

Changelog

🆑 Firartix

rscadd: Refactored and slightly reworked security levels - Delta Alert is now explicitly starting when hijacked dropship crashes, rather than when enabling Self Destruct. For all intents and purposes in code, this is still the same as Red Alert, and just RP fluff (SOP/ML). It can't be canceled as part of regular game flow currently.

rscadd: ARES Announcement voicelines now queue and use a dedicated channel to avoid overlaps. Critical ones (eg Hijack, SD) may override others.

rscadd: The keycard auth device now flashes blue on successful ID swipe.

tweak: Lowered a few sound volumes related to announcements.

tweak: Tweaked a good part of Evac/SD and related admin tooling to work independantly of Delta alert

tweak: Tweaked switching alert level on the comm console, it's now simpler but you can only change one level each time. This is intended and would only matter for going Red to Green. Do it twice if you don't care about blue.

bugfix: Fixed a critical oopsie in sound backend that reverted delayed & repeated sounds. Sigh.

bugfix: You can't change security level to the same one anymore causing potential unintended side effects

bugfix: You can't cancel Delta Alert by using the keycard auth device anymore. Like, come on, please ?

bugfix: Swiping events on keycard auth device now actually requires usage of 2 different IDs as advertised. Please cancel that lawsuit.

bugfix: Swiping ID on keycard auth device now applies immediately, so you don't have to crazily try to in a loop wondering if it worked.

bugfix: Fixed a bunch of issues with keycard auth handling to hopefully prevent breaking it. It also only shows available events now...

bugfix: Fixed various bugs with objects handling of security levels such as not considering Delta alert as a code red+ level emergency...

bugfix: Fixed race conditions allowing incorrectly changing security levels concurrently with consoles

imageadd: Added a flashing blue icon for the keycard auth device.

/🆑

Alert refactoring & Delta alert rework

As discussed recently with staff, we realized player behavior & enforcement on server of the SOP/ML rules around Delta Alert are, uh, subject to very varying interpretation because nobody actually knows when it is.

As of current, Delta Alert actually only occurs during SD (though there is code suggesting Evac might have been intended to also be Delta Alert). With SD being disabled due to a long time unfixed bug and mapped out, this makes it useless.

On top of that, most people on the actual game have widened their definition of Delta Alert to include Hijack Crash sequence, and sometimes even the Hijack Fly period. Catch is, the game has the Delta Alert to begin with. So why not just fix it there to make everyone on the same page ?

My personal stance would be that Delta Alert is actually an averred, existential threat to the ship, as per legacy SS13 and CM code. This would mean hijack is not a delta alert at all in itself: and if it actually is warranted, the chain of command will trigger either SD or Evac, and make it one. Unfortunately, this is unpractical and too far from how most people play the game - which would make enforcing this nonsensical.

After discussion with rest of staff, we're aiming for a middleground: Delta alert automatically kicks in when dropship crashes, in place of previous Red Alert, and with very obvious notifiying. It can also still be manually triggered by staff, or if SD somehow happens at any other point.

This should at least help everyone be on the same page to work forward. I do realize this might cause issues eg. for Brig prisoners handling, in which case, i figure the SOP/ML for CM13 will be adjusted to match, but this is outside the control of this repo. Remember that, by the book, only SD is Delta currently.

This required some decoupling work because Delta Alert was previously directly tied in to SD handling.

Announcement backend changes

Most (all?) ARES announcements should now play on a dedicated sound channel. This allows to queue them, so they don't occur at same time and result into absolute gibberish. Major announcements such as Hijack or SD entirely bypass this by muting whatever else is playing.

This required fixing a simple yet critical bug with sound cause apparently nobody's ever used wait/repeat:

image

Keycard Auth Device fixes

The keycard auth device was kinda forgotten and subject to a number of bugs. It now properly requires 2 ID swipes as clearly intended and literally written on it. You can still solo swipe by stealing or forging borrowing another. Fixed a bunch of race conditions with it and some bad logic. It also now flashes blue once ID is swiped, and instantly finishes confirmation rather than leaving you confused for 2 seconds.

Merge request reports

Loading