mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
@@ -5,9 +5,12 @@
|
||||
|
||||
// Security levels.
|
||||
#define SEC_LEVEL_GREEN 0
|
||||
#define SEC_LEVEL_BLUE 1
|
||||
#define SEC_LEVEL_RED 2
|
||||
#define SEC_LEVEL_DELTA 3
|
||||
#define SEC_LEVEL_YELLOW 1
|
||||
#define SEC_LEVEL_VIOLET 2
|
||||
#define SEC_LEVEL_ORANGE 3
|
||||
#define SEC_LEVEL_BLUE 4
|
||||
#define SEC_LEVEL_RED 5
|
||||
#define SEC_LEVEL_DELTA 6
|
||||
|
||||
#define BE_TRAITOR 0x1
|
||||
#define BE_OPERATIVE 0x2
|
||||
|
||||
@@ -112,8 +112,14 @@ var/list/gamemode_cache = list()
|
||||
|
||||
//Alert level description
|
||||
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||
var/alert_desc_blue_upto = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted."
|
||||
var/alert_desc_blue_downto = "The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed."
|
||||
var/alert_desc_yellow_upto = "A minor security emergency has developed. Security personnel are to report to their supervisor for orders and may have weapons visible on their person. Privacy laws are still enforced."
|
||||
var/alert_desc_yellow_downto = "Code yellow procedures are now in effect. Security personnel are to report to their supervisor for orders and may have weapons visible on their person. Privacy laws are still enforced."
|
||||
var/alert_desc_violet_upto = "A major medical emergency has developed. Medical personnel are required to report to their supervisor for orders, and non-medical personnel are required to obey all relevant instructions from medical staff."
|
||||
var/alert_desc_violet_downto = "Code violet procedures are now in effect; Medical personnel are required to report to their supervisor for orders, and non-medical personnel are required to obey relevant instructions from medical staff."
|
||||
var/alert_desc_orange_upto = "A major engineering emergency has developed. Engineering personnel are required to report to their supervisor for orders, and non-engineering personnel are required to evacuate any affected areas and obey relevant instructions from engineering staff."
|
||||
var/alert_desc_orange_downto = "Code orange procedures are now in effect; Engineering personnel are required to report to their supervisor for orders, and non-engineering personnel are required to evacuate any affected areas and obey relevant instructions from engineering staff."
|
||||
var/alert_desc_blue_upto = "A major security emergency has developed. Security personnel are to report to their supervisor for orders, are permitted to search staff and facilities, and may have weapons visible on their person."
|
||||
var/alert_desc_blue_downto = "Code blue procedures are now in effect. Security personnel are to report to their supervisor for orders, are permitted to search staff and facilities, and may have weapons visible on their person."
|
||||
var/alert_desc_red_upto = "There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised."
|
||||
var/alert_desc_red_downto = "The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised."
|
||||
var/alert_desc_delta = "The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill."
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
if(!ability_prechecks(user, price))
|
||||
return
|
||||
|
||||
var/alert_target = input("Select new alert level:") in list("green", "blue", "red", "delta", "CANCEL")
|
||||
var/alert_target = input("Select new alert level:") in list("green", "yellow", "violet", "orange", "blue", "red", "delta", "CANCEL")
|
||||
if(!alert_target || !ability_pay(user, price) || alert_target == "CANCEL")
|
||||
user << "Hack Aborted"
|
||||
return
|
||||
|
||||
@@ -848,6 +848,9 @@ FIRE ALARM
|
||||
icon_state = "fire0"
|
||||
switch(seclevel)
|
||||
if("green") set_light(l_range = 2, l_power = 0.25, l_color = "#00ff00")
|
||||
if("yellow") set_light(l_range = 2, l_power = 0.25, l_color = "#ffff00")
|
||||
if("violet") set_light(l_range = 2, l_power = 0.25, l_color = "#9933ff")
|
||||
if("orange") set_light(l_range = 2, l_power = 0.25, l_color = "#ff9900")
|
||||
if("blue") set_light(l_range = 2, l_power = 0.25, l_color = "#1024A9")
|
||||
if("red") set_light(l_range = 4, l_power = 0.9, l_color = "#ff0000")
|
||||
if("delta") set_light(l_range = 4, l_power = 0.9, l_color = "#FF6633")
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
switch(security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
feedback_inc("alert_comms_green",1)
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
feedback_inc("alert_comms_yellow",1)
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
feedback_inc("alert_comms_violet",1)
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
feedback_inc("alert_comms_orange",1)
|
||||
if(SEC_LEVEL_BLUE)
|
||||
feedback_inc("alert_comms_blue",1)
|
||||
tmp_alertlevel = 0
|
||||
@@ -358,6 +364,9 @@
|
||||
dat += "<font color='red'><b>The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate.</b></font>"
|
||||
else
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_ORANGE]'>Orange</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_VIOLET]'>Violet</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_YELLOW]'>Yellow</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];operation=securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
||||
if(STATE_CONFIRM_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
|
||||
@@ -106,6 +106,12 @@
|
||||
switch(security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
feedback_inc("alert_comms_green",1)
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
feedback_inc("alert_comms_yellow",1)
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
feedback_inc("alert_comms_violet",1)
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
feedback_inc("alert_comms_orange",1)
|
||||
if(SEC_LEVEL_BLUE)
|
||||
feedback_inc("alert_comms_blue",1)
|
||||
tmp_alertlevel = 0
|
||||
@@ -382,6 +388,9 @@
|
||||
dat += "<font color='red'><b>The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate.</b></font>"
|
||||
else
|
||||
dat += "<A HREF='?src=\ref[src];securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];securitylevel;newalertlevel=[SEC_LEVEL_ORANGE]'>Orange</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];securitylevel;newalertlevel=[SEC_LEVEL_VIOLET]'>Violet</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];securitylevel;newalertlevel=[SEC_LEVEL_YELLOW]'>Yellow</A><BR>"
|
||||
dat += "<A HREF='?src=\ref[src];securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
||||
if(STATE_CONFIRM_LEVEL)
|
||||
dat += "Current alert level: [get_security_level()]<BR>"
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
var/const/STATUS_DISPLAY_TIME = 4
|
||||
var/const/STATUS_DISPLAY_CUSTOM = 99
|
||||
|
||||
var/seclevel = "green"
|
||||
|
||||
/obj/machinery/status_display/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
@@ -136,7 +138,7 @@
|
||||
update_display(line1, line2)
|
||||
return 1
|
||||
if(STATUS_DISPLAY_ALERT)
|
||||
set_picture(picture_state)
|
||||
display_alert(seclevel)
|
||||
return 1
|
||||
if(STATUS_DISPLAY_TIME)
|
||||
message1 = "TIME"
|
||||
@@ -165,6 +167,20 @@
|
||||
message2 = ""
|
||||
index2 = 0
|
||||
|
||||
/obj/machinery/status_display/proc/display_alert(var/newlevel)
|
||||
remove_display()
|
||||
if(seclevel != newlevel)
|
||||
seclevel = newlevel
|
||||
switch(seclevel)
|
||||
if("green") set_light(l_range = 2, l_power = 0.25, l_color = "#00ff00")
|
||||
if("yellow") set_light(l_range = 2, l_power = 0.25, l_color = "#ffff00")
|
||||
if("violet") set_light(l_range = 2, l_power = 0.25, l_color = "#9933ff")
|
||||
if("orange") set_light(l_range = 2, l_power = 0.25, l_color = "#ff9900")
|
||||
if("blue") set_light(l_range = 2, l_power = 0.25, l_color = "#1024A9")
|
||||
if("red") set_light(l_range = 4, l_power = 0.9, l_color = "#ff0000")
|
||||
if("delta") set_light(l_range = 4, l_power = 0.9, l_color = "#FF6633")
|
||||
set_picture("status_display_[seclevel]")
|
||||
|
||||
/obj/machinery/status_display/proc/set_picture(state)
|
||||
remove_display()
|
||||
if(!picture || picture_state != state)
|
||||
|
||||
@@ -93,6 +93,12 @@ proc/increment_ert_chance()
|
||||
while(send_emergency_team == 0) // There is no ERT at the time.
|
||||
if(get_security_level() == "green")
|
||||
ert_base_chance += 1
|
||||
if(get_security_level() == "yellow")
|
||||
ert_base_chance += 1
|
||||
if(get_security_level() == "violet")
|
||||
ert_base_chance += 2
|
||||
if(get_security_level() == "orange")
|
||||
ert_base_chance += 2
|
||||
if(get_security_level() == "blue")
|
||||
ert_base_chance += 2
|
||||
if(get_security_level() == "red")
|
||||
|
||||
@@ -919,7 +919,7 @@ var/list/admin_verbs_event_manager = list(
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
var sec_level = input(usr, "It's currently code [get_security_level()].", "Select Security Level") as null|anything in (list("green","blue","red","delta")-get_security_level())
|
||||
var sec_level = input(usr, "It's currently code [get_security_level()].", "Select Security Level") as null|anything in (list("green","yellow","violet","orange","blue","red","delta")-get_security_level())
|
||||
if(alert("Switch from code [get_security_level()] to code [sec_level]?","Change security level?","Yes","No") == "Yes")
|
||||
set_security_level(sec_level)
|
||||
log_admin("[key_name(usr)] changed the security level to code [sec_level].")
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
/var/security_level = 0
|
||||
//0 = code green
|
||||
//1 = code blue
|
||||
//2 = code red
|
||||
//3 = code delta
|
||||
//1 = code yellow
|
||||
//2 = code violet
|
||||
//3 = code orange
|
||||
//4 = code blue
|
||||
//5 = code red
|
||||
//6 = code delta
|
||||
|
||||
//config.alert_desc_blue_downto
|
||||
/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/misc/notice1.ogg'))
|
||||
@@ -12,6 +15,12 @@
|
||||
switch(level)
|
||||
if("green")
|
||||
level = SEC_LEVEL_GREEN
|
||||
if("yellow")
|
||||
level = SEC_LEVEL_YELLOW
|
||||
if("violet")
|
||||
level = SEC_LEVEL_VIOLET
|
||||
if("orange")
|
||||
level = SEC_LEVEL_ORANGE
|
||||
if("blue")
|
||||
level = SEC_LEVEL_BLUE
|
||||
if("red")
|
||||
@@ -23,13 +32,31 @@
|
||||
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level)
|
||||
switch(level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
security_announcement_down.Announce("[config.alert_desc_green]", "Attention! Security level lowered to green")
|
||||
security_announcement_down.Announce("[config.alert_desc_green]", "Attention! Alert level lowered to code green.")
|
||||
security_level = SEC_LEVEL_GREEN
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
if(security_level < SEC_LEVEL_YELLOW)
|
||||
security_announcement_up.Announce("[config.alert_desc_yellow_upto]", "Attention! Alert level elevated to yellow")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_yellow_downto]", "Attention! Alert level lowered to yellow")
|
||||
security_level = SEC_LEVEL_YELLOW
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
if(security_level < SEC_LEVEL_VIOLET)
|
||||
security_announcement_up.Announce("[config.alert_desc_violet_upto]", "Attention! Alert level elevated to violet")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_violet_downto]", "Attention! Alert level lowered to violet")
|
||||
security_level = SEC_LEVEL_VIOLET
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
if(security_level < SEC_LEVEL_ORANGE)
|
||||
security_announcement_up.Announce("[config.alert_desc_orange_upto]", "Attention! Alert level elevated to orange")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_orange_downto]", "Attention! Alert level lowered to orange")
|
||||
security_level = SEC_LEVEL_ORANGE
|
||||
if(SEC_LEVEL_BLUE)
|
||||
if(security_level < SEC_LEVEL_BLUE)
|
||||
security_announcement_up.Announce("[config.alert_desc_blue_upto]", "Attention! Security level elevated to blue")
|
||||
security_announcement_up.Announce("[config.alert_desc_blue_upto]", "Attention! Alert level elevated to blue")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_blue_downto]", "Attention! Security level lowered to blue")
|
||||
security_announcement_down.Announce("[config.alert_desc_blue_downto]", "Attention! Alert level lowered to blue")
|
||||
security_level = SEC_LEVEL_BLUE
|
||||
if(SEC_LEVEL_RED)
|
||||
if(security_level < SEC_LEVEL_RED)
|
||||
@@ -42,13 +69,17 @@
|
||||
if(CC)
|
||||
CC.post_status("alert", "redalert")*/
|
||||
if(SEC_LEVEL_DELTA)
|
||||
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta security level reached!", new_sound = 'sound/effects/siren.ogg')
|
||||
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/siren.ogg')
|
||||
security_level = SEC_LEVEL_DELTA
|
||||
|
||||
var/newlevel = get_security_level()
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
if(FA.z in using_map.contact_levels)
|
||||
FA.set_security_level(newlevel)
|
||||
for(var/obj/machinery/status_display/FA in machines)
|
||||
if(FA.z in using_map.contact_levels)
|
||||
FA.display_alert(newlevel)
|
||||
FA.mode = 3
|
||||
|
||||
if(level >= SEC_LEVEL_RED)
|
||||
atc.reroute_traffic(yes = 1) // Tell them fuck off we're busy.
|
||||
@@ -60,6 +91,12 @@
|
||||
switch(security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
return "green"
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
return "yellow"
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
return "violet"
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
return "orange"
|
||||
if(SEC_LEVEL_BLUE)
|
||||
return "blue"
|
||||
if(SEC_LEVEL_RED)
|
||||
@@ -71,6 +108,12 @@
|
||||
switch(num)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
return "green"
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
return "yellow"
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
return "violet"
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
return "orange"
|
||||
if(SEC_LEVEL_BLUE)
|
||||
return "blue"
|
||||
if(SEC_LEVEL_RED)
|
||||
@@ -82,6 +125,12 @@
|
||||
switch( lowertext(seclevel) )
|
||||
if("green")
|
||||
return SEC_LEVEL_GREEN
|
||||
if("yellow")
|
||||
return SEC_LEVEL_YELLOW
|
||||
if("violet")
|
||||
return SEC_LEVEL_VIOLET
|
||||
if("orange")
|
||||
return SEC_LEVEL_ORANGE
|
||||
if("blue")
|
||||
return SEC_LEVEL_BLUE
|
||||
if("red")
|
||||
@@ -99,4 +148,10 @@
|
||||
set_security_level(2)
|
||||
/mob/verb/set_thing3()
|
||||
set_security_level(3)
|
||||
/mob/verb/set_thing4()
|
||||
set_security_level(4)
|
||||
/mob/verb/set_thing5()
|
||||
set_security_level(5)
|
||||
/mob/verb/set_thing6()
|
||||
set_security_level(6)
|
||||
*/
|
||||
@@ -0,0 +1,37 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Novacat
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Adds new status displays for all alert levels"
|
||||
- rscadd: "Adds yellow, violet, and orange alert levels"
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 132 KiB |
Reference in New Issue
Block a user