Add department-specific radio channels (#9061)

* Add department-specific radio channels

This commit adds working department-specific radio channels, while
minimizing damage to the current codebase. It is expected that a future
refactor will clean this up a bit.

ChatSystem now has a RadioPrefix() method that recognizes
department-specific channels (e.g. ":e" and ":m") in addition to the
global channel (";"). It strips the prefix from the message and assigns
messages an integer representing the destination channel, if any.

IListen and IRadio now accept optional 'channel' arguments with this
channel in mind.

The ugly is that the integer channel number is hard-coded and also shows
up in chat.

Comms are not modeled at this time. You cannot break comms (yet).

All headsets have channels soldered into them. You cannot change
encryption keys to hop on new channels. Steal a headset instead.

* Remove debugging print

* Convert to prototypes

* Use prototype names in headset prototype

* Adjust list style

* Document prototype fields

* cringe

* some cleanup

* colours

* Remove alphas at least

* cc

Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>
This commit is contained in:
metalgearsloth
2022-06-23 20:11:03 +10:00
committed by GitHub
parent de760942e7
commit 3da454140d
41 changed files with 397 additions and 105 deletions

View File

@@ -9,6 +9,7 @@ chat-manager-admin-ooc-chat-enabled-message = Admin OOC chat has been enabled.
chat-manager-admin-ooc-chat-disabled-message = Admin OOC chat has been disabled.
chat-manager-max-message-length-exceeded-message = Your message exceeded {$limit} character limit
chat-manager-no-headset-on-message = You don't have a headset on!
chat-manager-no-such-channel = There is no such channel!
chat-manager-whisper-headset-on-message = You can't whisper on the radio!
chat-manager-server-wrap-message = SERVER: {"{0}"}
chat-manager-sender-announcement-wrap-message = {$sender} Announcement:

View File

@@ -1,8 +1,9 @@
# Chat window radio wrap (prefix and postfix)
chat-radio-message-wrap = {$channel} {$name} says, "{"{"}0{"}"}"
chat-radio-message-wrap = [color={$color}]{$channel} {$name} says, "{"{"}0{"}"}"[/color]
examine-radio-frequency = It's set to broadcast over the {$frequency} frequency.
examine-headset = A small screen on the headset displays the following available frequencies:
examine-headset-channel = [color={$color}]:{$key} for {$id} ({$freq})[/color]
examine-headset-chat-prefix = Use {$prefix} for the currently tuned frequency.

View File

@@ -19,6 +19,10 @@
name: cargo headset
description: A headset used by the quartermaster and his slaves.
components:
- type: Headset
channels:
- Common
- Supply
- type: Sprite
sprite: Clothing/Ears/Headsets/cargo.rsi
@@ -28,6 +32,17 @@
name: centcomm headset
description: A headset used by the upper echelons of Nanotrasen.
components:
- type: Headset
channels:
- Common
- Command
- CentCom
- Engineering
- Medical
- Science
- Security
- Service
- Supply
- type: Sprite
sprite: Clothing/Ears/Headsets/centcom.rsi
@@ -37,6 +52,16 @@
name: command headset
description: A headset with a commanding channel.
components:
- type: Headset
channels:
- Common
- Command
- Engineering
- Medical
- Science
- Security
- Service
- Supply
- type: Sprite
sprite: Clothing/Ears/Headsets/command.rsi
@@ -46,6 +71,10 @@
name: engineering headset
description: A headset for engineers to chat while the station burns around them.
components:
- type: Headset
channels:
- Common
- Engineering
- type: Sprite
sprite: Clothing/Ears/Headsets/engineering.rsi
@@ -55,6 +84,10 @@
name: medical headset
description: A headset for the trained staff of the medbay.
components:
- type: Headset
channels:
- Common
- Medical
- type: Sprite
sprite: Clothing/Ears/Headsets/medical.rsi
@@ -64,6 +97,11 @@
name: medical research headset
description: A headset that is a result of the mating between medical and science.
components:
- type: Headset
channels:
- Common
- Medical
- Science
- type: Sprite
sprite: Clothing/Ears/Headsets/medicalscience.rsi
@@ -91,6 +129,10 @@
name: science headset
description: A sciency headset. Like usual.
components:
- type: Headset
channels:
- Common
- Science
- type: Sprite
sprite: Clothing/Ears/Headsets/science.rsi
@@ -100,6 +142,10 @@
name: security headset
description: This is used by your elite security force.
components:
- type: Headset
channels:
- Common
- Security
- type: Sprite
sprite: Clothing/Ears/Headsets/security.rsi
@@ -109,5 +155,9 @@
name: service headset
description: Headset used by the service staff, tasked with keeping the station full, happy and clean.
components:
- type: Headset
channels:
- Common
- Service
- type: Sprite
sprite: Clothing/Ears/Headsets/service.rsi

View File

@@ -17,6 +17,16 @@
id: ClothingHeadsetAltCommand
name: command overear-headset
components:
- type: Headset
channels:
- Common
- Command
- Engineering
- Medical
- Science
- Security
- Service
- Supply
- type: Sprite
sprite: Clothing/Ears/Headsets/command.rsi
- type: Clothing
@@ -27,6 +37,10 @@
id: ClothingHeadsetAltMedical
name: medical overear-headset
components:
- type: Headset
channels:
- Common
- Medical
- type: Sprite
sprite: Clothing/Ears/Headsets/medical.rsi
- type: Clothing
@@ -37,6 +51,10 @@
id: ClothingHeadsetAltSecurity
name: security overear-headset
components:
- type: Headset
channels:
- Common
- Security
- type: Sprite
sprite: Clothing/Ears/Headsets/security.rsi
- type: Clothing
@@ -48,6 +66,10 @@
name: syndicate overear-headset
description: A syndicate headset that can be used to hear all radio frequencies. Protects ears from flashbangs.
components:
- type: Headset
channels:
- Common
- Syndicate
- type: Sprite
sprite: Clothing/Ears/Headsets/syndicate.rsi
- type: Clothing

View File

@@ -0,0 +1,66 @@
- type: radioChannel
id: Common
name: "Common"
keycode: ";"
frequency: 1459
- type: radioChannel
id: CentCom
name: "CentCom"
keycode: 'y'
frequency: 1337
- type: radioChannel
id: Command
name: "Command"
keycode: 'c'
frequency: 1353
color: "#334e6d"
- type: radioChannel
id: Engineering
name: "Engineering"
keycode: 'e'
frequency: 1357
color: "#efb341"
- type: radioChannel
id: Medical
name: "Medical"
keycode: 'm'
frequency: 1355
color: "#52b4e9"
- type: radioChannel
id: Science
name: "Science"
keycode: 'n'
frequency: 1351
color: "#d381c9"
- type: radioChannel
id: Security
name: "Security"
keycode: 's'
frequency: 1359
color: "#de3a3a"
- type: radioChannel
id: Service
name: "Service"
keycode: 'v'
frequency: 1349
color: "#9fed58"
- type: radioChannel
id: Supply
name: "Supply"
keycode: 'u'
frequency: 1347
color: "#a46106"
- type: radioChannel
id: Syndicate
name: "Syndicate"
keycode: 't'
frequency: 1213