mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
* Fixes security level alerts playing the incorrect sounds * Fixes the merge conflict * Slightly improves the code on our end, adds the documentation that we were now missing Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
87 lines
2.7 KiB
Plaintext
87 lines
2.7 KiB
Plaintext
/**
|
|
* Security levels
|
|
*
|
|
* These are used by the security level subsystem. Each one of these represents a security level that a player can set.
|
|
*
|
|
* Base type is abstract
|
|
*/
|
|
|
|
/datum/security_level
|
|
/// The name of this security level.
|
|
var/name = "not set"
|
|
/// The numerical level of this security level, see defines for more information.
|
|
var/number_level = -1
|
|
/// The sound that we will play when this security level is set
|
|
var/sound
|
|
/// The looping sound that will be played while the security level is set
|
|
var/looping_sound
|
|
/// The looping sound interval
|
|
var/looping_sound_interval
|
|
/// The shuttle call time modification of this security level
|
|
var/shuttle_call_time_mod = 0
|
|
/// Our announcement when lowering to this level
|
|
var/lowering_to_announcement
|
|
/// Our announcement when elevating to this level
|
|
var/elevating_to_announcemnt
|
|
/// Our configuration key for lowering to text, if set, will override the default lowering to announcement.
|
|
var/lowering_to_configuration_key
|
|
/// Our configuration key for elevating to text, if set, will override the default elevating to announcement.
|
|
var/elevating_to_configuration_key
|
|
|
|
/datum/security_level/New()
|
|
. = ..()
|
|
if(lowering_to_configuration_key) // I'm not sure about you, but isn't there an easier way to do this?
|
|
lowering_to_announcement = global.config.Get(lowering_to_configuration_key)
|
|
if(elevating_to_configuration_key)
|
|
elevating_to_announcemnt = global.config.Get(elevating_to_configuration_key)
|
|
|
|
/**
|
|
* GREEN
|
|
*
|
|
* No threats
|
|
*/
|
|
/datum/security_level/green
|
|
name = "green"
|
|
sound = 'sound/misc/notice2.ogg' // Friendly beep
|
|
number_level = SEC_LEVEL_GREEN
|
|
lowering_to_configuration_key = /datum/config_entry/string/alert_green
|
|
shuttle_call_time_mod = 2
|
|
|
|
/**
|
|
* BLUE
|
|
*
|
|
* Caution advised
|
|
*/
|
|
/datum/security_level/blue
|
|
name = "blue"
|
|
sound = 'sound/misc/notice1.ogg' // Angry alarm
|
|
number_level = SEC_LEVEL_BLUE
|
|
lowering_to_configuration_key = /datum/config_entry/string/alert_blue_downto
|
|
elevating_to_configuration_key = /datum/config_entry/string/alert_blue_upto
|
|
shuttle_call_time_mod = 1
|
|
|
|
/**
|
|
* RED
|
|
*
|
|
* Hostile threats
|
|
*/
|
|
/datum/security_level/red
|
|
name = "red"
|
|
sound = 'sound/misc/notice1.ogg' // The same angry alarm
|
|
number_level = SEC_LEVEL_RED
|
|
lowering_to_configuration_key = /datum/config_entry/string/alert_red_downto
|
|
elevating_to_configuration_key = /datum/config_entry/string/alert_red_upto
|
|
shuttle_call_time_mod = 0.5
|
|
|
|
/**
|
|
* DELTA
|
|
*
|
|
* Station destruction is imminent
|
|
*/
|
|
/datum/security_level/delta
|
|
name = "delta"
|
|
sound = 'sound/misc/notice1.ogg' // The same angry alarm, again
|
|
number_level = SEC_LEVEL_DELTA
|
|
elevating_to_configuration_key = /datum/config_entry/string/alert_delta
|
|
shuttle_call_time_mod = 0.25
|