From 6197b96b8b2dcf596775457664218cab773e7a18 Mon Sep 17 00:00:00 2001 From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Date: Mon, 2 Jan 2023 14:26:43 +0100 Subject: [PATCH] Horizon sensor console announcement of incoming fire (#15117) --- .../overmap/ships/computers/sensors.dm | 8 ++++ html/changelogs/fluffyghost.yml | 41 +++++++++++++++++++ nano/templates/shipsensors.tmpl | 22 ++++++++++ 3 files changed, 71 insertions(+) create mode 100644 html/changelogs/fluffyghost.yml diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm index 5d84eda0710..cfee562427a 100644 --- a/code/modules/overmap/ships/computers/sensors.dm +++ b/code/modules/overmap/ships/computers/sensors.dm @@ -183,6 +183,14 @@ visible_message(SPAN_ITALIC("[accent_icon] [user_name] explains, \"[beacon.distress_message]\"")) return TOPIC_HANDLED + if(href_list["inbound_fire"]) + var/direction = href_list["inbound_fire"] + if(direction != "clear") + security_announcement.Announce("Enemy fire inbound, enemy fire inbound! [direction]!", "Brace for shock!", sound('sound/mecha/internaldmgalarm.ogg', volume = 90), 0) + else + security_announcement.Announce("No fire is incoming at the current moment, resume damage control.", "Space clear!", sound('sound/misc/announcements/security_level_old.ogg'), 0) + return TOPIC_HANDLED + /obj/machinery/computer/ship/sensors/process() ..() if(!linked) diff --git a/html/changelogs/fluffyghost.yml b/html/changelogs/fluffyghost.yml new file mode 100644 index 00000000000..259f6620144 --- /dev/null +++ b/html/changelogs/fluffyghost.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added ability to the sensors console to send an announcement about incoming fire, along with the direction it's coming from, and to announce when there's no fire incoming (and thus to resume damage control)." \ No newline at end of file diff --git a/nano/templates/shipsensors.tmpl b/nano/templates/shipsensors.tmpl index aec08ef0d00..dc34e1ce0d4 100644 --- a/nano/templates/shipsensors.tmpl +++ b/nano/templates/shipsensors.tmpl @@ -119,6 +119,28 @@ {{/if}} + +{{if data.id_name == 'Horizon'}} +

Announce Inbound fire

+
+
+ {{:helper.link('', 'triangle-1-nw', { 'inbound_fire' : 'Fore-Port' }, null, null)}} + {{:helper.link('', 'triangle-1-n', { 'inbound_fire' : 'Fore' }, null, null)}} + {{:helper.link('', 'triangle-1-ne', { 'inbound_fire' : 'Fore-Starboard' }, null, null)}} +
+
+ {{:helper.link('', 'triangle-1-w', { 'inbound_fire' : 'Port' }, null, null)}} + {{:helper.link('', 'circle-close', { 'inbound_fire' : 'clear' }, null, null)}} + {{:helper.link('', 'triangle-1-e', { 'inbound_fire' : 'Starboard' }, null, null)}} +
+
+ {{:helper.link('', 'triangle-1-sw', { 'inbound_fire' : 'Bow-Port' }, null, null)}} + {{:helper.link('', 'triangle-1-s', { 'inbound_fire' : 'Bow' }, null, null)}} + {{:helper.link('', 'triangle-1-se', { 'inbound_fire' : 'Bow-Starboard' }, null, null)}} +
+
+{{/if}} +

Distress Beacons

Press the 'Listen' button to listen to the distress message.