From 9047edbd60239f40ea7379525bc333c41c23d14a Mon Sep 17 00:00:00 2001 From: Orion-416 Date: Sun, 24 May 2026 17:28:50 +0100 Subject: [PATCH 1/5] AACTablet --- .../TypingIndicator/TypingIndicatorSystem.cs | 5 +- .../TypingIndicatorVisualizerSystem.cs | 9 +- .../_DV/AACTablet/UI/AACBoundUserInterface.cs | 55 ++ .../_DV/AACTablet/UI/AACWindow.xaml | 23 + .../_DV/AACTablet/UI/AACWindow.xaml.cs | 262 +++++ ...ndicatorSystem.AlternateTypingIndicator.cs | 33 + .../_DV/AACTablet/AACTabletSystem.cs | 74 ++ .../SharedTypingIndicatorSystem.cs | 14 +- .../TypingIndicatorComponent.cs | 6 + .../TypingIndicator/TypingIndicatorEvents.cs | 6 +- .../_DV/AACTablet/AACTabletComponent.cs | 23 + .../_DV/AACTablet/AACTabletUiMessages.cs | 17 + .../_DV/QuickPhrase/QuickPhrasePrototype.cs | 83 ++ Resources/Locale/en-US/_DV/phrases/common.ftl | 107 +++ .../Locale/en-US/_DV/phrases/locations.ftl | 23 + .../Locale/en-US/_DV/phrases/species.ftl | 41 + .../Locale/en-US/_DV/phrases/subjects.ftl | 243 +++++ .../Locale/en-US/_DV/phrases/threats.ftl | 243 +++++ Resources/Locale/en-US/_DV/ui/aac-tablet.ftl | 4 + .../en-US/_Impstation/abilities/mime.ftl | 1 + .../Locale/en-US/_Impstation/phrases/AAC.ftl | 469 +++++++++ .../Prototypes/Loadouts/loadout_groups.yml | 1 + .../Recipes/Lathes/Packs/medical.yml | 1 + .../Entities/Objects/Devices/aac_tablet.yml | 47 + .../_DV/Loadouts/Miscellaneous/trinkets.yml | 6 + .../_DV/QuickPhrases/Common/actions.yml | 80 ++ .../_DV/QuickPhrases/Common/commands.yml | 80 ++ .../_DV/QuickPhrases/Common/manners.yml | 75 ++ .../_DV/QuickPhrases/Common/numbers.yml | 105 ++ .../_DV/QuickPhrases/Common/pronouns.yml | 85 ++ .../_DV/QuickPhrases/Common/qualitative.yml | 85 ++ .../_DV/QuickPhrases/Common/questions.yml | 60 ++ .../_DV/QuickPhrases/Species/animals.yml | 160 ++++ .../_DV/QuickPhrases/Species/crew.yml | 80 ++ .../QuickPhrases/Species/generic_species.yml | 60 ++ .../_DV/QuickPhrases/Subjects/cargo.yml | 161 ++++ .../_DV/QuickPhrases/Subjects/command.yml | 44 + .../_DV/QuickPhrases/Subjects/engineering.yml | 139 +++ .../_DV/QuickPhrases/Subjects/generic.yml | 370 +++++++ .../_DV/QuickPhrases/Subjects/medical.yml | 189 ++++ .../_DV/QuickPhrases/Subjects/science.yml | 74 ++ .../_DV/QuickPhrases/Subjects/security.yml | 84 ++ .../_DV/QuickPhrases/Subjects/service.yml | 199 ++++ .../_DV/QuickPhrases/Threats/hazards.yml | 136 +++ .../_DV/QuickPhrases/Threats/hostiles.yml | 66 ++ .../_DV/QuickPhrases/Threats/status.yml | 117 +++ .../Prototypes/_DV/QuickPhrases/base.yml | 80 ++ .../Prototypes/_DV/QuickPhrases/jobs.yml | 277 ++++++ .../Prototypes/_DV/QuickPhrases/locations.yml | 455 +++++++++ .../_DV/QuickPhrases/phrase_groups.yml | 622 ++++++++++++ .../_DV/Recipes/Lathes/Packs/medical.yml | 7 + Resources/Prototypes/_DV/typing_indicator.yml | 7 + .../Entities/Objects/Devices/aac_tablet.yml | 11 + .../_Impstation/QuickPhrases/adjectives.yml | 365 +++++++ .../_Impstation/QuickPhrases/common.yml | 348 +++++++ .../_Impstation/QuickPhrases/danger.yml | 46 + .../_Impstation/QuickPhrases/determiners.yml | 132 +++ .../_Impstation/QuickPhrases/hacked.yml | 106 ++ .../_Impstation/QuickPhrases/jobs.yml | 209 ++++ .../_Impstation/QuickPhrases/locations.yml | 237 +++++ .../_Impstation/QuickPhrases/nouns.yml | 764 +++++++++++++++ .../QuickPhrases/phrases_groups.yml | 904 ++++++++++++++++++ .../_Impstation/QuickPhrases/verbs.yml | 216 +++++ .../Recipes/Crafting/Graphs/hacked.yml | 27 + .../Recipes/Lathes/Packs/medical.yml | 4 + .../Textures/_DV/Effects/speech.rsi/aac0.png | Bin 0 -> 467 bytes .../Textures/_DV/Effects/speech.rsi/meta.json | 13 +- .../Devices/tablets.rsi/aac-inhand-left.png | Bin 0 -> 352 bytes .../Devices/tablets.rsi/aac-inhand-right.png | Bin 0 -> 345 bytes .../tablets.rsi/aac_screen-inhand-left.png | Bin 0 -> 238 bytes .../tablets.rsi/aac_screen-inhand-right.png | Bin 0 -> 238 bytes .../Devices/tablets.rsi/aac_screen.png | Bin 0 -> 268 bytes .../Devices/tablets.rsi/aac_tablet.png | Bin 0 -> 320 bytes .../_DV/Objects/Devices/tablets.rsi/meta.json | 33 + 74 files changed, 9101 insertions(+), 7 deletions(-) create mode 100644 Content.Client/_DV/AACTablet/UI/AACBoundUserInterface.cs create mode 100644 Content.Client/_DV/AACTablet/UI/AACWindow.xaml create mode 100644 Content.Client/_DV/AACTablet/UI/AACWindow.xaml.cs create mode 100644 Content.Client/_DV/Chat/TypingIndicator/TypingIndicatorSystem.AlternateTypingIndicator.cs create mode 100644 Content.Server/_DV/AACTablet/AACTabletSystem.cs create mode 100644 Content.Shared/_DV/AACTablet/AACTabletComponent.cs create mode 100644 Content.Shared/_DV/AACTablet/AACTabletUiMessages.cs create mode 100644 Content.Shared/_DV/QuickPhrase/QuickPhrasePrototype.cs create mode 100644 Resources/Locale/en-US/_DV/phrases/common.ftl create mode 100644 Resources/Locale/en-US/_DV/phrases/locations.ftl create mode 100644 Resources/Locale/en-US/_DV/phrases/subjects.ftl create mode 100644 Resources/Locale/en-US/_DV/phrases/threats.ftl create mode 100644 Resources/Locale/en-US/_DV/ui/aac-tablet.ftl create mode 100644 Resources/Locale/en-US/_Impstation/abilities/mime.ftl create mode 100644 Resources/Locale/en-US/_Impstation/phrases/AAC.ftl create mode 100644 Resources/Prototypes/_DV/Entities/Objects/Devices/aac_tablet.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Common/actions.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Common/commands.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Common/manners.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Common/numbers.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Common/pronouns.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Common/qualitative.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Common/questions.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Species/animals.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Species/crew.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Species/generic_species.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Subjects/cargo.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Subjects/command.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Subjects/engineering.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Subjects/generic.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Subjects/medical.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Subjects/science.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Subjects/security.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Subjects/service.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Threats/hazards.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Threats/hostiles.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/Threats/status.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/base.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/jobs.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/locations.yml create mode 100644 Resources/Prototypes/_DV/QuickPhrases/phrase_groups.yml create mode 100644 Resources/Prototypes/_DV/Recipes/Lathes/Packs/medical.yml create mode 100644 Resources/Prototypes/_Impstation/Entities/Objects/Devices/aac_tablet.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/adjectives.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/common.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/danger.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/determiners.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/hacked.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/jobs.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/locations.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/nouns.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/phrases_groups.yml create mode 100644 Resources/Prototypes/_Impstation/QuickPhrases/verbs.yml create mode 100644 Resources/Prototypes/_Impstation/Recipes/Crafting/Graphs/hacked.yml create mode 100644 Resources/Prototypes/_Impstation/Recipes/Lathes/Packs/medical.yml create mode 100644 Resources/Textures/_DV/Effects/speech.rsi/aac0.png create mode 100644 Resources/Textures/_DV/Objects/Devices/tablets.rsi/aac-inhand-left.png create mode 100644 Resources/Textures/_DV/Objects/Devices/tablets.rsi/aac-inhand-right.png create mode 100644 Resources/Textures/_DV/Objects/Devices/tablets.rsi/aac_screen-inhand-left.png create mode 100644 Resources/Textures/_DV/Objects/Devices/tablets.rsi/aac_screen-inhand-right.png create mode 100644 Resources/Textures/_DV/Objects/Devices/tablets.rsi/aac_screen.png create mode 100644 Resources/Textures/_DV/Objects/Devices/tablets.rsi/aac_tablet.png create mode 100644 Resources/Textures/_DV/Objects/Devices/tablets.rsi/meta.json diff --git a/Content.Client/Chat/TypingIndicator/TypingIndicatorSystem.cs b/Content.Client/Chat/TypingIndicator/TypingIndicatorSystem.cs index 1f7736bffc1..7c3d4496edc 100644 --- a/Content.Client/Chat/TypingIndicator/TypingIndicatorSystem.cs +++ b/Content.Client/Chat/TypingIndicator/TypingIndicatorSystem.cs @@ -18,7 +18,7 @@ namespace Content.Client.Chat.TypingIndicator; // Client-side typing system tracks user input in chat box -public sealed class TypingIndicatorSystem : SharedTypingIndicatorSystem +public sealed partial class TypingIndicatorSystem : SharedTypingIndicatorSystem // DeltaV - Made partial { [Dependency] private readonly IGameTiming _time = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; @@ -34,6 +34,7 @@ public override void Initialize() base.Initialize(); Subs.CVar(_cfg, CCVars.ChatShowTypingIndicator, OnShowTypingChanged); + InitializeAlternateTyping(); // DeltaV } public void ClientChangedChatText() @@ -113,4 +114,4 @@ private void OnShowTypingChanged(bool showTyping) ClientUpdateTyping(); } } -} \ No newline at end of file +} diff --git a/Content.Client/Chat/TypingIndicator/TypingIndicatorVisualizerSystem.cs b/Content.Client/Chat/TypingIndicator/TypingIndicatorVisualizerSystem.cs index bc65dc03afe..fc597149224 100644 --- a/Content.Client/Chat/TypingIndicator/TypingIndicatorVisualizerSystem.cs +++ b/Content.Client/Chat/TypingIndicator/TypingIndicatorVisualizerSystem.cs @@ -40,6 +40,13 @@ protected override void OnAppearanceChange(EntityUid uid, TypingIndicatorCompone if (overrideIndicator != null) currentTypingIndicator = overrideIndicator.Value; + // Begin DeltaV Additions - AAC TypingIndicator Override + if (component.TypingIndicatorOverridePrototype != null) + { + currentTypingIndicator = component.TypingIndicatorOverridePrototype.Value; + } + // End DeltaV Additions + if (!_prototypeManager.TryIndex(currentTypingIndicator, out var proto)) { Log.Error($"Unknown typing indicator id: {component.TypingIndicatorPrototype}"); @@ -67,4 +74,4 @@ protected override void OnAppearanceChange(EntityUid uid, TypingIndicatorCompone break; } } -} \ No newline at end of file +} diff --git a/Content.Client/_DV/AACTablet/UI/AACBoundUserInterface.cs b/Content.Client/_DV/AACTablet/UI/AACBoundUserInterface.cs new file mode 100644 index 00000000000..9f294fa44a0 --- /dev/null +++ b/Content.Client/_DV/AACTablet/UI/AACBoundUserInterface.cs @@ -0,0 +1,55 @@ +using Content.Client.Chat.TypingIndicator; +using Content.Shared._DV.AACTablet; +using Content.Shared._DV.QuickPhrase; +using Content.Shared.Chat.TypingIndicator; +using Robust.Client.UserInterface; +using Robust.Shared.Prototypes; + +namespace Content.Client._DV.AACTablet.UI; + +public sealed class AACBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey) +{ + [ViewVariables] + private AACWindow? _window; + + private static readonly ProtoId AACTypingIndicator = "aac"; + + private TypingIndicatorSystem? _typing; + + protected override void Open() + { + base.Open(); + _window = new AACWindow(Owner); + _window.OpenCentered(); + _window.OnClose += Close; + _window.PhraseButtonPressed += OnPhraseButtonPressed; + _window.Typing += OnTyping; + _window.SubmitPressed += OnSubmit; + } + + private void OnPhraseButtonPressed(List> phraseId) + { + SendMessage(new AACTabletSendPhraseMessage(phraseId)); + } + + private void OnTyping() + { + _typing ??= EntMan.System(); + _typing?.ClientAlternateTyping(AACTypingIndicator); + } + + private void OnSubmit() + { + _typing ??= EntMan.System(); + _typing?.ClientSubmittedChatText(); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + _window?.Parent?.RemoveChild(_window); + } +} diff --git a/Content.Client/_DV/AACTablet/UI/AACWindow.xaml b/Content.Client/_DV/AACTablet/UI/AACWindow.xaml new file mode 100644 index 00000000000..d95fbf92d6e --- /dev/null +++ b/Content.Client/_DV/AACTablet/UI/AACWindow.xaml @@ -0,0 +1,23 @@ + + + + + +