mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +01:00
Comms program.
This commit is contained in:
@@ -30,7 +30,7 @@ var/global/list/deliverybeacons = list() //list of all MULEbot delivery beacon
|
||||
var/global/list/deliverybeacontags = list() //list of all tags associated with delivery beacons.
|
||||
|
||||
var/global/list/beacons = list()
|
||||
var/global/list/shuttle_caller_list = list() //list of all communication consoles and AIs, for automatic shuttle calls when there are none.
|
||||
var/global/list/shuttle_caller_list = list() //list of all communication consoles, comms consoles circuit and AIs, for automatic shuttle calls when there are none.
|
||||
var/global/list/tracked_implants = list() //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
|
||||
var/global/list/pinpointer_list = list() //list of all pinpointers. Used to change stuff they are pointing to all at once.
|
||||
var/global/list/abductor_equipment = list() //list of all abductor equipment
|
||||
|
||||
@@ -182,6 +182,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
var/obj/machinery/computer/communications/C = thing
|
||||
if(C.stat & BROKEN)
|
||||
continue
|
||||
else if(istype(thing, /datum/computer_file/program/comm) || istype(thing, /obj/item/weapon/circuitboard/communications))
|
||||
continue
|
||||
|
||||
var/turf/T = get_turf(thing)
|
||||
if(T && is_station_level(T.z))
|
||||
|
||||
@@ -163,9 +163,7 @@
|
||||
D.hostile_lockdown(src)
|
||||
addtimer(D, "disable_lockdown", 900)
|
||||
|
||||
var/obj/machinery/computer/communications/C = locate() in machines
|
||||
if(C)
|
||||
C.post_status("alert", "lockdown")
|
||||
post_status("alert", "lockdown")
|
||||
|
||||
verbs -= /mob/living/silicon/ai/proc/lockdown
|
||||
minor_announcement.Announce("Hostile runtime detected in door controllers. Isolation lockdown protocols are now in effect. Please remain calm.", "Network Alert")
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
feedback_inc("alert_comms_green",1)
|
||||
if(SEC_LEVEL_BLUE)
|
||||
feedback_inc("alert_comms_blue",1)
|
||||
tmp_alertlevel = 0
|
||||
|
||||
tmp_alertlevel = 0
|
||||
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
if(..(href, href_list))
|
||||
return 1
|
||||
@@ -196,9 +196,9 @@
|
||||
var/text = messagetext[id]
|
||||
messagetitle.Remove(title)
|
||||
messagetext.Remove(text)
|
||||
if(currmsg == id)
|
||||
if(currmsg == id)
|
||||
currmsg = 0
|
||||
if(aicurrmsg == id)
|
||||
if(aicurrmsg == id)
|
||||
aicurrmsg = 0
|
||||
setMenuState(usr,COMM_SCREEN_MESSAGES)
|
||||
|
||||
@@ -210,11 +210,11 @@
|
||||
display_type=href_list["statdisp"]
|
||||
switch(display_type)
|
||||
if("message")
|
||||
post_status("message", stat_msg1, stat_msg2)
|
||||
post_status("message", stat_msg1, stat_msg2, usr)
|
||||
if("alert")
|
||||
post_status("alert", href_list["alert"])
|
||||
post_status("alert", href_list["alert"], user = usr)
|
||||
else
|
||||
post_status(href_list["statdisp"])
|
||||
post_status(href_list["statdisp"], user = usr)
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
|
||||
if("setmsg1")
|
||||
@@ -378,7 +378,7 @@
|
||||
list("id" = SEC_LEVEL_BLUE, "name" = "Blue"),
|
||||
//SEC_LEVEL_RED = list("name"="Red"),
|
||||
)
|
||||
|
||||
|
||||
var/list/msg_data = list()
|
||||
for(var/i = 1; i <= messagetext.len; i++)
|
||||
msg_data.Add(list(list("title" = messagetitle[i], "body" = messagetext[i], "id" = i)))
|
||||
@@ -499,7 +499,7 @@
|
||||
message_admins("[key_name_admin(user)] has recalled the shuttle - [formatJumpTo(user)].", 1)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/communications/proc/post_status(var/command, var/data1, var/data2)
|
||||
/proc/post_status(command, data1, data2, mob/user = null)
|
||||
|
||||
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
|
||||
|
||||
@@ -514,7 +514,7 @@
|
||||
if("message")
|
||||
status_signal.data["msg1"] = data1
|
||||
status_signal.data["msg2"] = data2
|
||||
log_admin("STATUS: [src.fingerprintslast] set status screen message with [src]: [data1] [data2]")
|
||||
log_admin("STATUS: [user] set status screen message with [src]: [data1] [data2]")
|
||||
//message_admins("STATUS: [user] set status screen with [PDA]. Message: [data1] [data2]")
|
||||
if("alert")
|
||||
status_signal.data["picture_state"] = data1
|
||||
@@ -527,35 +527,30 @@
|
||||
shuttle_master.autoEvac()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/circuitboard/communications/New()
|
||||
shuttle_caller_list += src
|
||||
..()
|
||||
|
||||
/obj/item/weapon/circuitboard/communications/Destroy()
|
||||
|
||||
for(var/obj/machinery/computer/communications/commconsole in world)
|
||||
if(istype(commconsole.loc,/turf))
|
||||
return ..()
|
||||
|
||||
for(var/obj/item/weapon/circuitboard/communications/commboard in world)
|
||||
if((istype(commboard.loc,/turf) || istype(commboard.loc,/obj/item/weapon/storage)) && commboard != src)
|
||||
return ..()
|
||||
|
||||
for(var/mob/living/silicon/ai/shuttlecaller in player_list)
|
||||
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
|
||||
return ..()
|
||||
|
||||
if(GAMEMODE_IS_REVOLUTION || sent_strike_team)
|
||||
return ..()
|
||||
|
||||
shuttle_master.emergency.request(null, 0.3, null, "All communication consoles, boards, and AI's have been destroyed.")
|
||||
log_game("All the AI's, communication consoles and boards are destroyed. Shuttle called.")
|
||||
message_admins("All the AI's, communication consoles and boards are destroyed. Shuttle called.", 1)
|
||||
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
return ..()
|
||||
|
||||
|
||||
/proc/print_command_report(text = "", title = "Central Command Update")
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
for(var/obj/machinery/computer/communications/C in shuttle_caller_list)
|
||||
if(!(C.stat & (BROKEN|NOPOWER)) && is_station_contact(C.z))
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(C.loc)
|
||||
P.name = "paper- '[title]'"
|
||||
P.info = text
|
||||
P.update_icon()
|
||||
C.messagetitle.Add("[title]")
|
||||
C.messagetext.Add(text)
|
||||
P.update_icon()
|
||||
for(var/datum/computer_file/program/comm/P in shuttle_caller_list)
|
||||
var/turf/T = get_turf(P.computer)
|
||||
if(T && P.program_state != PROGRAM_STATE_KILLED && is_station_contact(T.z))
|
||||
if(P.computer)
|
||||
var/obj/item/weapon/computer_hardware/printer/printer = P.computer.all_components[MC_PRINT]
|
||||
if(printer)
|
||||
printer.print_text(text, "paper- '[title]'")
|
||||
P.messagetitle.Add("[title]")
|
||||
P.messagetext.Add(text)
|
||||
@@ -62,6 +62,7 @@
|
||||
var/obj/item/weapon/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
hard_drive.store_file(new/datum/computer_file/program/card_mod())
|
||||
hard_drive.store_file(new/datum/computer_file/program/comm())
|
||||
|
||||
// ===== CIVILIAN CONSOLE =====
|
||||
/obj/machinery/modular_computer/console/preset/civilian
|
||||
|
||||
@@ -0,0 +1,401 @@
|
||||
/datum/computer_file/program/comm
|
||||
filename = "comm"
|
||||
filedesc = "Command and communications program."
|
||||
program_icon_state = "comm"
|
||||
extended_desc = "Used to command and control the station. Can relay long-range communications. This program can not be run on tablet computers."
|
||||
required_access = access_heads
|
||||
requires_ntnet = 1
|
||||
size = 12
|
||||
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
|
||||
network_destination = "station long-range communication array"
|
||||
|
||||
var/authenticated = COMM_AUTHENTICATION_NONE
|
||||
var/list/messagetitle = list()
|
||||
var/list/messagetext = list()
|
||||
var/currmsg = 0
|
||||
var/aicurrmsg = 0
|
||||
var/menu_state = COMM_SCREEN_MAIN
|
||||
var/ai_menu_state = COMM_SCREEN_MAIN
|
||||
var/message_cooldown = 0
|
||||
var/centcomm_message_cooldown = 0
|
||||
var/tmp_alertlevel = 0
|
||||
|
||||
var/status_display_freq = "1435"
|
||||
var/stat_msg1
|
||||
var/stat_msg2
|
||||
var/display_type="blank"
|
||||
|
||||
var/datum/announcement/priority/crew_announcement = new
|
||||
|
||||
/datum/computer_file/program/comm/New()
|
||||
shuttle_caller_list += src
|
||||
..()
|
||||
crew_announcement.newscast = 0
|
||||
|
||||
/datum/computer_file/program/comm/Destroy()
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
return ..()
|
||||
|
||||
/datum/computer_file/program/comm/proc/is_authenticated(mob/user, loud = 1)
|
||||
if(authenticated == COMM_AUTHENTICATION_MAX)
|
||||
return COMM_AUTHENTICATION_MAX
|
||||
else if(user.can_admin_interact())
|
||||
return COMM_AUTHENTICATION_MAX
|
||||
else if(authenticated)
|
||||
return COMM_AUTHENTICATION_MIN
|
||||
else
|
||||
if(loud)
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return COMM_AUTHENTICATION_NONE
|
||||
|
||||
/datum/computer_file/program/comm/proc/change_security_level(mob/user, new_level)
|
||||
tmp_alertlevel = new_level
|
||||
var/old_level = security_level
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel < SEC_LEVEL_GREEN)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel > SEC_LEVEL_BLUE)
|
||||
tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
|
||||
set_security_level(tmp_alertlevel)
|
||||
if(security_level != old_level)
|
||||
log_game("[key_name(user)] has changed the security level to [get_security_level()].")
|
||||
message_admins("[key_name_admin(user)] has changed the security level to [get_security_level()].")
|
||||
switch(security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
feedback_inc("alert_comms_green", 1)
|
||||
if(SEC_LEVEL_BLUE)
|
||||
feedback_inc("alert_comms_blue", 1)
|
||||
tmp_alertlevel = 0
|
||||
|
||||
/datum/computer_file/program/comm/proc/setCurrentMessage(mob/user, value)
|
||||
if(isAI(user) || isrobot(user))
|
||||
aicurrmsg = value
|
||||
else
|
||||
currmsg = value
|
||||
|
||||
/datum/computer_file/program/comm/proc/getCurrentMessage(mob/user)
|
||||
if(isAI(user) || isrobot(user))
|
||||
return aicurrmsg
|
||||
else
|
||||
return currmsg
|
||||
|
||||
/datum/computer_file/program/comm/proc/setMenuState(mob/user, value)
|
||||
if(isAI(user) || isrobot(user))
|
||||
ai_menu_state=value
|
||||
else
|
||||
menu_state=value
|
||||
|
||||
/datum/computer_file/program/comm/proc/getMenuState(mob/user)
|
||||
if(isAI(user) || isrobot(user))
|
||||
return ai_menu_state
|
||||
else
|
||||
return menu_state
|
||||
|
||||
/datum/computer_file/program/comm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui)
|
||||
if(!ui)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers)
|
||||
assets.send(user)
|
||||
ui = new(user, src, ui_key, "comm_program.tmpl", "Command and communications program", 575, 500)
|
||||
ui.open()
|
||||
|
||||
/datum/computer_file/program/comm/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/list/data = get_header_data()
|
||||
data["is_ai"] = isAI(user) || isrobot(user)
|
||||
data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state
|
||||
data["emagged"] = computer ? computer.emagged : null
|
||||
data["authenticated"] = is_authenticated(user, 0)
|
||||
data["screen"] = getMenuState(usr)
|
||||
|
||||
data["stat_display"] = list(
|
||||
"type" = display_type,
|
||||
"line_1" = (stat_msg1 ? stat_msg1 : "-----"),
|
||||
"line_2" = (stat_msg2 ? stat_msg2 : "-----"),
|
||||
|
||||
"presets" = list(
|
||||
list("name" = "blank", "label" = "Clear", "desc" = "Blank slate"),
|
||||
list("name" = "shuttle", "label" = "Shuttle ETA", "desc" = "Display how much time is left."),
|
||||
list("name" = "message", "label" = "Message", "desc" = "A custom message.")
|
||||
),
|
||||
|
||||
"alerts"=list(
|
||||
list("alert" = "default", "label" = "Nanotrasen", "desc" = "Oh god."),
|
||||
list("alert" = "redalert", "label" = "Red Alert", "desc" = "Nothing to do with communists."),
|
||||
list("alert" = "lockdown", "label" = "Lockdown", "desc" = "Let everyone know they're on lockdown."),
|
||||
list("alert" = "biohazard", "label" = "Biohazard", "desc" = "Great for virus outbreaks and parties."),
|
||||
)
|
||||
)
|
||||
|
||||
data["security_level"] = security_level
|
||||
data["str_security_level"] = capitalize(get_security_level())
|
||||
data["levels"] = list(
|
||||
list("id" = SEC_LEVEL_GREEN, "name" = "Green"),
|
||||
list("id" = SEC_LEVEL_BLUE, "name" = "Blue"),
|
||||
)
|
||||
|
||||
var/list/msg_data = list()
|
||||
for(var/i = 1; i <= messagetext.len; i++)
|
||||
msg_data.Add(list(list("title" = messagetitle[i], "body" = messagetext[i], "id" = i)))
|
||||
|
||||
data["messages"] = msg_data
|
||||
if((data["is_ai"] && aicurrmsg) || (!data["is_ai"] && currmsg))
|
||||
data["current_message"] = data["is_ai"] ? messagetext[aicurrmsg] : messagetext[currmsg]
|
||||
data["current_message_title"] = data["is_ai"] ? messagetitle[aicurrmsg] : messagetitle[currmsg]
|
||||
|
||||
data["lastCallLoc"] = shuttle_master.emergencyLastCallLoc ? format_text(shuttle_master.emergencyLastCallLoc.name) : null
|
||||
|
||||
var/shuttle[0]
|
||||
switch(shuttle_master.emergency.mode)
|
||||
if(SHUTTLE_IDLE, SHUTTLE_RECALL)
|
||||
shuttle["callStatus"] = 2 //#define
|
||||
else
|
||||
shuttle["callStatus"] = 1
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
|
||||
var/timeleft = shuttle_master.emergency.timeLeft()
|
||||
shuttle["eta"] = "[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
|
||||
data["shuttle"] = shuttle
|
||||
|
||||
if(trade_dockrequest_timelimit > world.time)
|
||||
data["dock_request"] = 1
|
||||
else
|
||||
data["dock_request"] = 0
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/comm/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/turf/T = get_turf(computer)
|
||||
if(!is_secure_level(T.z))
|
||||
to_chat(usr, "<span class='warning'>Unable to establish a connection: You're too far away from the station!</span>")
|
||||
return 1
|
||||
|
||||
if(href_list["PRG_login"])
|
||||
if(!ishuman(usr))
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
|
||||
var/list/access = usr.get_access()
|
||||
if(access_heads in access)
|
||||
authenticated = COMM_AUTHENTICATION_MIN
|
||||
|
||||
if(access_captain in access)
|
||||
authenticated = COMM_AUTHENTICATION_MAX
|
||||
var/mob/living/carbon/human/H = usr
|
||||
var/obj/item/weapon/card/id = H.get_idcard(TRUE)
|
||||
if(istype(id))
|
||||
crew_announcement.announcer = GetNameAndAssignmentFromId(id)
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
|
||||
if(href_list["PRG_logout"])
|
||||
authenticated = COMM_AUTHENTICATION_NONE
|
||||
crew_announcement.announcer = ""
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
|
||||
if(is_authenticated(usr))
|
||||
switch(href_list["PRG_operation"])
|
||||
if("main")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
|
||||
if("changeseclevel")
|
||||
setMenuState(usr,COMM_SCREEN_SECLEVEL)
|
||||
|
||||
if("newalertlevel")
|
||||
if(isAI(usr) || isrobot(usr))
|
||||
to_chat(usr, "<span class='warning'>Firewalls prevent you from changing the alert level.</span>")
|
||||
return 1
|
||||
else if(usr.can_admin_interact())
|
||||
change_security_level(usr, text2num(href_list["level"]))
|
||||
return 1
|
||||
else if(!ishuman(usr))
|
||||
to_chat(usr, "<span class='warning'>Security measures prevent you from changing the alert level.</span>")
|
||||
return 1
|
||||
|
||||
var/mob/living/carbon/human/L = usr
|
||||
var/obj/item/card = L.get_active_hand()
|
||||
var/obj/item/weapon/card/id/I = (card && card.GetID()) || L.wear_id || L.wear_pda
|
||||
if(istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
if(I && istype(I))
|
||||
if(access_captain in I.access)
|
||||
change_security_level(usr, text2num(href_list["level"]))
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You are not authorized to do this.</span>")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You need to swipe your ID.</span>")
|
||||
|
||||
if("announce")
|
||||
if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)
|
||||
if(message_cooldown)
|
||||
to_chat(usr, "<span class='warning'>Please allow at least one minute to pass between announcements.</span>")
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
||||
if(!input || message_cooldown || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
crew_announcement.Announce(input)
|
||||
message_cooldown = 1
|
||||
spawn(600)//One minute cooldown
|
||||
message_cooldown = 0
|
||||
|
||||
if("callshuttle")
|
||||
var/input = input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
if(!input || ..() || !is_authenticated(usr))
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
|
||||
call_shuttle_proc(usr, input)
|
||||
if(shuttle_master.emergency.timer)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
|
||||
if("cancelshuttle")
|
||||
if(isAI(usr) || isrobot(usr))
|
||||
to_chat(usr, "<span class='warning'>Firewalls prevent you from recalling the shuttle.</span>")
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
cancel_call_proc(usr)
|
||||
if(shuttle_master.emergency.timer)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
|
||||
if("messagelist")
|
||||
currmsg = 0
|
||||
if(href_list["msgid"])
|
||||
setCurrentMessage(usr, text2num(href_list["msgid"]))
|
||||
setMenuState(usr,COMM_SCREEN_MESSAGES)
|
||||
|
||||
if("delmessage")
|
||||
if(href_list["msgid"])
|
||||
currmsg = text2num(href_list["msgid"])
|
||||
var/response = alert("Are you sure you wish to delete this message?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
if(currmsg)
|
||||
var/id = getCurrentMessage()
|
||||
var/title = messagetitle[id]
|
||||
var/text = messagetext[id]
|
||||
messagetitle.Remove(title)
|
||||
messagetext.Remove(text)
|
||||
if(currmsg == id)
|
||||
currmsg = 0
|
||||
if(aicurrmsg == id)
|
||||
aicurrmsg = 0
|
||||
setMenuState(usr,COMM_SCREEN_MESSAGES)
|
||||
|
||||
if("status")
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
|
||||
// Status display stuff
|
||||
if("setstat")
|
||||
display_type=href_list["statdisp"]
|
||||
switch(display_type)
|
||||
if("message")
|
||||
post_status("message", stat_msg1, stat_msg2, usr)
|
||||
if("alert")
|
||||
post_status("alert", href_list["alert"], user = usr)
|
||||
else
|
||||
post_status(href_list["statdisp"], user = usr)
|
||||
setMenuState(usr, COMM_SCREEN_STAT)
|
||||
|
||||
if("setmsg1")
|
||||
stat_msg1 = input("Line 1", "Enter Message Text", stat_msg1) as text|null
|
||||
setMenuState(usr, COMM_SCREEN_STAT)
|
||||
|
||||
if("setmsg2")
|
||||
stat_msg2 = input("Line 2", "Enter Message Text", stat_msg2) as text|null
|
||||
setMenuState(usr, COMM_SCREEN_STAT)
|
||||
|
||||
if("nukerequest")
|
||||
if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)
|
||||
if(centcomm_message_cooldown)
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") as text|null
|
||||
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
Nuke_request(input, usr)
|
||||
to_chat(usr, "<span class='notice'>Request sent.</span>")
|
||||
log_say("[key_name(usr)] has requested the nuclear codes from Centcomm")
|
||||
priority_announcement.Announce("The codes for the on-station nuclear self-destruct have been requested by [usr]. Confirmation or denial of this request will be sent shortly.", "Nuclear Self Destruct Codes Requested",'sound/AI/commandreport.ogg')
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("MessageCentcomm")
|
||||
if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)
|
||||
if(centcomm_message_cooldown)
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null
|
||||
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
Centcomm_announce(input, usr)
|
||||
to_chat(usr, "Message transmitted.")
|
||||
log_say("[key_name(usr)] has made a Centcomm announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
// OMG SYNDICATE ...LETTERHEAD
|
||||
if("MessageSyndicate")
|
||||
if((is_authenticated(usr) == COMM_AUTHENTICATION_MAX) && (computer && computer.emagged))
|
||||
if(centcomm_message_cooldown)
|
||||
to_chat(usr, "Arrays recycling. Please stand by.")
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null
|
||||
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
Syndicate_announce(input, usr)
|
||||
to_chat(usr, "Message transmitted.")
|
||||
log_say("[key_name(usr)] has made a Syndicate announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("RestartNanoMob")
|
||||
if(mob_hunt_server)
|
||||
if(mob_hunt_server.manual_reboot())
|
||||
var/loading_msg = pick("Respawning spawns", "Reticulating splines", "Flipping hat",
|
||||
"Capturing all of them", "Fixing minor text issues", "Being the very best",
|
||||
"Nerfing this", "Not communicating with playerbase", "Coding a ripoff in a 2D spaceman game")
|
||||
to_chat(usr, "<span class='notice'>Restarting Nano-Mob Hunter GO! game server. [loading_msg]...</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Nano-Mob Hunter GO! game server reboot failed due to recent restart. Please wait before re-attempting.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>Nano-Mob Hunter GO! game server is offline for extended maintenance. Contact your Central Command administrators for more info if desired.</span>")
|
||||
|
||||
if("AcceptDocking")
|
||||
to_chat(usr, "Docking request accepted!")
|
||||
trade_dock_timelimit = world.time + 1200
|
||||
trade_dockrequest_timelimit = 0
|
||||
event_announcement.Announce("Docking request for trading ship approved, please dock at port bay 4.", "Docking Request")
|
||||
if("DenyDocking")
|
||||
to_chat(usr, "Docking requeset denied!")
|
||||
trade_dock_timelimit = 0
|
||||
trade_dockrequest_timelimit = 0
|
||||
event_announcement.Announce("Docking request for trading ship denied.", "Docking request")
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
@@ -118,6 +118,8 @@
|
||||
return null
|
||||
|
||||
/obj/item/weapon/computer_hardware/hard_drive/Destroy()
|
||||
for(var/file in stored_files)
|
||||
qdel(file)
|
||||
stored_files = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
security_announcement_down.Announce("All threats to the station have passed. All weapons need to be holstered and privacy laws are once again fully enforced.","Attention! Security level lowered to green.")
|
||||
security_level = SEC_LEVEL_GREEN
|
||||
|
||||
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
|
||||
if(CC)
|
||||
CC.post_status("alert", "outline")
|
||||
post_status("alert", "outline")
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in world)
|
||||
if(is_station_contact(FA.z))
|
||||
@@ -48,9 +46,7 @@
|
||||
security_announcement_down.Announce("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.","Attention! Security level lowered to blue.")
|
||||
security_level = SEC_LEVEL_BLUE
|
||||
|
||||
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
|
||||
if(CC)
|
||||
CC.post_status("alert", "outline")
|
||||
post_status("alert", "outline")
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in world)
|
||||
if(is_station_contact(FA.z))
|
||||
@@ -69,9 +65,7 @@
|
||||
R.locked = 0
|
||||
R.update_icon()
|
||||
|
||||
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
|
||||
if(CC)
|
||||
CC.post_status("alert", "redalert")
|
||||
post_status("alert", "redalert")
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in world)
|
||||
if(is_station_contact(FA.z))
|
||||
@@ -95,9 +89,7 @@
|
||||
H.locked = 0
|
||||
H.update_icon()
|
||||
|
||||
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
|
||||
if(CC)
|
||||
CC.post_status("alert", "gammaalert")
|
||||
post_status("alert", "gammaalert")
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in world)
|
||||
if(is_station_contact(FA.z))
|
||||
@@ -109,9 +101,7 @@
|
||||
security_announcement_up.Announce("Central Command has ordered the Epsilon security level on the station. Consider all contracts terminated.","Attention! Epsilon security level activated!")
|
||||
security_level = SEC_LEVEL_EPSILON
|
||||
|
||||
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
|
||||
if(CC)
|
||||
CC.post_status("alert", "epsilonalert")
|
||||
post_status("alert", "epsilonalert")
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in world)
|
||||
if(is_station_contact(FA.z))
|
||||
@@ -122,9 +112,7 @@
|
||||
security_announcement_up.Announce("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.","Attention! Delta security level reached!")
|
||||
security_level = SEC_LEVEL_DELTA
|
||||
|
||||
var/obj/machinery/computer/communications/CC = locate(/obj/machinery/computer/communications,world)
|
||||
if(CC)
|
||||
CC.post_status("alert", "deltaalert")
|
||||
post_status("alert", "deltaalert")
|
||||
|
||||
for(var/obj/machinery/firealarm/FA in world)
|
||||
if(is_station_contact(FA.z))
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
{{if !data.authenticated}}
|
||||
<div class="notice">Please swipe your ID card. {{:helper.link('Log In', 'unlock', {'PRG_login' : 1}, null, 'fixed')}}</div>
|
||||
{{else}}
|
||||
{{if !data.is_ai}}
|
||||
<div class="notice">Please remember to {{:helper.link('Log Out', 'lock', {'PRG_logout' : 1}, null, 'fixed')}}</div>
|
||||
{{/if}}
|
||||
{{if data.lastCallLoc}}
|
||||
<div class="line">Most recent shuttle call/recall traced to: <b>{{:data.lastCallLoc}}</b></div>
|
||||
{{else}}
|
||||
<div class="line">Unable to trace most recent shuttle call/recall signal.</div>
|
||||
{{/if}}
|
||||
<div class="item">
|
||||
<h3>Emergency Shuttle:</h3>
|
||||
{{if data.shuttle.eta}}
|
||||
<div class="itemLabel">ETA:</div>
|
||||
<div class="itemContents">
|
||||
{{>data.shuttle.eta}}
|
||||
</div>
|
||||
{{/if}}<!-- SHUTTLE ETA -->
|
||||
<div class="itemLabel">Options:</div>
|
||||
<div class="itemContents">
|
||||
{{if data.shuttle.callStatus == 1 && !data.is_ai}}
|
||||
{{:helper.link('Cancel Shuttle', 'arrow-left', {'PRG_operation' : 'cancelshuttle'})}}
|
||||
{{else data.shuttle.callStatus == 2}}
|
||||
{{:helper.link('Call Shuttle', 'arrow-circle-down', {'PRG_operation' : 'callshuttle'})}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if data.screen==1}}
|
||||
<!-- MAIN SCREEN -->
|
||||
<h3>Menu</h3>
|
||||
<div class="item">
|
||||
{{if data.authenticated==2}}
|
||||
<div class="line">
|
||||
{{:helper.link('Make an Announcement', 'info', {'PRG_operation' : 'announce'})}}
|
||||
</div>
|
||||
<div class="line">
|
||||
{{if data.emagged}}
|
||||
{{:helper.link('Message [UNKNOWN]', 'envelope', {'PRG_operation' : 'MessageSyndicate'})}}
|
||||
{{else}}
|
||||
{{:helper.link('Message CentComm', 'envelope', {'PRG_operation' : 'MessageCentcomm'})}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="line">
|
||||
{{:helper.link('Request Nuclear Authentication Codes', 'exclamation-triangle', {'PRG_operation' : 'nukerequest'})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="line">
|
||||
{{:helper.link('Change Alert Level', 'signal', {'PRG_operation' : 'changeseclevel'})}}
|
||||
</div>
|
||||
<div class="line">
|
||||
{{:helper.link('Change Status Displays', 'info', {'PRG_operation' : 'status'})}}
|
||||
</div>
|
||||
<div class="line">
|
||||
{{:helper.link('Message List', 'comment', {'PRG_operation' : 'messagelist'})}}
|
||||
</div>
|
||||
<div class="line">
|
||||
{{:helper.link('Restart Nano-Mob Hunter GO! Server', 'power-off', {'PRG_operation' : 'RestartNanoMob'})}}
|
||||
</div>
|
||||
{{if data.dock_request}}
|
||||
<div class="line">
|
||||
{{:helper.link('Accept Docking Request', 'signal', {'PRG_operation' : 'AcceptDocking'})}}
|
||||
{{:helper.link('Deny Docking Request', 'signal', {'PRG_operation' : 'DenyDocking'})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else data.screen==2}}
|
||||
<!-- STATUS DISPLAYS -->
|
||||
<h2>Status Displays</h2>
|
||||
{{:helper.link('Back', 'home', {'PRG_operation' : 'main'})}}
|
||||
<h3>Presets</h3>
|
||||
{{for data.stat_display.presets}}
|
||||
<div class="line">
|
||||
<div class="statusLabel">{{:helper.link(value.label, 'info', {'PRG_operation' : 'setstat', 'statdisp' : value.name}, name == data.stat_display.type ? 'selected' : null)}}</div>
|
||||
</div>
|
||||
{{/for}}
|
||||
<h3>Alerts</h3>
|
||||
{{for data.stat_display.alerts}}
|
||||
<div class="line">
|
||||
<div class="statusLabel">{{:helper.link(value.label, 'exclamation-triangle', {'PRG_operation' : 'setstat', 'statdisp' : 'alert', 'alert' : value.alert}, value.alert == data.stat_display.type ? 'selected' : null)}}</div>
|
||||
</div>
|
||||
{{/for}}
|
||||
<h3>Messages</h3>
|
||||
<div class="item">
|
||||
{{if data.stat_display.type}}
|
||||
<div class="line">
|
||||
<div class="statusLabel">{{:helper.link('Line 1:', 'gear', {'PRG_operation':'setmsg1'})}}</div>
|
||||
<div class="statusValue">{{>data.stat_display.line_1}}</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="statusLabel">{{:helper.link('Line 2:', 'gear', {'PRG_operation':'setmsg2'})}}</div>
|
||||
<div class="statusValue">{{>data.stat_display.line_2}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else data.screen==3}}
|
||||
<!-- MESSAGES -->
|
||||
<h3>Messages</h3>
|
||||
{{if data.current_message}}
|
||||
{{:helper.link('Messages', 'home', {'PRG_operation' : 'messagelist'})}}
|
||||
<h3>{{:data.current_message_title}}</h3>
|
||||
<div class="item">
|
||||
{{:data.current_message}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{:helper.link('Back', 'home', {'PRG_operation' : 'main'})}}
|
||||
{{for data.messages}}
|
||||
<div class="line">
|
||||
<b>{{:value.title}}</b><br>
|
||||
{{:helper.link('Open', 'envelope-o', {'PRG_operation' : 'messagelist', 'msgid' : value.id})}}
|
||||
{{:helper.link('Delete', 'close', {'PRG_operation' : 'delmessage', 'msgid' : value.id})}}
|
||||
</div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
{{else data.screen==4}}
|
||||
<!-- ALERT LEVEL -->
|
||||
<h3>Security Level</h3>
|
||||
{{:helper.link('Back', 'home', {'PRG_operation' : 'main'})}}
|
||||
<div class="item">
|
||||
<div class="line">
|
||||
<div class="itemLabel">Security Level:</div>
|
||||
<div class="itemContents">{{>data.str_security_level}}</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="itemLabel">Presets:</div>
|
||||
<div class="itemContents">
|
||||
{{for data.levels}}
|
||||
{{:helper.link(value.name, 'comment', {'PRG_operation' : 'newalertlevel', 'level' : value.id}, value.id == data.security_level ? 'selected' : null)}}
|
||||
{{/for}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}<!-- SCREEN -->
|
||||
{{/if}}<!-- AUTHENTICATED -->
|
||||
@@ -1774,6 +1774,7 @@
|
||||
#include "code\modules\modular_computers\file_system\programs\airestorer.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\alarm.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\card.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\comms.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\configurator.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\file_browser.dm"
|
||||
#include "code\modules\modular_computers\file_system\programs\ntdownloader.dm"
|
||||
|
||||
Reference in New Issue
Block a user