From 3db1efc5aabe336da231070b273e4fc34553849a Mon Sep 17 00:00:00 2001 From: atermonera Date: Fri, 12 Jan 2018 15:18:57 -0800 Subject: [PATCH] Communicators have a flashlight --- code/game/objects/items/devices/communicator/UI.dm | 5 +++++ .../objects/items/devices/communicator/communicator.dm | 3 +++ html/changelogs/Atermonera - Commlight.yml | 5 +++++ nano/templates/communicator.tmpl | 9 +++++++++ 4 files changed, 22 insertions(+) create mode 100644 html/changelogs/Atermonera - Commlight.yml diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index 3c8cf50f51..5df153c663 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -108,6 +108,7 @@ data["note"] = note // current notes data["weather"] = weather data["aircontents"] = src.analyze_air() + data["flashlight"] = fon data["injection"] = injection // update the ui if it exists, returns null if no ui is passed/found @@ -245,5 +246,9 @@ note = "" notehtml = note + if(href_list["Light"]) + fon = !fon + set_light(fon * flum) + nanomanager.update_uis(src) add_fingerprint(usr) \ No newline at end of file diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index d5a4114aff..36e3cbb446 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -32,6 +32,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list() var/notehtml = "" var/obj/item/weapon/cartridge/cartridge = null //current cartridge + var/fon = 0 // Internal light + var/flum = 2 // Brightness + var/list/modules = list( list("module" = "Phone", "icon" = "phone64", "number" = 2), list("module" = "Contacts", "icon" = "person64", "number" = 3), diff --git a/html/changelogs/Atermonera - Commlight.yml b/html/changelogs/Atermonera - Commlight.yml new file mode 100644 index 0000000000..338d138da5 --- /dev/null +++ b/html/changelogs/Atermonera - Commlight.yml @@ -0,0 +1,5 @@ +author: Atermonera + +delete-after: True + + - rscadd: "Communicators have a flashlight under the settings menu, functions as the PDA one" diff --git a/nano/templates/communicator.tmpl b/nano/templates/communicator.tmpl index 63674d3752..60558b84c8 100644 --- a/nano/templates/communicator.tmpl +++ b/nano/templates/communicator.tmpl @@ -385,6 +385,15 @@ Used In File(s): code\game\objects\items\devices\communicator\communicator.dm +
+
+ Flashlight: +
+
+
{{:helper.link(data.flashlight==1 ? 'Disable Flashlight' : 'Enable Flashlight', 'lightbulb', {'Light' : 1}, null,'fixedLeftWide')}}
+
+
+ {{else data.currentTab == 8}}