diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm
index 68f358abc25..1def278bf1a 100644
--- a/code/datums/configuration.dm
+++ b/code/datums/configuration.dm
@@ -42,6 +42,14 @@
var/server
var/banappeals
+ //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_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."
+
//game_options.txt configs
var/health_threshold_crit = 0
@@ -220,6 +228,24 @@
if("load_jobs_from_txt")
load_jobs_from_txt = 1
+ if("alert_red_upto")
+ config.alert_desc_red_upto = value
+
+ if("alert_red_downto")
+ config.alert_desc_red_downto = value
+
+ if("alert_blue_downto")
+ config.alert_desc_blue_downto = value
+
+ if("alert_blue_upto")
+ config.alert_desc_blue_upto = value
+
+ if("alert_green")
+ config.alert_desc_green = value
+
+ if("alert_delta")
+ config.alert_desc_delta = value
+
else
diary << "Unknown setting in configuration: '[name]'"
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index c59d589ede6..76a21504d36 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -79,6 +79,11 @@
//Only notify the admins if an actual change happened
log_game("[key_name(usr)] has changed the security level to [get_security_level()].")
message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].", 1)
+ switch(get_security_level())
+ if(SEC_LEVEL_GREEN)
+ feedback_inc("alert_comms_green",1)
+ if(SEC_LEVEL_GREEN)
+ feedback_inc("alert_comms_blue",1)
tmp_alertlevel = 0
else:
usr << "You are not authorized to do this."
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 1361611c435..b7606b49cf9 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -1,3 +1,11 @@
+//Comment related to the commenting out of dmf stuff:
+//Yes, I know it has the benefit of working without needing to refresh the screen, but it
+//just looked absolutely terrible. People with light on dark windows setups couldn't view it.
+//If you make it better, prettier... decent looking, sure, add it. But as it is it's just awful, sorry.
+//The updateWindow() and SkinCmd() procs have been commented out along with a part of attack_hand().
+//There were four or five calls to updateWindow() scattered through the file. They are commented out with '//' comments.
+//-Errorage
+
/obj/machinery/vending
var/const
WIRE_EXTEND = 1
@@ -10,6 +18,11 @@
var/product_name = "generic"
var/product_path = null
var/amount = 0
+ var/color = "#ffffff"
+
+ New()
+ ..()
+ color = "#[pick(list("ff","ee","dd"))][pick(list("ff","ee","dd"))][pick(list("ff","ee","dd"))]"
/obj/machinery/vending/New()
..()
@@ -93,7 +106,11 @@
continue
return
+
+
+/*
/obj/machinery/vending/proc/updateWindow(mob/user as mob)
+
var/i
for (i = 1, i <= 6, i++)
winclone(user, "vendingslot", "vendingslot[i]")
@@ -127,6 +144,7 @@
else
winshow(user, "vendingwindow.slot[i+1]", 0)
+
/obj/machinery/vending/SkinCmd(mob/user as mob, var/data as text)
if (get_dist(user, src) > 1)
return
@@ -191,7 +209,7 @@
new product_path(get_turf(src))
src.vend_ready = 1
- updateWindow(user)
+ updateWindow(user)*/
/obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -216,7 +234,7 @@
W.loc = src
coin = W
user << "\blue You insert the [W] into the [src]"
- updateWindow(user)
+ //updateWindow(user)
return
else
..()
@@ -236,43 +254,139 @@
if(src.shock(user, 100))
return
- updateWindow(user)
+ /*updateWindow(user)
winshow(user, "vendingwindow", 1)
- user.skincmds["vending"] = src
+ user.skincmds["vending"] = src*/
- var/dat = "[src.name]"
+ var/dat = ""
+
+
+ dat += {"
+
+
+
+
+
+
+ |
+ [src.name]
+ |
+
+
+ Coin slot
+ [coin ? "[coin.name]" : "empty"]
+
+ |
+
+
+ |
+
+ |
+
+
+
+ SELECT ITEM
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ "}
+
+ for( var/datum/data/vending_product/product in product_records)
+ dat += {"
+
+
+ [product.product_name][product.amount ? " ([product.amount])" : " Out of stock"] |
+
+
+ |
+
+
+ "}
+
+ if(extended_inventory)
+ for( var/datum/data/vending_product/product in hidden_records)
+ dat += {"
+
+
+ [product.product_name][product.amount ? " ([product.amount])" : " Out of stock"] |
+
+
+ |
+
+
+ "}
if(coin)
- dat += "
There is a [coin.name] in the slot!"
- else
- dat += "
The coin slot is empty."
+ for( var/datum/data/vending_product/product in coin_records)
+ dat += {"
+
+
+ [product.product_name][product.amount ? " ([product.amount])" : " Out of stock"] |
+
+
+ |
+
+
+ "}
+
+ dat += {"
+
+
+
+
+
+
+
+ "}
if(panel_open)
+ var/dat2 = ""
var/list/vendwires = list(
"Violet" = 1,
"Orange" = 2,
"Goldenrod" = 3,
"Green" = 4,
)
- dat += "
Access Panel
"
+ dat2 += "
Access Panel
"
for(var/wiredesc in vendwires)
var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]]
- dat += "[wiredesc] wire: "
+ dat2 += "[wiredesc] wire: "
if(!is_uncut)
- dat += "Mend"
+ dat2 += "Mend"
else
- dat += "Cut "
- dat += "Pulse "
- dat += "
"
+ dat2 += "Cut "
+ dat2 += "Pulse "
+ dat2 += "
"
- dat += "
"
- dat += "The orange light is [(src.seconds_electrified == 0) ? "off" : "on"].
"
- dat += "The red light is [src.shoot_inventory ? "off" : "blinking"].
"
- dat += "The green light is [src.extended_inventory ? "on" : "off"].
"
- dat += "The [(src.wires & WIRE_SCANID) ? "purple" : "yellow"] light is on.
"
+ dat2 += "
"
+ dat2 += "The orange light is [(src.seconds_electrified == 0) ? "off" : "on"].
"
+ dat2 += "The red light is [src.shoot_inventory ? "off" : "blinking"].
"
+ dat2 += "The green light is [src.extended_inventory ? "on" : "off"].
"
+ dat2 += "The [(src.wires & WIRE_SCANID) ? "purple" : "yellow"] light is on.
"
if(product_slogans != "")
- dat += "The speaker switch is [src.shut_up ? "off" : "on"]. Toggle"
+ dat2 += "The speaker switch is [src.shut_up ? "off" : "on"]. Toggle
"
+ user << browse(dat2, "window=vending")
user << browse(dat, "")
onclose(user, "")
@@ -303,14 +417,13 @@
usr.put_in_hand(coin)
usr << "\blue You remove the [coin] from the [src]"
coin = null
- updateWindow(usr)
+ //updateWindow(usr)
usr.skincmds["vending"] = src
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
if ((href_list["vend"]) && (src.vend_ready))
-
if ((!src.allowed(usr)) && (!src.emagged) && (src.wires & WIRE_SCANID)) //For SECURE VENDING MACHINES YEAH
usr << "\red Access denied." //Unless emagged of course
flick(src.icon_deny,src)
@@ -371,7 +484,7 @@
src.mend(twire)
else
src.cut(twire)
- updateWindow(usr)
+ //updateWindow(usr)
usr.skincmds["vending"] = src
else if ((href_list["pulsewire"]) && (src.panel_open))
@@ -384,7 +497,7 @@
return
else
src.pulse(twire)
- updateWindow(usr)
+ //updateWindow(usr)
usr.skincmds["vending"] = src
else if ((href_list["togglevoice"]) && (src.panel_open))
diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm
index f95565027e1..d8280b2a7b9 100644
--- a/code/modules/security levels/keycard authentication.dm
+++ b/code/modules/security levels/keycard authentication.dm
@@ -140,4 +140,5 @@
/obj/machinery/keycard_auth/proc/trigger_event()
switch(event)
if("Red alert")
- set_security_level(SEC_LEVEL_RED)
\ No newline at end of file
+ set_security_level(SEC_LEVEL_RED)
+ feedback_inc("alert_keycard_auth_red",1)
\ No newline at end of file
diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm
index ee34115779d..01d6d88e925 100644
--- a/code/modules/security levels/security levels.dm
+++ b/code/modules/security levels/security levels.dm
@@ -4,6 +4,8 @@
//2 = code red
//3 = code delta
+//config.alert_desc_blue_downto
+
/proc/set_security_level(var/level)
switch(level)
if("green")
@@ -20,7 +22,7 @@
switch(level)
if(SEC_LEVEL_GREEN)
world << "Attention! security level lowered to green"
- world << "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
+ world << "[config.alert_desc_green]"
security_level = SEC_LEVEL_GREEN
for(var/obj/machinery/firealarm/FA in world)
if(FA.z == 1)
@@ -29,10 +31,10 @@
if(SEC_LEVEL_BLUE)
if(security_level < SEC_LEVEL_BLUE)
world << "Attention! security level elevated to blue"
- world << "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted."
+ world << "[config.alert_desc_blue_upto]"
else
world << "Attention! security level lowered to blue"
- world << "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."
+ world << "[config.alert_desc_blue_downto]"
security_level = SEC_LEVEL_BLUE
for(var/obj/machinery/firealarm/FA in world)
if(FA.z == 1)
@@ -41,10 +43,10 @@
if(SEC_LEVEL_RED)
if(security_level < SEC_LEVEL_RED)
world << "Attention! Code red!"
- world << "There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised."
+ world << "[config.alert_desc_red_upto]"
else
world << "Attention! Code red!"
- world << "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."
+ world << "[config.alert_desc_red_downto]"
security_level = SEC_LEVEL_RED
/* - At the time of commit, setting status displays didn't work properly
@@ -58,7 +60,7 @@
FA.overlays += image('monitors.dmi', "overlay_red")
if(SEC_LEVEL_DELTA)
world << "Attention! Delta security level reached!"
- world << "The ship'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."
+ world << "[config.alert_desc_delta]"
security_level = SEC_LEVEL_DELTA
for(var/obj/machinery/firealarm/FA in world)
if(FA.z == 1)
diff --git a/config/config.txt b/config/config.txt
index 38faa361d2c..01b371b01ee 100644
--- a/config/config.txt
+++ b/config/config.txt
@@ -1,3 +1,11 @@
+## Alert levels
+ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced.
+ALERT_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.
+ALERT_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.
+ALERT_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.
+ALERT_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.
+ALERT_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.
+
## log OOC channel
LOG_OOC