diff --git a/code/WorkInProgress/computer3/computers/communications.dm b/code/WorkInProgress/computer3/computers/communications.dm
index be433c7e757..01351dc4863 100644
--- a/code/WorkInProgress/computer3/computers/communications.dm
+++ b/code/WorkInProgress/computer3/computers/communications.dm
@@ -131,12 +131,6 @@
state = STATE_DEFAULT
if(authenticated)
state = STATE_CANCELSHUTTLE
- if("cancelshuttle2" in href_list)
- if(!computer.radio.subspace)
- return
- if(authenticated)
- cancel_call_proc(usr)
- state = STATE_DEFAULT
if("messagelist" in href_list)
currmsg = 0
state = STATE_MESSAGELIST
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index 44956cb8b22..b6d519064c3 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -1,4 +1,36 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
+
+#define COMM_SCREEN_MAIN 1
+#define COMM_SCREEN_STAT 2
+#define COMM_SCREEN_MESSAGES 3
+#define COMM_SCREEN_SECLEVEL 4
+
+var/shuttle_call/shuttle_calls[0]
+
+#define SHUTTLE_RECALL -1
+#define SHUTTLE_CALL 1
+#define SHUTTLE_TRANSFER 2
+
+/shuttle_call
+ var/direction=0
+ var/who=""
+ var/ckey=""
+ var/turf/from=null
+ var/where=""
+ var/when
+ var/eta=null
+
+/shuttle_call/New(var/mob/user,var/obj/machinery/computer/communications/computer,var/dir)
+ direction=dir
+ if(user)
+ who="[user]"
+ ckey="[user.key]"
+ if(computer)
+ where="[computer]"
+ from=get_turf(computer)
+ when=worldtime2text()
+ if(dir==SHUTTLE_RECALL)
+ var/timeleft=emergency_shuttle.timeleft()
+ eta="[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
// The communications computer
/obj/machinery/computer/communications
@@ -13,40 +45,25 @@
var/list/messagetext = list()
var/currmsg = 0
var/aicurrmsg = 0
- var/state = STATE_DEFAULT
- var/aistate = STATE_DEFAULT
+ 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/const/STATE_DEFAULT = 1
- var/const/STATE_CALLSHUTTLE = 2
- var/const/STATE_CANCELSHUTTLE = 3
- var/const/STATE_MESSAGELIST = 4
- var/const/STATE_VIEWMESSAGE = 5
- var/const/STATE_DELMESSAGE = 6
- var/const/STATE_STATUSDISPLAY = 7
- var/const/STATE_ALERT_LEVEL = 8
- var/const/STATE_CONFIRM_LEVEL = 9
- var/const/STATE_CREWTRANSFER = 10
var/status_display_freq = "1435"
var/stat_msg1
var/stat_msg2
-
-
-
-/obj/machinery/computer/communications/process()
- if(..())
- if(state != STATE_STATUSDISPLAY)
- src.updateDialog()
-
+ var/display_type="blank"
/obj/machinery/computer/communications/Topic(href, href_list)
- if(..())
+ if(..(href, href_list))
return
- if (src.z > 1)
+
+ if (!(src.z in list(STATION_Z,CENTCOMM_Z)))
usr << "\red Unable to establish a connection: \black You're too far away from the station!"
return
+
usr.set_machine(src)
if(!href_list["operation"])
@@ -54,7 +71,7 @@
switch(href_list["operation"])
// main interface
if("main")
- src.state = STATE_DEFAULT
+ setMenuState(usr,COMM_SCREEN_MAIN)
if("login")
var/mob/M = usr
var/obj/item/weapon/card/id/I = M.get_active_hand()
@@ -68,8 +85,16 @@
authenticated = 2
if("logout")
authenticated = 0
+ setMenuState(usr,COMM_SCREEN_MAIN)
- if("swipeidseclevel")
+ // ALART LAVUL
+ if("changeseclevel")
+ setMenuState(usr,COMM_SCREEN_SECLEVEL)
+
+ if("newalertlevel")
+ if(issilicon(usr))
+ return
+ tmp_alertlevel = text2num(href_list["level"])
var/mob/M = usr
var/obj/item/weapon/card/id/I = M.get_active_hand()
if (istype(I, /obj/item/device/pda))
@@ -95,12 +120,12 @@
else:
usr << "You are not authorized to do this."
tmp_alertlevel = 0
- state = STATE_DEFAULT
+ setMenuState(usr,COMM_SCREEN_MAIN)
else
usr << "You need to swipe your ID."
if("announce")
- if(src.authenticated==2)
+ if(src.authenticated==2 && !issilicon(usr))
if(message_cooldown) return
var/input = stripped_input(usr, "Please choose a message to announce to the station crew.", "What?")
if(!input || !(usr in view(1,src)))
@@ -113,67 +138,63 @@
message_cooldown = 0
if("callshuttle")
- src.state = STATE_DEFAULT
if(src.authenticated)
- src.state = STATE_CALLSHUTTLE
- if("callshuttle2")
- if(src.authenticated)
- call_shuttle_proc(usr)
- if(emergency_shuttle.online)
- post_status("shuttle")
- src.state = STATE_DEFAULT
+ var/response = alert("Are you sure you wish to call the shuttle?", "Confirm", "Yes", "No")
+ if(response == "Yes")
+ call_shuttle_proc(usr)
+ if(emergency_shuttle.online)
+ post_status("shuttle")
+ setMenuState(usr,COMM_SCREEN_MAIN)
if("cancelshuttle")
- src.state = STATE_DEFAULT
+ if(issilicon(usr)) return
if(src.authenticated)
- src.state = STATE_CANCELSHUTTLE
- if("cancelshuttle2")
- if(src.authenticated)
- cancel_call_proc(usr)
- src.state = STATE_DEFAULT
+ var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
+ if(response == "Yes")
+ recall_shuttle(usr)
+ if(emergency_shuttle.online)
+ post_status("shuttle")
+ setMenuState(usr,COMM_SCREEN_MAIN)
if("messagelist")
src.currmsg = 0
- src.state = STATE_MESSAGELIST
- if("viewmessage")
- src.state = STATE_VIEWMESSAGE
- if (!src.currmsg)
- if(href_list["message-num"])
- src.currmsg = text2num(href_list["message-num"])
- else
- src.state = STATE_MESSAGELIST
+ if(href_list["msgid"])
+ setCurrentMessage(usr, text2num(href_list["msgid"]))
+ setMenuState(usr,COMM_SCREEN_MESSAGES)
if("delmessage")
- src.state = (src.currmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST
- if("delmessage2")
- if(src.authenticated)
+ if(href_list["msgid"])
+ src.currmsg = text2num(href_list["msgid"])
+ var/response = alert("Are you sure you wish to delete this message?", "Confirm", "Yes", "No")
+ if(response == "Yes")
if(src.currmsg)
- var/title = src.messagetitle[src.currmsg]
- var/text = src.messagetext[src.currmsg]
+ var/id = getCurrentMessage()
+ var/title = src.messagetitle[id]
+ var/text = src.messagetext[id]
src.messagetitle.Remove(title)
src.messagetext.Remove(text)
- if(src.currmsg == src.aicurrmsg)
- src.aicurrmsg = 0
- src.currmsg = 0
- src.state = STATE_MESSAGELIST
- else
- src.state = STATE_VIEWMESSAGE
+ if(currmsg==id) currmsg=0
+ if(aicurrmsg==id) aicurrmsg=0
+ setMenuState(usr,COMM_SCREEN_MESSAGES)
+
if("status")
- src.state = STATE_STATUSDISPLAY
+ setMenuState(usr,COMM_SCREEN_STAT)
// Status display stuff
if("setstat")
- switch(href_list["statdisp"])
+ display_type=href_list["statdisp"]
+ switch(display_type)
if("message")
post_status("message", stat_msg1, stat_msg2)
if("alert")
post_status("alert", href_list["alert"])
else
post_status(href_list["statdisp"])
+ setMenuState(usr,COMM_SCREEN_STAT)
if("setmsg1")
stat_msg1 = input("Line 1", "Enter Message Text", stat_msg1) as text|null
- src.updateDialog()
+ setMenuState(usr,COMM_SCREEN_STAT)
if("setmsg2")
stat_msg2 = input("Line 2", "Enter Message Text", stat_msg2) as text|null
- src.updateDialog()
+ setMenuState(usr,COMM_SCREEN_STAT)
// OMG CENTCOMM LETTERHEAD
if("MessageCentcomm")
@@ -190,6 +211,7 @@
centcomm_message_cooldown = 1
spawn(6000)//10 minute cooldown
centcomm_message_cooldown = 0
+ setMenuState(usr,COMM_SCREEN_MAIN)
// OMG SYNDICATE ...LETTERHEAD
@@ -207,59 +229,14 @@
centcomm_message_cooldown = 1
spawn(6000)//10 minute cooldown
centcomm_message_cooldown = 0
+ setMenuState(usr,COMM_SCREEN_MAIN)
if("RestoreBackup")
usr << "Backup routing data restored!"
src.emagged = 0
- src.updateDialog()
+ setMenuState(usr,COMM_SCREEN_MAIN)
-
-
- // AI interface
- if("ai-main")
- src.aicurrmsg = 0
- src.aistate = STATE_DEFAULT
- if("ai-callshuttle")
- src.aistate = STATE_CALLSHUTTLE
- if("ai-callshuttle2")
- call_shuttle_proc(usr)
- src.aistate = STATE_DEFAULT
- if("ai-messagelist")
- src.aicurrmsg = 0
- src.aistate = STATE_MESSAGELIST
- if("ai-viewmessage")
- src.aistate = STATE_VIEWMESSAGE
- if (!src.aicurrmsg)
- if(href_list["message-num"])
- src.aicurrmsg = text2num(href_list["message-num"])
- else
- src.aistate = STATE_MESSAGELIST
- if("ai-delmessage")
- src.aistate = (src.aicurrmsg) ? STATE_DELMESSAGE : STATE_MESSAGELIST
- if("ai-delmessage2")
- if(src.aicurrmsg)
- var/title = src.messagetitle[src.aicurrmsg]
- var/text = src.messagetext[src.aicurrmsg]
- src.messagetitle.Remove(title)
- src.messagetext.Remove(text)
- if(src.currmsg == src.aicurrmsg)
- src.currmsg = 0
- src.aicurrmsg = 0
- src.aistate = STATE_MESSAGELIST
- if("ai-status")
- src.aistate = STATE_STATUSDISPLAY
-
- if("securitylevel")
- src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
- if(!tmp_alertlevel) tmp_alertlevel = 0
- state = STATE_CONFIRM_LEVEL
-
- if("changeseclevel")
- state = STATE_ALERT_LEVEL
-
-
-
- src.updateUsrDialog()
+ return 1
/obj/machinery/computer/communications/attackby(var/obj/I as obj, var/mob/user as mob)
if(istype(I,/obj/item/weapon/card/emag/))
@@ -270,154 +247,111 @@
/obj/machinery/computer/communications/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
-
/obj/machinery/computer/communications/attack_paw(var/mob/user as mob)
return src.attack_hand(user)
/obj/machinery/computer/communications/attack_hand(var/mob/user as mob)
- if(..())
+ if(..(user))
return
- if (src.z > 6)
+
+ if (!(src.z in list(STATION_Z, CENTCOMM_Z)))
user << "\red Unable to establish a connection: \black You're too far away from the station!"
return
- user.set_machine(src)
- var/dat = "
Communications Console"
- if (emergency_shuttle.online && emergency_shuttle.location==0)
- var/timeleft = emergency_shuttle.timeleft()
- dat += "Emergency shuttle\n
\nETA: [timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]
"
+ ui_interact(user)
- if (istype(user, /mob/living/silicon))
- var/dat2 = src.interact_ai(user) // give the AI a different interact proc to limit its access
- if(dat2)
- dat += dat2
- user << browse(dat, "window=communications;size=400x500")
- onclose(user, "communications")
+/obj/machinery/computer/communications/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+ if(user.stat)
return
- switch(src.state)
- if(STATE_DEFAULT)
- if (src.authenticated)
- dat += "
\[ Log Out \]"
- if (src.authenticated==2)
- dat += "
\[ Make An Announcement \]"
- if(src.emagged == 0)
- dat += "
\[ Send an emergency message to Centcomm \]"
- else
- dat += "
\[ Send an emergency message to \[UNKNOWN\] \]"
- dat += "
\[ Restore Backup Routing Data \]"
+ // this is the data which will be sent to the ui
+ var/data[0]
+ data["is_ai"] = issilicon(user)
+ data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state
+ data["emagged"] = emagged
+ data["authenticated"] = authenticated
+ data["screen"] = getMenuState(usr)
- dat += "
\[ Change alert level \]"
- if(emergency_shuttle.location==0)
- if (emergency_shuttle.online)
- dat += "
\[ Cancel Shuttle Call \]"
- else
- dat += "
\[ Call Emergency Shuttle \]"
+ 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"] = get_security_level()
+ data["levels"] = list(
+ list("id"=SEC_LEVEL_GREEN, "name"="Green"),
+ list("id"=SEC_LEVEL_BLUE, "name"="Blue"),
+ //SEC_LEVEL_RED = list("name"="Red"),
+ )
- dat += "
\[ Set Status Display \]"
- else
- dat += "
\[ Log In \]"
- dat += "
\[ Message List \]"
- if(STATE_CALLSHUTTLE)
- dat += "Are you sure you want to call the shuttle? \[ OK | Cancel \]"
- if(STATE_CANCELSHUTTLE)
- dat += "Are you sure you want to cancel the shuttle? \[ OK | Cancel \]"
- if(STATE_MESSAGELIST)
- dat += "Messages:"
- for(var/i = 1; i<=src.messagetitle.len; i++)
- dat += "
[src.messagetitle[i]]"
- if(STATE_VIEWMESSAGE)
- if (src.currmsg)
- dat += "[src.messagetitle[src.currmsg]]
[src.messagetext[src.currmsg]]"
- if (src.authenticated)
- dat += "
\[ Delete \]"
- else
- src.state = STATE_MESSAGELIST
- src.attack_hand(user)
- return
- if(STATE_DELMESSAGE)
- if (src.currmsg)
- dat += "Are you sure you want to delete this message? \[ OK | Cancel \]"
- else
- src.state = STATE_MESSAGELIST
- src.attack_hand(user)
- return
- if(STATE_STATUSDISPLAY)
- dat += "Set Status Displays
"
- dat += "\[ Clear \]
"
- dat += "\[ Shuttle ETA \]
"
- dat += "\[ Message \]"
- dat += "
"
- dat += "\[ Alert: None |"
- dat += " Red Alert |"
- dat += " Lockdown |"
- dat += " Biohazard \]
"
- if(STATE_ALERT_LEVEL)
- dat += "Current alert level: [get_security_level()]
"
- if(security_level == SEC_LEVEL_DELTA)
- dat += "The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate."
- else
- dat += "Blue
"
- dat += "Green"
- if(STATE_CONFIRM_LEVEL)
- dat += "Current alert level: [get_security_level()]
"
- dat += "Confirm the change to: [num2seclevel(tmp_alertlevel)]
"
- dat += "Swipe ID to confirm change.
"
+ var/msg_data[0]
+ for(var/i=1;i<=src.messagetext.len;i++)
+ var/cur_msg[0]
+ cur_msg["title"]=messagetitle[i]
+ cur_msg["body"]=messagetext[i]
+ msg_data += list(cur_msg)
+ data["messages"] = msg_data
+ data["current_message"] = data["is_ai"] ? aicurrmsg : currmsg
- dat += "
\[ [(src.state != STATE_DEFAULT) ? "Main Menu | " : ""]Close \]"
- user << browse(dat, "window=communications;size=400x500")
- onclose(user, "communications")
+ var/shuttle[0]
+ shuttle["on"]=emergency_shuttle.online
+ if (emergency_shuttle.online && emergency_shuttle.location==0)
+ var/timeleft=emergency_shuttle.timeleft()
+ shuttle["eta"]="[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
+ shuttle["pos"] = emergency_shuttle.location
+ shuttle["can_recall"]=!(recall_time_limit && world.time >= recall_time_limit)
+ data["shuttle"]=shuttle
+ // update the ui if it exists, returns null if no ui is passed/found
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ if (!ui)
+ // the ui does not exist, so we'll create a new() one
+ // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
+ ui = new(user, src, ui_key, "comm_console.tmpl", "Communications Console", 400, 500)
+ // when the ui is first opened this is the data it will use
+ ui.set_initial_data(data)
+ // open the new ui window
+ ui.open()
+ // auto update every Master Controller tick
+ ui.set_auto_update(1)
+/obj/machinery/computer/communications/proc/setCurrentMessage(var/mob/user,var/value)
+ if(issilicon(user))
+ aicurrmsg=value
+ else
+ currmsg=value
-/obj/machinery/computer/communications/proc/interact_ai(var/mob/living/silicon/ai/user as mob)
- var/dat = ""
- switch(src.aistate)
- if(STATE_DEFAULT)
- if(emergency_shuttle.location==0 && !emergency_shuttle.online)
- dat += "
\[ Call Emergency Shuttle \]"
- dat += "
\[ Message List \]"
- dat += "
\[ Set Status Display \]"
- if(STATE_CALLSHUTTLE)
- dat += "Are you sure you want to call the shuttle? \[ OK | Cancel \]"
- if(STATE_MESSAGELIST)
- dat += "Messages:"
- for(var/i = 1; i<=src.messagetitle.len; i++)
- dat += "
[src.messagetitle[i]]"
- if(STATE_VIEWMESSAGE)
- if (src.aicurrmsg)
- dat += "[src.messagetitle[src.aicurrmsg]]
[src.messagetext[src.aicurrmsg]]"
- dat += "
\[ Delete \]"
- else
- src.aistate = STATE_MESSAGELIST
- src.attack_hand(user)
- return null
- if(STATE_DELMESSAGE)
- if(src.aicurrmsg)
- dat += "Are you sure you want to delete this message? \[ OK | Cancel \]"
- else
- src.aistate = STATE_MESSAGELIST
- src.attack_hand(user)
- return
+/obj/machinery/computer/communications/proc/getCurrentMessage(var/mob/user)
+ if(issilicon(user))
+ return aicurrmsg
+ else
+ return currmsg
- if(STATE_STATUSDISPLAY)
- dat += "Set Status Displays
"
- dat += "\[ Clear \]
"
- dat += "\[ Shuttle ETA \]
"
- dat += "\[ Message \]"
- dat += "
"
- dat += "\[ Alert: None |"
- dat += " Red Alert |"
- dat += " Lockdown |"
- dat += " Biohazard \]
"
+/obj/machinery/computer/communications/proc/setMenuState(var/mob/user,var/value)
+ if(issilicon(user))
+ ai_menu_state=value
+ else
+ menu_state=value
-
- dat += "
\[ [(src.aistate != STATE_DEFAULT) ? "Main Menu | " : ""]Close \]"
- return dat
+/obj/machinery/computer/communications/proc/getMenuState(var/mob/user)
+ if(issilicon(user))
+ return ai_menu_state
+ else
+ return menu_state
/proc/enable_prison_shuttle(var/mob/user)
for(var/obj/machinery/computer/prison_shuttle/PS in world)
@@ -488,12 +422,12 @@
emergency_shuttle.shuttlealert(1)
emergency_shuttle.incall()
log_game("[key_name(user)] has called the shuttle.")
- message_admins("[key_name_admin(user)] has called the shuttle.", 1)
+ message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1)
captain_announce("A crew transfer has been initiated. The shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
return
-/proc/cancel_call_proc(var/mob/user)
+/proc/recall_shuttle(var/mob/user)
if ((!( ticker ) || emergency_shuttle.location || emergency_shuttle.direction == 0 || emergency_shuttle.timeleft() < 300))
return
if(ticker.mode.name == "meteor")
@@ -502,7 +436,7 @@
if(emergency_shuttle.direction != -1 && emergency_shuttle.online) //check that shuttle isn't already heading to centcomm
emergency_shuttle.recall()
log_game("[key_name(user)] has recalled the shuttle.")
- message_admins("[key_name_admin(user)] has recalled the shuttle.", 1)
+ 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)
diff --git a/code/global.dm b/code/global.dm
index 3dee0d74ab2..867cd5f1f0c 100644
--- a/code/global.dm
+++ b/code/global.dm
@@ -298,3 +298,7 @@ var/score_dmgestname = null // who had the most damage on the shuttle (but was s
var/score_dmgestjob = null
var/score_dmgestdamage = 0
var/score_dmgestkey = null
+
+
+// Recall time limit: 2 hours
+var/recall_time_limit=72000
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index b971185c96e..1fd574f512b 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -288,7 +288,7 @@ var/list/ai_list = list()
if(AI.control_disabled)
src << "Wireless control is disabled!"
return
- cancel_call_proc(src)
+ recall_shuttle(src)
return
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm
index 81a401fb773..454903d88e0 100644
--- a/code/modules/nano/nanoui.dm
+++ b/code/modules/nano/nanoui.dm
@@ -19,7 +19,7 @@ nanoui is used to open and update nano browser uis
// the title of this ui
var/title
// /vg/ - Whether to write debug information to nano/debug.html
- var/writeDebug=FALSE
+ var/writeDebug=TRUE
// the key of this ui, this is to allow multiple (different) uis for each src_object
var/ui_key
// window_id is used as the window name/identifier for browse and onclose
@@ -142,6 +142,8 @@ nanoui is used to open and update nano browser uis
set_status(STATUS_DISABLED, push_update) // no updates, completely disabled (red visibility)
else if (user.restrained() || user.lying)
set_status(STATUS_UPDATE, push_update) // update only (orange visibility)
+ else if (istype(src_object, /obj/item/device/uplink/hidden)) // You know what if they have the uplink open let them use the UI
+ set_status(STATUS_INTERACTIVE, push_update) // Will build in distance checks on the topics for sanity.
else if (!(src_object in view(4, user))) // If the src object is not in visable, set status to 0
set_status(STATUS_DISABLED, push_update) // interactive (green visibility)
else if (dist <= 1)
diff --git a/nano/css/shared.css b/nano/css/shared.css
index f2eecbe3cc9..600bf9bc837 100644
--- a/nano/css/shared.css
+++ b/nano/css/shared.css
@@ -509,3 +509,18 @@ th.misc
color: #ffffff;
}
+.fixed {
+ float: none;
+ display: inline; /* inline-block */
+ padding: 0px 3px 3px 0px;
+ line-height: 50%;
+ height: 16px;
+ vertical-align: middle;
+ margin: 0;
+}
+
+.fixed .uiIcon16 {
+ float: none;
+ display: inline; /* inline-block */
+ vertical-align: middle;
+}
diff --git a/nano/templates/comm_console.tmpl b/nano/templates/comm_console.tmpl
new file mode 100644
index 00000000000..604ec1a0cda
--- /dev/null
+++ b/nano/templates/comm_console.tmpl
@@ -0,0 +1,134 @@
+
+{{!--
+#define COMM_SCREEN_MAIN 1
+#define COMM_SCREEN_STAT 2
+#define COMM_SCREEN_MESSAGES 3
+#define COMM_SCREEN_SECLEVEL 4
+ --}}
+{{if !authenticated}}
+Please swipe your ID card. {{:~link('Log In','unlocked',{'operation':'login'},null,'fixed')}}
+{{else}}
+ {{if !is_ai}}
+ Please remember to {{:~link('Log Out','locked',{'operation':'logout'},null,'fixed')}}
+ {{/if}}
+
+
+
Emergency Shuttle:
+ {{if shuttle.eta}}
+
ETA:
+
+ {{>shuttle.eta}}
+
+ {{/if}}{{!-- SHUTTLE ETA --}}
+
Options:
+
+ {{if shuttle.pos == 0}}
+ {{if shuttle.on && !is_ai}}
+ {{:~link('Cancel Shuttle','arrowreturnthick-1-w',{'operation':'cancelshuttle'})}}
+ {{else !shuttle.on}}
+ {{:~link('Call Shuttle','arrowthickstop-1-s',{'operation':'callshuttle'})}}
+ {{/if}}
+ {{/if}}
+
+
+
+ {{if screen==1}}
+ {{!-- MAIN SCREEN --}}
+ Menu
+
+ {{if authenticated==2}}
+
+ {{:~link('Make an Announcement','alert',{'operation':'announce'})}}
+
+
+ {{if emagged}}
+ {{:~link('Message [UNKNOWN]','mail-closed',{'operation':'MessageSyndicate'})}}
+
+
+ {{:~link('Reset Relays','refresh',{'operation':'MessageCentcomm'})}}
+ {{else}}
+ {{:~link('Message CentComm','mail-closed',{'operation':'MessageCentcomm'})}}
+ {{/if}}
+
+ {{/if}}
+
+ {{:~link('Change Alert Level','signal-diag',{'operation':'changeseclevel'})}}
+
+
+ {{:~link('Change Status Displays','info',{'operation':'status'})}}
+
+
+ {{:~link('Message List','comment',{'operation':'messagelist'})}}
+
+
+ {{else screen==2}}
+ {{!-- STATUS DISPLAYS --}}
+ Status Displays
+ {{:~link('Back','home',{'operation':'main'})}}
+ Presets
+ {{for stat_display.presets}}
+
+
{{:~link(label,'info',{'operation':'setstat','statdisp':name},null,(name==~root.stat_display.type?'linkOn':''))}}
+
+ {{/for}}
+ Alerts
+ {{for stat_display.alerts}}
+
+
{{:~link(label,'alert',{'operation':'setstat','statdisp':'alert','alert':alert},null,(name==~root.stat_display.type?'linkOn':''))}}
+
+ {{/for}}
+ Messages
+
+ {{if stat_display.type}}
+
+
{{:~link('Line 1:','gear',{'operation':'setmsg1'})}}
+
{{>stat_display.line_1}}
+
+
+
{{:~link('Line 2:','gear',{'operation':'setmsg2'})}}
+
{{>stat_display.line_2}}
+
+ {{/if}}
+
+ {{else screen==3}}
+ {{!-- MESSAGES --}}
+ Messages
+ {{if current_message}}
+ {{:~link('Messages','home',{'operation':'messagelist'})}}
+ {{>title}}
+
+ {{>body}}
+
+ {{else}}
+ {{:~link('Back','home',{'operation':'main'})}}
+ {{for messages}}
+
+ {{:~link('Open','mail-open',{'operation':'messagelist','msgid':id})}}
+ {{:~link('Delete','close',{'operation':'delmessage','msgid':id},'red')}}
+ {{>title}}
+
+ {{/for}}
+ {{/if}}
+ {{else screen==4}}
+ {{!-- ALERT LEVEL --}}
+ Security Level
+ {{:~link('Back','home',{'operation':'main'})}}
+
+
+
Security Level:
+
{{>str_security_level}}
+
+
+
Presets:
+
+ {{for levels}}
+ {{:~link(name,'comment',{'operation':'newalertlevel','level':id},null,(id==~root.security_level?'linkOn':''))}}
+ {{/for}}
+
+
+
+ {{/if}}{{!-- SCREEN --}}
+{{/if}}{{!-- AUTHENTICATED --}}
\ No newline at end of file