Refactor: refactor security levels (#21899)

* refactor: datumize security levels

* refactor: implement `SSsecurity_level` for handling security level related stuff

* feat: returns back old `delta_alarm` sound

* refactor: adjust existing code to use `SSsecurity_level`

* fix: remove redundunt new init order

* fix: fix type in var

* refactor: apply reviewer changes

* fix: replace `can_fire=FALSE` with `ss_flags = SS_NO_FIRE`, as subsystem will never fire

* fix: use `flags` instead of `ss_flags` for subsystem

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* fix: replace old security level interactions

* feat: implement `Recover` proc for `SSsecurity_level`

* refactor: add clearer doc for `security_level_set_timer_id`  propery of `SSsecurirt_level`

* refactor: swap `security_level` datum properties to make it clearer to read

* refactor: move initialization code from `New` to `Initialize` for `/obj/machinery/firealarm`

* fix: revert back `delta_alarm` annoing sound, use `delta_claxon` on change to delta security level

---------

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Gaxeer
2023-10-14 22:46:49 +03:00
committed by GitHub
parent 6a2704a3ad
commit eda2102bdc
29 changed files with 450 additions and 321 deletions

View File

@@ -37,12 +37,12 @@
ai_announcer.author = "AI-NAME-0345"
ai_announcer.Announce("AI only get one input box so here ya go")
set_security_level(SEC_LEVEL_RED)
set_security_level(SEC_LEVEL_GAMMA)
set_security_level(SEC_LEVEL_EPSILON)
set_security_level(SEC_LEVEL_RED)
set_security_level(SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_GREEN)
SSsecurity_level.set_level(SEC_LEVEL_RED)
SSsecurity_level.set_level(SEC_LEVEL_GAMMA)
SSsecurity_level.set_level(SEC_LEVEL_EPSILON)
SSsecurity_level.set_level(SEC_LEVEL_RED)
SSsecurity_level.set_level(SEC_LEVEL_BLUE)
SSsecurity_level.set_level(SEC_LEVEL_GREEN)
var/reason = "We're getting the fuck out of here"
var/redAlert = TRUE