From 10474eca70da4777fef1364ed206ec002045e20a Mon Sep 17 00:00:00 2001
From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com>
Date: Sat, 23 Feb 2019 14:42:37 -0500
Subject: [PATCH 1/7] Add Crew Manifest Display
What the title says: gives Communicator the ability to display the Crew Manifest.
---
.../devices/communicator/communicator.dm | 28 ++++++++++++-------
1 file changed, 18 insertions(+), 10 deletions(-)
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)
From 7984bc5803d31bdd7ad081534fae3b1436b022d3 Mon Sep 17 00:00:00 2001
From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com>
Date: Sat, 23 Feb 2019 14:53:28 -0500
Subject: [PATCH 2/7] New Template File Reference
Makes this refer to a .tmpl file.
---
code/game/objects/items/devices/PDA/PDA.dm | 1 +
1 file changed, 1 insertion(+)
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
From ddbc662aa5c9b503fc9f5aca6c857242728d5eb0 Mon Sep 17 00:00:00 2001
From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com>
Date: Sat, 23 Feb 2019 15:47:27 -0500
Subject: [PATCH 3/7] Commlink Manifest Stuff
Comments out weather, adds in visibility for Crew Manifest.
---
.../objects/items/devices/communicator/UI.dm | 28 +++++++++++++------
1 file changed, 20 insertions(+), 8 deletions(-)
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
From a07a20554b114368358d1f4e212b56a1efb8cbf9 Mon Sep 17 00:00:00 2001
From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com>
Date: Sat, 23 Feb 2019 15:56:31 -0500
Subject: [PATCH 4/7] Manifest Template
Template for Manifest for.... Something? I think it's for pAI's, judging from the collection of commits I'm porting this from.... https://github.com/VOREStation/VOREStation/commit/32bca3d9b6d8976fdb820ad4f1901e4f886a7ced#diff-94b4fe3f4b6fc09996ea40fb759d396b
---
nano/templates/manifest.tmpl | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 nano/templates/manifest.tmpl
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}}
+ | {{:value.cat}} |
+ {{for value.elems :itemValue:itemIndex}}
+
+ | {{:itemValue.name}} |
+ {{:itemValue.rank}} |
+ {{:itemValue.active}} |
+
+ {{/for}}
+ {{/if}}
+ {{/for}}
+
+
From bb898355ca70f3db639974732eefa247a5e7fc5a Mon Sep 17 00:00:00 2001
From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com>
Date: Sat, 23 Feb 2019 16:10:23 -0500
Subject: [PATCH 5/7] Template Change
Slight change to template with references to PDA and UI .dm files
---
nano/templates/crew_manifest.tmpl | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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})}}
From c8adb528bb3c7d1eb6585570f9d977bdf69d6f99 Mon Sep 17 00:00:00 2001
From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com>
Date: Sat, 23 Feb 2019 16:12:10 -0500
Subject: [PATCH 6/7] Template Change
Defined with crewManifest
---
nano/templates/pda.tmpl | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
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}}
- | {{:value.cat}} |
- {{for value.elems :itemValue:itemIndex}}
-
- | {{:itemValue.name}} |
- {{:itemValue.rank}} |
- {{:itemValue.active}} |
-
- {{/for}}
- {{/if}}
- {{/for}}
-
-
-
-
+ {{#def.crewManifest}}
{{else data.mode == 3}}
From 7ae37a19ec275e4b02e3201830d4ab22897ab6dc Mon Sep 17 00:00:00 2001
From: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com>
Date: Sat, 23 Feb 2019 17:34:49 -0500
Subject: [PATCH 7/7] Communicator Change
Adds Crew Manifest, removes useless weather readout since station's outside is a vacuum.
---
nano/templates/communicator.tmpl | 181 +++++++++++++------------------
1 file changed, 77 insertions(+), 104 deletions(-)
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}}