|
|
|
@@ -61,7 +61,7 @@
|
|
|
|
|
// main interface
|
|
|
|
|
if("main")
|
|
|
|
|
state = STATE_DEFAULT
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
|
|
|
|
if("login")
|
|
|
|
|
var/mob/M = usr
|
|
|
|
|
|
|
|
|
@@ -71,21 +71,21 @@
|
|
|
|
|
if(check_access(I))
|
|
|
|
|
authenticated = 1
|
|
|
|
|
auth_id = "[I.registered_name] ([I.assignment])"
|
|
|
|
|
if((ACCESS_CAPTAIN in I.access))
|
|
|
|
|
if((20 in I.access))
|
|
|
|
|
authenticated = 2
|
|
|
|
|
playsound(src, 'sound/machines/terminal_on.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE)
|
|
|
|
|
if(obj_flags & EMAGGED)
|
|
|
|
|
authenticated = 2
|
|
|
|
|
auth_id = "Unknown"
|
|
|
|
|
to_chat(M, "<span class='warning'>[src] lets out a quiet alarm as its login is overridden.</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_on.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_alert.ogg', 25, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_alert.ogg', 25, FALSE)
|
|
|
|
|
if(prob(25))
|
|
|
|
|
for(var/mob/living/silicon/ai/AI in active_ais())
|
|
|
|
|
SEND_SOUND(AI, sound('sound/machines/terminal_alert.ogg', volume = 10)) //Very quiet for balance reasons
|
|
|
|
|
if("logout")
|
|
|
|
|
authenticated = 0
|
|
|
|
|
playsound(src, 'sound/machines/terminal_off.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE)
|
|
|
|
|
|
|
|
|
|
if("swipeidseclevel")
|
|
|
|
|
var/mob/M = usr
|
|
|
|
@@ -109,7 +109,7 @@
|
|
|
|
|
security_level_cd = world.time + 15 SECONDS
|
|
|
|
|
if(GLOB.security_level != old_level)
|
|
|
|
|
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
|
|
|
|
//Only notify people if an actual change happened
|
|
|
|
|
var/security_level = NUM2SECLEVEL(GLOB.security_level)
|
|
|
|
|
log_game("[key_name(usr)] has changed the security level to [security_level] with [src] at [AREACOORD(usr)].")
|
|
|
|
@@ -118,29 +118,34 @@
|
|
|
|
|
tmp_alertlevel = 0
|
|
|
|
|
else
|
|
|
|
|
to_chat(usr, "<span class='warning'>You are not authorized to do this!</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
|
|
|
|
tmp_alertlevel = 0
|
|
|
|
|
state = STATE_DEFAULT
|
|
|
|
|
else
|
|
|
|
|
to_chat(usr, "<span class='warning'>You need to swipe your ID!</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
|
|
|
|
|
|
|
|
|
if("announce")
|
|
|
|
|
if(authenticated==2)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
|
|
|
|
make_announcement(usr)
|
|
|
|
|
|
|
|
|
|
if("crossserver")
|
|
|
|
|
if(authenticated==2)
|
|
|
|
|
var/dest = href_list["cross_dest"]
|
|
|
|
|
if(!checkCCcooldown())
|
|
|
|
|
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
|
|
|
|
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
|
|
|
|
return
|
|
|
|
|
var/input = stripped_multiline_input(usr, "Please choose a message to transmit to allied stations. Please be aware that this process is very expensive, and abuse will lead to... termination.", "Send a message to an allied station.", "")
|
|
|
|
|
var/warning = dest == "all" ? "Please choose a message to transmit to allied stations." : "Please choose a message to transmit to [dest] sector station."
|
|
|
|
|
var/input = stripped_multiline_input(usr, "[warning] Please be aware that this process is very expensive, and abuse will lead to... termination.", "Send a message to an allied station.", "")
|
|
|
|
|
if(!input || !(usr in view(1,src)) || !checkCCcooldown())
|
|
|
|
|
return
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
|
|
|
|
send2otherserver("[station_name()]", input,"Comms_Console")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
|
|
|
|
if(dest == "all")
|
|
|
|
|
send2otherserver("[station_name()]", input,"Comms_Console")
|
|
|
|
|
else
|
|
|
|
|
send2otherserver("[station_name()]", input,"Comms_Console", list(dest))
|
|
|
|
|
minor_announce(input, title = "Outgoing message to allied station")
|
|
|
|
|
usr.log_talk(input, LOG_SAY, tag="message to the other server")
|
|
|
|
|
message_admins("[ADMIN_LOOKUPFLW(usr)] has sent a message to the other server.")
|
|
|
|
@@ -156,30 +161,34 @@
|
|
|
|
|
var/datum/map_template/shuttle/S = locate(href_list["chosen_shuttle"]) in shuttles
|
|
|
|
|
if(S && istype(S))
|
|
|
|
|
if(SSshuttle.emergency.mode != SHUTTLE_RECALL && SSshuttle.emergency.mode != SHUTTLE_IDLE)
|
|
|
|
|
to_chat(usr, "It's a bit late to buy a new shuttle, don't you think?")
|
|
|
|
|
to_chat(usr, "<span class='alert'>It's a bit late to buy a new shuttle, don't you think?</span>")
|
|
|
|
|
return
|
|
|
|
|
if(SSshuttle.shuttle_purchased)
|
|
|
|
|
to_chat(usr, "A replacement shuttle has already been purchased.")
|
|
|
|
|
to_chat(usr, "<span class='alert'>A replacement shuttle has already been purchased.</span>")
|
|
|
|
|
else if(!S.prerequisites_met())
|
|
|
|
|
to_chat(usr, "You have not met the requirements for purchasing this shuttle.")
|
|
|
|
|
to_chat(usr, "<span class='alert'>You have not met the requirements for purchasing this shuttle.</span>")
|
|
|
|
|
else
|
|
|
|
|
if(SSshuttle.points >= S.credit_cost)
|
|
|
|
|
var/points_to_check
|
|
|
|
|
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
|
|
|
|
if(D)
|
|
|
|
|
points_to_check = D.account_balance
|
|
|
|
|
if(points_to_check >= S.credit_cost)
|
|
|
|
|
SSshuttle.shuttle_purchased = TRUE
|
|
|
|
|
SSshuttle.unload_preview()
|
|
|
|
|
SSshuttle.load_template(S)
|
|
|
|
|
SSshuttle.existing_shuttle = SSshuttle.emergency
|
|
|
|
|
SSshuttle.action_load(S)
|
|
|
|
|
SSshuttle.points -= S.credit_cost
|
|
|
|
|
minor_announce("[usr.real_name] has purchased [S.name] for [S.credit_cost] credits." , "Shuttle Purchase")
|
|
|
|
|
D.adjust_money(-S.credit_cost)
|
|
|
|
|
minor_announce("[usr.real_name] has purchased [S.name] for [S.credit_cost] credits.[S.extra_desc ? " [S.extra_desc]" : ""]" , "Shuttle Purchase")
|
|
|
|
|
message_admins("[ADMIN_LOOKUPFLW(usr)] purchased [S.name].")
|
|
|
|
|
log_shuttle("[key_name(usr)] has purchased [S.name].")
|
|
|
|
|
SSblackbox.record_feedback("text", "shuttle_purchase", 1, "[S.name]")
|
|
|
|
|
else
|
|
|
|
|
to_chat(usr, "Not enough credits.")
|
|
|
|
|
to_chat(usr, "<span class='alert'>Insufficient credits.</span>")
|
|
|
|
|
|
|
|
|
|
if("callshuttle")
|
|
|
|
|
state = STATE_DEFAULT
|
|
|
|
|
if(authenticated)
|
|
|
|
|
if(authenticated && SSshuttle.canEvac(usr))
|
|
|
|
|
state = STATE_CALLSHUTTLE
|
|
|
|
|
if("callshuttle2")
|
|
|
|
|
if(authenticated)
|
|
|
|
@@ -260,7 +269,7 @@
|
|
|
|
|
|
|
|
|
|
// Status display stuff
|
|
|
|
|
if("setstat")
|
|
|
|
|
playsound(src, "terminal_type", 50, 0)
|
|
|
|
|
playsound(src, "terminal_type", 50, FALSE)
|
|
|
|
|
switch(href_list["statdisp"])
|
|
|
|
|
if("message")
|
|
|
|
|
post_status("message", stat_msg1, stat_msg2)
|
|
|
|
@@ -280,12 +289,12 @@
|
|
|
|
|
if("MessageCentCom")
|
|
|
|
|
if(authenticated)
|
|
|
|
|
if(!checkCCcooldown())
|
|
|
|
|
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
|
|
|
|
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
|
|
|
|
return
|
|
|
|
|
var/input = stripped_input(usr, "Please choose a message to transmit to CentCom via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "Send a message to CentCom.", "")
|
|
|
|
|
if(!input || !(usr in view(1,src)) || !checkCCcooldown())
|
|
|
|
|
return
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
|
|
|
|
CentCom_announce(input, usr)
|
|
|
|
|
to_chat(usr, "<span class='notice'>Message transmitted to Central Command.</span>")
|
|
|
|
|
for(var/client/X in GLOB.admins)
|
|
|
|
@@ -298,15 +307,15 @@
|
|
|
|
|
|
|
|
|
|
// OMG SYNDICATE ...LETTERHEAD
|
|
|
|
|
if("MessageSyndicate")
|
|
|
|
|
if((authenticated==2) && (obj_flags & EMAGGED))
|
|
|
|
|
if((authenticated) && (obj_flags & EMAGGED))
|
|
|
|
|
if(!checkCCcooldown())
|
|
|
|
|
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
|
|
|
|
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
|
|
|
|
return
|
|
|
|
|
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING COORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "Send a message to /??????/.", "")
|
|
|
|
|
if(!input || !(usr in view(1,src)) || !checkCCcooldown())
|
|
|
|
|
return
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
|
|
|
|
Syndicate_announce(input, usr)
|
|
|
|
|
to_chat(usr, "<span class='danger'>SYSERR @l(19833)of(transmit.dm): !@$ MESSAGE TRANSMITTED TO SYNDICATE COMMAND.</span>")
|
|
|
|
|
for(var/client/X in GLOB.admins)
|
|
|
|
@@ -319,7 +328,7 @@
|
|
|
|
|
|
|
|
|
|
if("RestoreBackup")
|
|
|
|
|
to_chat(usr, "<span class='notice'>Backup routing data restored!</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
|
|
|
|
obj_flags &= ~EMAGGED
|
|
|
|
|
updateDialog()
|
|
|
|
|
|
|
|
|
@@ -333,8 +342,8 @@
|
|
|
|
|
return
|
|
|
|
|
Nuke_request(input, usr)
|
|
|
|
|
to_chat(usr, "<span class='notice'>Request sent.</span>")
|
|
|
|
|
usr.log_message("has requested the nuclear codes from CentCom", LOG_SAY)
|
|
|
|
|
priority_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","commandreport")
|
|
|
|
|
usr.log_message("has requested the nuclear codes from CentCom with reason \"[input]\"", LOG_SAY)
|
|
|
|
|
priority_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')
|
|
|
|
|
CM.lastTimeUsed = world.time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -440,8 +449,7 @@
|
|
|
|
|
if(authenticated == 1)
|
|
|
|
|
authenticated = 2
|
|
|
|
|
to_chat(user, "<span class='danger'>You scramble the communication routing circuits!</span>")
|
|
|
|
|
playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0)
|
|
|
|
|
return TRUE
|
|
|
|
|
playsound(src, 'sound/machines/terminal_alert.ogg', 50, FALSE)
|
|
|
|
|
|
|
|
|
|
/obj/machinery/computer/communications/ui_interact(mob/user)
|
|
|
|
|
. = ..()
|
|
|
|
@@ -506,16 +514,16 @@
|
|
|
|
|
dat += "<BR>\[ <A HREF='?src=[REF(src)];operation=login'>Log In</A> \]"
|
|
|
|
|
if(STATE_CALLSHUTTLE)
|
|
|
|
|
dat += get_call_shuttle_form()
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
|
|
|
|
if(STATE_CANCELSHUTTLE)
|
|
|
|
|
dat += get_cancel_shuttle_form()
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
|
|
|
|
if(STATE_MESSAGELIST)
|
|
|
|
|
dat += "Messages:"
|
|
|
|
|
for(var/i in 1 to messages.len)
|
|
|
|
|
var/datum/comm_message/M = messages[i]
|
|
|
|
|
dat += "<BR><A HREF='?src=[REF(src)];operation=viewmessage;message-num=[i]'>[M.title]</A>"
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
|
|
|
|
if(STATE_VIEWMESSAGE)
|
|
|
|
|
if (currmsg)
|
|
|
|
|
dat += "<B>[currmsg.title]</B><BR><BR>[currmsg.content]"
|
|
|
|
@@ -549,13 +557,12 @@
|
|
|
|
|
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=redalert'>Red Alert</A> |"
|
|
|
|
|
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=lockdown'>Lockdown</A> |"
|
|
|
|
|
dat += " <A HREF='?src=[REF(src)];operation=setstat;statdisp=alert;alert=biohazard'>Biohazard</A> \]<BR><HR>"
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
|
|
|
|
if(STATE_ALERT_LEVEL)
|
|
|
|
|
dat += "Current alert level: [NUM2SECLEVEL(GLOB.security_level)]<BR>"
|
|
|
|
|
if(GLOB.security_level == SEC_LEVEL_DELTA)
|
|
|
|
|
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_AMBER]'>Amber</A><BR>"
|
|
|
|
|
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_GREEN]'>Green</A>"
|
|
|
|
|
if(STATE_CONFIRM_LEVEL)
|
|
|
|
@@ -563,7 +570,7 @@
|
|
|
|
|
dat += "Confirm the change to: [NUM2SECLEVEL(tmp_alertlevel)]<BR>"
|
|
|
|
|
dat += "<A HREF='?src=[REF(src)];operation=swipeidseclevel'>Swipe ID</A> to confirm change.<BR>"
|
|
|
|
|
if(STATE_TOGGLE_EMERGENCY)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
|
|
|
|
|
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
|
|
|
|
if(GLOB.emergency_access == 1)
|
|
|
|
|
dat += "<b>Emergency Maintenance Access is currently <font color='red'>ENABLED</font></b>"
|
|
|
|
|
dat += "<BR>Restore maintenance access restrictions? <BR>\[ <A HREF='?src=[REF(src)];operation=disableemergency'>OK</A> | <A HREF='?src=[REF(src)];operation=viewmessage'>Cancel</A> \]"
|
|
|
|
@@ -572,7 +579,8 @@
|
|
|
|
|
dat += "<BR>Lift access restrictions on maintenance and external airlocks? <BR>\[ <A HREF='?src=[REF(src)];operation=enableemergency'>OK</A> | <A HREF='?src=[REF(src)];operation=viewmessage'>Cancel</A> \]"
|
|
|
|
|
|
|
|
|
|
if(STATE_PURCHASE)
|
|
|
|
|
dat += "Budget: [SSshuttle.points] Credits.<BR>"
|
|
|
|
|
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
|
|
|
|
dat += "Budget: [D.account_balance] Credits.<BR>"
|
|
|
|
|
dat += "<BR>"
|
|
|
|
|
dat += "<b>Caution: Purchasing dangerous shuttles may lead to mutiny and/or death.</b><br>"
|
|
|
|
|
dat += "<BR>"
|
|
|
|
@@ -696,7 +704,6 @@
|
|
|
|
|
if(GLOB.security_level == SEC_LEVEL_DELTA)
|
|
|
|
|
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=ai-securitylevel;newalertlevel=[SEC_LEVEL_AMBER]'>Amber</A><BR>"
|
|
|
|
|
dat += "<A HREF='?src=[REF(src)];operation=ai-securitylevel;newalertlevel=[SEC_LEVEL_BLUE]'>Blue</A><BR>"
|
|
|
|
|
dat += "<A HREF='?src=[REF(src)];operation=ai-securitylevel;newalertlevel=[SEC_LEVEL_GREEN]'>Green</A>"
|
|
|
|
|
|
|
|
|
@@ -713,7 +720,7 @@
|
|
|
|
|
|
|
|
|
|
/obj/machinery/computer/communications/proc/make_announcement(mob/living/user, is_silicon)
|
|
|
|
|
if(!SScommunications.can_announce(user, is_silicon))
|
|
|
|
|
to_chat(user, "Intercomms recharging. Please stand by.")
|
|
|
|
|
to_chat(user, "<span class='alert'>Intercomms recharging. Please stand by.</span>")
|
|
|
|
|
return
|
|
|
|
|
var/input = stripped_input(user, "Please choose a message to announce to the station crew.", "What?")
|
|
|
|
|
if(!input || !user.canUseTopic(src))
|
|
|
|
|