From 194db854def00dc305c708d1acc7632877614566 Mon Sep 17 00:00:00 2001 From: Milon Date: Tue, 26 Nov 2024 18:37:30 +0100 Subject: [PATCH 1/8] the shiny new toy that breaks everything else --- .../UI/AgentIDCardBoundUserInterface.cs | 8 + .../Access/UI/AgentIDCardWindow.xaml | 3 + .../Access/UI/AgentIDCardWindow.xaml.cs | 36 ++ .../Cartridges/NanoChatEntry.xaml | 48 ++ .../Cartridges/NanoChatEntry.xaml.cs | 39 ++ .../Cartridges/NanoChatLogEntry.xaml | 20 + .../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 +++ .../DeltaV/NanoChat/NanoChatSystem.cs | 5 + .../Access/Systems/AgentIDCardSystem.cs | 24 +- .../Cartridges/NanoChatCartridgeComponent.cs | 26 + .../Cartridges/NanoChatCartridgeSystem.cs | 535 ++++++++++++++++++ .../DeltaV/NanoChat/NanoChatSystem.cs | 130 +++++ .../Access/SharedAgentIDCardSystem.cs | 16 +- .../Cartridges/NanoChatUiMessageEvent.cs | 137 +++++ .../Cartridges/NanoChatUiState.cs | 30 + .../DeltaV/NanoChat/NanoChatCardComponent.cs | 58 ++ .../DeltaV/NanoChat/SharedNanoChatSystem.cs | 29 + .../components/agent-id-card-component.ftl | 1 + .../deltav/cartridge-loader/cartridges.ftl | 32 ++ .../components/nanochat-card-component.ftl | 7 + .../Entities/Objects/Devices/cartridges.yml | 22 + .../Entities/Objects/Devices/pda.yml | 6 +- .../Objects/Misc/identification_cards.yml | 1 + .../Interface/VerbIcons/ATTRIBUTION.txt | 2 + .../DeltaV/Interface/VerbIcons/bell.svg | 5 + .../DeltaV/Interface/VerbIcons/bell.svg.png | Bin 0 -> 720 bytes .../DeltaV/Interface/VerbIcons/bell_muted.png | Bin 0 -> 355 bytes 34 files changed, 1951 insertions(+), 6 deletions(-) create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatEntry.xaml create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatEntry.xaml.cs create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatLogEntry.xaml create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatLogEntry.xaml.cs create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatMessageBubble.xaml create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatMessageBubble.xaml.cs create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatUi.cs create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatUiFragment.xaml create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NanoChatUiFragment.xaml.cs create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NewChatPopup.xaml create mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/NewChatPopup.xaml.cs create mode 100644 Content.Client/DeltaV/NanoChat/NanoChatSystem.cs create mode 100644 Content.Server/DeltaV/CartridgeLoader/Cartridges/NanoChatCartridgeComponent.cs create mode 100644 Content.Server/DeltaV/CartridgeLoader/Cartridges/NanoChatCartridgeSystem.cs create mode 100644 Content.Server/DeltaV/NanoChat/NanoChatSystem.cs create mode 100644 Content.Shared/DeltaV/CartridgeLoader/Cartridges/NanoChatUiMessageEvent.cs create mode 100644 Content.Shared/DeltaV/CartridgeLoader/Cartridges/NanoChatUiState.cs create mode 100644 Content.Shared/DeltaV/NanoChat/NanoChatCardComponent.cs create mode 100644 Content.Shared/DeltaV/NanoChat/SharedNanoChatSystem.cs create mode 100644 Resources/Locale/en-US/deltav/access/components/agent-id-card-component.ftl create mode 100644 Resources/Locale/en-US/deltav/nanochat/components/nanochat-card-component.ftl create mode 100644 Resources/Textures/DeltaV/Interface/VerbIcons/ATTRIBUTION.txt create mode 100644 Resources/Textures/DeltaV/Interface/VerbIcons/bell.svg create mode 100644 Resources/Textures/DeltaV/Interface/VerbIcons/bell.svg.png create mode 100644 Resources/Textures/DeltaV/Interface/VerbIcons/bell_muted.png diff --git a/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs b/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs index 050756fcd14..93ce5538aa1 100644 --- a/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs +++ b/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs @@ -26,6 +26,13 @@ protected override void Open() _window.OnNameChanged += OnNameChanged; _window.OnJobChanged += OnJobChanged; _window.OnJobIconChanged += OnJobIconChanged; + _window.OnNumberChanged += OnNumberChanged; // DeltaV + } + + // DeltaV - Add number change handler + private void OnNumberChanged(uint newNumber) + { + SendMessage(new AgentIDCardNumberChangedMessage(newNumber)); } private void OnNameChanged(string newName) @@ -56,6 +63,7 @@ protected override void UpdateState(BoundUserInterfaceState state) _window.SetCurrentName(cast.CurrentName); _window.SetCurrentJob(cast.CurrentJob); _window.SetAllowedIcons(cast.CurrentJobIconId); + _window.SetCurrentNumber(cast.CurrentNumber); // DeltaV } } } diff --git a/Content.Client/Access/UI/AgentIDCardWindow.xaml b/Content.Client/Access/UI/AgentIDCardWindow.xaml index 7d091e4e165..dd905d178de 100644 --- a/Content.Client/Access/UI/AgentIDCardWindow.xaml +++ b/Content.Client/Access/UI/AgentIDCardWindow.xaml @@ -6,6 +6,9 @@