From d8413f723589550fdfded50a44fcda7e87e1fcf2 Mon Sep 17 00:00:00 2001 From: Vonsant Date: Thu, 12 Dec 2024 14:04:23 +0300 Subject: [PATCH] NanoChat --- .../UI/AgentIDCardBoundUserInterface.cs | 9 + .../Access/UI/AgentIDCardWindow.xaml | 4 + .../Access/UI/AgentIDCardWindow.xaml.cs | 37 ++ .../CartridgeLoader/Cartridges/LogProbeUi.cs | 2 +- .../Cartridges/LogProbeUiFragment.xaml | 26 +- .../Cartridges/LogProbeUiFragment.xaml.cs | 109 +++- .../Cartridges/NanoChatEntry.xaml | 48 ++ .../Cartridges/NanoChatEntry.xaml.cs | 39 ++ .../Cartridges/NanoChatLogEntry.xaml | 21 + .../Cartridges/NanoChatLogEntry.xaml.cs | 17 + .../Cartridges/NanoChatMessageBubble.xaml | 55 ++ .../Cartridges/NanoChatMessageBubble.xaml.cs | 62 +++ .../CartridgeLoader/Cartridges/NanoChatUi.cs | 43 ++ .../Cartridges/NanoChatUiFragment.xaml | 167 ++++++ .../Cartridges/NanoChatUiFragment.xaml.cs | 254 +++++++++ .../Cartridges/NewChatPopup.xaml | 52 ++ .../Cartridges/NewChatPopup.xaml.cs | 87 +++ .../_CorvaxNext/NanoChat/NanoChatSystem.cs | 5 + .../Access/Systems/AgentIDCardSystem.cs | 53 +- .../Cartridges/LogProbeCartridgeComponent.cs | 7 + .../Cartridges/LogProbeCartridgeSystem.cs | 16 +- .../LogProbeCartridgeSystem.NanoChat.cs | 82 +++ .../Cartridges/NanoChatCartridgeComponent.cs | 26 + .../Cartridges/NanoChatCartridgeSystem.cs | 514 ++++++++++++++++++ .../_CorvaxNext/NanoChat/NanoChatSystem.cs | 130 +++++ .../Access/SharedAgentIDCardSystem.cs | 16 +- .../Cartridges/LogProbeUiState.cs | 11 +- .../Cartridges/NanoChatUiMessageEvent.cs | 166 ++++++ .../Cartridges/NanoChatUiState.cs | 30 + .../NanoChat/NanoChatCardComponent.cs | 52 ++ .../NanoChat/SharedNanoChatSystem.cs | 273 ++++++++++ .../components/agent-id-card-component.ftl | 1 + .../_corvaxnext/cartridge-loader/nanochat.ftl | 36 ++ .../components/nanochat-card-component.ftl | 5 + .../components/agent-id-card-component.ftl | 1 + .../_corvaxnext/cartridge-loader/nanochat.ftl | 36 ++ .../components/nanochat-card-component.ftl | 5 + .../Entities/Objects/Devices/pda.yml | 11 + .../Objects/Misc/identification_cards.yml | 3 + .../Entities/Objects/Devices/cartridges.yml | 23 +- .../_CorvaxNext/name_identifier_groups.yml | 4 + .../Interface/VerbIcons/ATTRIBUTION.txt | 2 + .../_CorvaxNext/Interface/VerbIcons/bell.svg | 5 + .../Interface/VerbIcons/bell.svg.png | Bin 0 -> 720 bytes .../Interface/VerbIcons/bell_muted.png | Bin 0 -> 355 bytes .../Misc/program_icons.rsi/meta.json | 14 + .../Misc/program_icons.rsi/nanochat.png | Bin 0 -> 725 bytes .../Devices/cartridge.rsi/cart-chat.png | Bin 0 -> 419 bytes .../Objects/Devices/cartridge.rsi/meta.json | 5 +- 49 files changed, 2549 insertions(+), 15 deletions(-) create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatEntry.xaml create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatEntry.xaml.cs create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatLogEntry.xaml create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatLogEntry.xaml.cs create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatMessageBubble.xaml create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatMessageBubble.xaml.cs create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatUi.cs create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatUiFragment.xaml create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatUiFragment.xaml.cs create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NewChatPopup.xaml create mode 100644 Content.Client/_CorvaxNext/CartridgeLoader/Cartridges/NewChatPopup.xaml.cs create mode 100644 Content.Client/_CorvaxNext/NanoChat/NanoChatSystem.cs create mode 100644 Content.Server/_CorvaxNext/CartridgeLoader/Cartridges/LogProbeCartridgeSystem.NanoChat.cs create mode 100644 Content.Server/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatCartridgeComponent.cs create mode 100644 Content.Server/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatCartridgeSystem.cs create mode 100644 Content.Server/_CorvaxNext/NanoChat/NanoChatSystem.cs create mode 100644 Content.Shared/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatUiMessageEvent.cs create mode 100644 Content.Shared/_CorvaxNext/CartridgeLoader/Cartridges/NanoChatUiState.cs create mode 100644 Content.Shared/_CorvaxNext/NanoChat/NanoChatCardComponent.cs create mode 100644 Content.Shared/_CorvaxNext/NanoChat/SharedNanoChatSystem.cs create mode 100644 Resources/Locale/en-US/_corvaxnext/access/components/agent-id-card-component.ftl create mode 100644 Resources/Locale/en-US/_corvaxnext/cartridge-loader/nanochat.ftl create mode 100644 Resources/Locale/en-US/_corvaxnext/nanochat/components/nanochat-card-component.ftl create mode 100644 Resources/Locale/ru-RU/_corvaxnext/access/components/agent-id-card-component.ftl create mode 100644 Resources/Locale/ru-RU/_corvaxnext/cartridge-loader/nanochat.ftl create mode 100644 Resources/Locale/ru-RU/_corvaxnext/nanochat/components/nanochat-card-component.ftl create mode 100644 Resources/Prototypes/_CorvaxNext/name_identifier_groups.yml create mode 100644 Resources/Textures/_CorvaxNext/Interface/VerbIcons/ATTRIBUTION.txt create mode 100644 Resources/Textures/_CorvaxNext/Interface/VerbIcons/bell.svg create mode 100644 Resources/Textures/_CorvaxNext/Interface/VerbIcons/bell.svg.png create mode 100644 Resources/Textures/_CorvaxNext/Interface/VerbIcons/bell_muted.png create mode 100644 Resources/Textures/_CorvaxNext/Misc/program_icons.rsi/meta.json create mode 100644 Resources/Textures/_CorvaxNext/Misc/program_icons.rsi/nanochat.png create mode 100644 Resources/Textures/_CorvaxNext/Objects/Devices/cartridge.rsi/cart-chat.png diff --git a/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs b/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs index 050756fcd14..24e9bc7a01d 100644 --- a/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs +++ b/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs @@ -26,8 +26,16 @@ protected override void Open() _window.OnNameChanged += OnNameChanged; _window.OnJobChanged += OnJobChanged; _window.OnJobIconChanged += OnJobIconChanged; + _window.OnNumberChanged += OnNumberChanged; // Corvax-Next-PDAChat } + // Corvax-Next-PDAChat-Start + private void OnNumberChanged(uint newNumber) + { + SendMessage(new AgentIDCardNumberChangedMessage(newNumber)); + } + // Corvax-Next-PDAChat-End + private void OnNameChanged(string newName) { SendMessage(new AgentIDCardNameChangedMessage(newName)); @@ -56,6 +64,7 @@ protected override void UpdateState(BoundUserInterfaceState state) _window.SetCurrentName(cast.CurrentName); _window.SetCurrentJob(cast.CurrentJob); _window.SetAllowedIcons(cast.CurrentJobIconId); + _window.SetCurrentNumber(cast.CurrentNumber); // Corvax-Next-PDAChat } } } diff --git a/Content.Client/Access/UI/AgentIDCardWindow.xaml b/Content.Client/Access/UI/AgentIDCardWindow.xaml index 7d091e4e165..a61ed2a5ae2 100644 --- a/Content.Client/Access/UI/AgentIDCardWindow.xaml +++ b/Content.Client/Access/UI/AgentIDCardWindow.xaml @@ -6,6 +6,10 @@