security_level

Vars | |
available_levels | Associative list of security level names -> datums |
---|---|
current_security_level | Currently set security level |
Procs | |
get_current_level_as_number | Returns the current security level as a number |
get_current_level_as_text | Returns the current security level as text |
number_level_to_text | Converts a number security level to a text |
set_level | Sets a new security level as our current level. This is how anything should be changing the security level. |
text_level_to_number | Converts a text security level to a number |
Var Details
available_levels

Associative list of security level names -> datums
current_security_level

Currently set security level
Proc Details
get_current_level_as_number
Returns the current security level as a number
get_current_level_as_text
Returns the current security level as text
number_level_to_text
Converts a number security level to a text
Arguments:
- level - The number security level to convert
set_level
Sets a new security level as our current level. This is how anything should be changing the security level.
Returns TRUE
if there's a change in the level, FALSE
otherwise.
Produces a signal: COMSIG_SECURITY_LEVEL_CHANGED. Can use it for world objects that react to the security level being updated. (red lights, etc)
Arguments:
- new_level - The new security level that will become our current level
- announce - Play the announcement, set to FALSE if you're doing your own custom announcement to prevent duplicates
text_level_to_number
Converts a text security level to a number
Arguments:
- level - The text security level to convert