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

@@ -848,7 +848,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
else
SSshuttle.emergency.canRecall = FALSE
if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED)
if(SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED)
SSshuttle.emergency.request(coefficient = 0.5, redAlert = TRUE)
else
SSshuttle.emergency.request()