diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 5d6c14abb9..d9f62cf1b8 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -655,6 +655,7 @@ var/global/list/obj/item/device/pda/PDAs = list() ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400, state = inventory_state) // add templates for screens in common with communicator. ui.add_template("atmosphericScan", "atmospheric_scan.tmpl") + ui.add_template("crewManifest", "crew_manifest.tmpl") //TFF Port from VOREStation // when the ui is first opened this is the data it will use ui.set_initial_data(data) // open the new ui window diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index 9d43da5c9a..0aea2a51eb 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -13,8 +13,7 @@ var/im_contacts_ui[0] //List of communicators that have been messaged. var/im_list_ui[0] //List of messages. - var/weather[0] - var/injection = null + // var/weather[0] //Unneeded variable since there's no weather at all! var/modules_ui[0] //Home screen info. //First we add other 'local' communicators. @@ -68,7 +67,7 @@ for(var/I in im_list) im_list_ui[++im_list_ui.len] = list("address" = I["address"], "to_address" = I["to_address"], "im" = I["im"]) - //Weather reports. + /*//Weather reports. if(planet_controller) for(var/datum/planet/planet in planet_controller.planets) if(planet.weather_holder && planet.weather_holder.current_weather) @@ -80,9 +79,11 @@ "High" = planet.weather_holder.current_weather.temp_high - T0C, "Low" = planet.weather_holder.current_weather.temp_low - T0C) weather[++weather.len] = W - - injection = "
Test
" - + */ //No planets with an atmosphere, doofus! + + // Update manifest + data_core.get_manifest_list() + //Modules for homescreen. for(var/list/R in modules) modules_ui[++modules_ui.len] = R @@ -107,19 +108,22 @@ data["ring"] = ringer data["homeScreen"] = modules_ui data["note"] = note // current notes - data["weather"] = weather + //data["weather"] = weather //Unneeded portion: no planets with an atmosphere that HAS weather! data["aircontents"] = src.analyze_air() data["flashlight"] = fon - data["injection"] = injection + data["manifest"] = PDA_Manifest // 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, force_open) 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 + data["currentTab"] = 1 // Reset the current tab, because we're going to home page //TFF VOREStation port ui = new(user, src, ui_key, "communicator.tmpl", "Communicator", 475, 700, state = key_state) // add templates for screens in common with communicator. ui.add_template("atmosphericScan", "atmospheric_scan.tmpl") + // TheFurryFeline: Adds Manifest listing + ui.add_template("crewManifest","crew_manifest.tmpl") // when the ui is first opened this is the data it will use ui.set_initial_data(data) // open the new ui window @@ -244,6 +248,14 @@ else note = "" notehtml = note + if(href_list["switch_template"]) + var/datum/nanoui/ui = nanomanager.get_open_ui(usr, src, "main") + if(ui) + switch(href_list["switch_template"]) + if("1") + ui.reinitialise("communicator.tmpl") + if("2") + ui.reinitialise("comm2.tmpl") if(href_list["Light"]) fon = !fon diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index 40ede14c67..7373266530 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -4,6 +4,16 @@ var/global/list/obj/item/device/communicator/all_communicators = list() +// List of core tabs the communicator can switch to //TFF Port from VOREStation +#define HOMETAB 1 +#define PHONTAB 2 +#define CONTTAB 3 +#define MESSTAB 4 +#define NOTETAB 5 +#define ATMSTAB 6 +#define MANITAB 7 +#define SETTTAB 8 + /obj/item/device/communicator name = "communicator" desc = "A personal device used to enable long range dialog between two people, utilizing existing telecommunications infrastructure to allow \ @@ -36,15 +46,16 @@ var/global/list/obj/item/device/communicator/all_communicators = list() var/flum = 2 // Brightness var/list/modules = list( - list("module" = "Phone", "icon" = "phone64", "number" = 2), - list("module" = "Contacts", "icon" = "person64", "number" = 3), - list("module" = "Messaging", "icon" = "comment64", "number" = 4), - list("module" = "Note", "icon" = "note64", "number" = 5), - list("module" = "Weather", "icon" = "sun64", "number" = 6), - list("module" = "Settings", "icon" = "gear64", "number" = 7) + list("module" = "Phone", "icon" = "phone64", "number" = PHONTAB), + list("module" = "Contacts", "icon" = "person64", "number" = CONTTAB), + list("module" = "Messaging", "icon" = "comment64", "number" = MESSTAB), + list("module" = "Note", "icon" = "note64", "number" = NOTETAB), + list("module" = "Atmos", "icon" = "sun64", "number" = ATMSTAB), + list("module" = "Crew Manifest", "icon" = "note64", "number" = MANITAB), // Need a different icon, //TFF Port from VOREStation + list("module" = "Settings", "icon" = "gear64", "number" = SETTTAB), ) //list("module" = "Name of Module", "icon" = "icon name64", "number" = "what tab is the module") - var/selected_tab = 1 + var/selected_tab = HOMETAB var/owner = "" var/occupation = "" var/alert_called = 0 @@ -221,9 +232,6 @@ var/global/list/obj/item/device/communicator/all_communicators = list() if(video_source) watch_video(user) -/obj/item/device/communicator/AltClick(mob/user) //Chomp edit. - attack_self(user) //wow big skill - // Proc: MouseDrop() //Same thing PDAs do /obj/item/device/communicator/MouseDrop(obj/over_object as obj) diff --git a/nano/templates/communicator.tmpl b/nano/templates/communicator.tmpl index 716034a7f4..2974e85c18 100644 --- a/nano/templates/communicator.tmpl +++ b/nano/templates/communicator.tmpl @@ -3,20 +3,6 @@ Title: Communicator UI Used In File(s): code\game\objects\items\devices\communicator\communicator.dm --> -
-
-
- {{:data.time}} | - {{if data.connectionStatus == 1}} - - {{else}} - - {{/if}} - | {{:data.owner}} | {{:data.occupation}} -
-
-
- {{if data.currentTab == 1}}
@@ -32,11 +18,10 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm {{else data.currentTab == 2}}

Manual Dial

-
-
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

- +
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+
Target EPv2 Address: @@ -82,47 +67,51 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm
+

Connection Management


+

External Connections

- {{for data.voice_mobs}} -
-
- {{:value.name}} -
-
-
{{:helper.link('Disconnect', 'close', {'disconnect' : value.true_name}, null, 'redButton')}}
-
+ {{for data.voice_mobs}} +
+
+ {{:value.name}}
- {{/for}} +
+
{{:helper.link('Disconnect', 'close', {'disconnect' : value.true_name}, null, 'redButton')}}
+
+
+ {{/for}} +

Internal Connections

- {{for data.communicating}} -
-
- {{:value.name}} -
-
- {{:helper.link('Disconnect', 'close', {'disconnect' : value.true_name}, null, 'redButton')}} - {{if data.video_comm == null}} - {{:helper.link('Start Video', 'signal-diag', {'startvideo' : value.ref})}} - {{else data.video_comm == value.ref}} - {{:helper.link('End Video', 'signal-diag', {'endvideo' : value.true_name}, null, 'redButton')}} - {{/if}} -
+ {{for data.communicating}} +
+
+ {{:value.name}}
- {{/for}} +
+ {{:helper.link('Disconnect', 'close', {'disconnect' : value.true_name}, null, 'redButton')}} + {{if data.video_comm == null}} + {{:helper.link('Start Video', 'signal-diag', {'startvideo' : value.ref})}} + {{else data.video_comm == value.ref}} + {{:helper.link('End Video', 'signal-diag', {'endvideo' : value.true_name}, null, 'redButton')}} + {{/if}} +
+
+ {{/for}} +

Requests Received

- {{for data.requestsReceived}} -
-
- {{:value.name}} -
-
-
{{:value.address}}
{{:helper.link('Accept', 'signal-diag', {'dial' : value.address})}}{{:helper.link('Decline', 'close', {'decline' : value.ref})}} -
+ {{for data.requestsReceived}} +
+
+ {{:value.name}}
- {{/for}} +
+
{{:value.address}}
{{:helper.link('Accept', 'signal-diag', {'dial' : value.address})}}{{:helper.link('Decline', 'close', {'decline' : value.ref})}} +
+
+ {{/for}}

Invites Sent

{{for data.invitesSent}} @@ -142,33 +131,33 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm {{else data.currentTab == 3}}

Known Devices

-
-
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

- - {{for data.knownDevices}} -
-
- {{:value.name}} -
-
-
{{:value.address}}
- {{:helper.link('Copy', 'pencil', {'copy' : value.address, 'switch_tab' : 2})}} - {{:helper.link('Call', 'phone', {'dial' : value.address, 'copy' : value.address, 'switch_tab' : 2})}} - {{:helper.link('Msg', 'mail-closed', {'copy' : value.address, 'copy_name' : value.name, 'switch_tab' : 40})}} -
+ +
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+ + {{for data.knownDevices}} +
+
+ {{:value.name}}
- {{/for}} +
+
{{:value.address}}
+ {{:helper.link('Copy', 'pencil', {'copy' : value.address, 'switch_tab' : 2})}} + {{:helper.link('Call', 'phone', {'dial' : value.address, 'copy' : value.address, 'switch_tab' : 2})}} + {{:helper.link('Msg', 'mail-closed', {'copy' : value.address, 'copy_name' : value.name, 'switch_tab' : 40})}} +
+
+ {{/for}} {{else data.currentTab == 4}}

Messaging

-
-
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

- + +
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+ {{for data.imContacts}}
@@ -184,10 +173,10 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm {{else data.currentTab == 40}}

Conversation With: {{:data.targetAddressName}}

-
-
{{:helper.link('Back', 'arrowreturnthick-1-w', {'switch_tab' : 4})}}

- + +
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+
@@ -212,9 +201,9 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm {{else data.currentTab == 5}}

Note Keeper

-
-
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+ +
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

@@ -234,43 +223,28 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm
- + {{else data.currentTab == 6}} -

Weather

- +

Atmospheric Readings


-
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+ +
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

Current Conditions:

{{#def.atmosphericScan}} - -

Weather Reports:

- {{for data.weather}} -
-
- {{:value.Planet}}: -
-
- Time: {{:value.Time}}
- Weather: {{:value.Weather}}, {{:helper.fixed(value.Temperature)}}°C
- High: {{:helper.fixed(value.High)}}°C | Low: {{:helper.fixed(value.Low)}}°C -
-
- {{empty}} -
-
- Error -
-
- No weather reports available. Please try again later. -
-
- {{/for}} - + {{else data.currentTab == 7}} + + {{#def.crewManifest}} + +
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+ + + +{{else data.currentTab == 8}}

Settings

@@ -337,13 +311,12 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm
{{:helper.link(data.flashlight==1 ? 'Disable Flashlight' : 'Enable Flashlight', 'lightbulb', {'Light' : 1}, null,'fixedLeftWide')}}
- - + -{{else data.currentTab == 8}} + {{else data.currentTab == 8}} -{{/if}} + {{/if}} diff --git a/nano/templates/crew_manifest.tmpl b/nano/templates/crew_manifest.tmpl index 00c45a1d5f..63d0e8b86f 100644 --- a/nano/templates/crew_manifest.tmpl +++ b/nano/templates/crew_manifest.tmpl @@ -1,5 +1,7 @@ - @@ -7,7 +9,6 @@ Copy-pasted from pda.tmpl

Crew Manifest


-
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

diff --git a/nano/templates/manifest.tmpl b/nano/templates/manifest.tmpl new file mode 100644 index 0000000000..109cdb7de5 --- /dev/null +++ b/nano/templates/manifest.tmpl @@ -0,0 +1,27 @@ + + +

Crew Manifest

+ +
+
{{:helper.link('Home', 'home', {'switch_tab' : 1})}}

+ +
+
+ {{for data.manifest}} + {{if value.elems.length}} + + {{for value.elems :itemValue:itemIndex}} + + + + + + {{/for}} + {{/if}} + {{/for}} +
{{:value.cat}}
{{:itemValue.name}}{{:itemValue.rank}}{{:itemValue.active}}
+
diff --git a/nano/templates/pda.tmpl b/nano/templates/pda.tmpl index 04ee2abfd9..0ff9213866 100644 --- a/nano/templates/pda.tmpl +++ b/nano/templates/pda.tmpl @@ -295,24 +295,7 @@ Used In File(s): \code\game\objects\items\devices\PDA\PDA.dm {{else data.mode== 41}} -
-
- {{for data.manifest}} - {{if value.elems.length}} - - {{for value.elems :itemValue:itemIndex}} - - - - - - {{/for}} - {{/if}} - {{/for}} - - -
{{:value.cat}}
{{:itemValue.name}}{{:itemValue.rank}}{{:itemValue.active}}
-
+ {{#def.crewManifest}} {{else data.mode == 3}}