mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-20 23:31:04 +00:00
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:
@@ -15,7 +15,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
|
||||
|
||||
/datum/event/traders/fake_announce()
|
||||
. = TRUE
|
||||
if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED)
|
||||
if(SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED)
|
||||
GLOB.minor_announcement.Announce("A trading shuttle from Jupiter Station has been denied docking permission due to the heightened security alert aboard [station_name()].", "Trader Shuttle Docking Request Refused")
|
||||
return
|
||||
GLOB.minor_announcement.Announce("A trading shuttle from Jupiter Station has been granted docking permission at [station_name()] arrivals port 4.", "Trader Shuttle Docking Request Accepted")
|
||||
@@ -24,7 +24,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
|
||||
/datum/event/traders/start()
|
||||
if(!station) // If there are no unused stations, just no.
|
||||
return
|
||||
if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED)
|
||||
if(SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED)
|
||||
GLOB.minor_announcement.Announce("A trading shuttle from Jupiter Station has been denied docking permission due to the heightened security alert aboard [station_name()].", "Trader Shuttle Docking Request Refused")
|
||||
// if the docking request was refused, fire another major event in 60 seconds
|
||||
var/datum/event_container/EC = SSevents.event_containers[EVENT_LEVEL_MAJOR]
|
||||
|
||||
Reference in New Issue
Block a user