From 0767bd377728b290ffa5d8c0f638a887104eff24 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Date: Sun, 26 Sep 2021 15:18:45 +0200 Subject: [PATCH] Popup ECS Refactor (#4692) --- Content.Client/Commands/DebugCommands.cs | 5 +- .../ContextMenu/UI/ContextMenuElement.cs | 2 +- Content.Client/DragDrop/DragDropSystem.cs | 3 +- Content.Client/Entry/EntryPoint.cs | 6 +- Content.Client/IoC/ClientContentIoC.cs | 6 - .../Managers/ClientNotifyManager.cs | 178 ------------------ .../Managers/IClientNotifyManager.cs | 15 -- Content.Client/Popups/PopupSystem.cs | 177 +++++++++++++++++ Content.Client/Suspicion/SuspicionGui.xaml.cs | 3 +- .../AME/Components/AMEControllerComponent.cs | 3 +- .../AME/Components/AMEPartComponent.cs | 2 +- .../Components/IdCardConsoleComponent.cs | 3 +- Content.Server/Actions/Actions/CombatMode.cs | 3 +- .../Actions/Actions/DebugInstant.cs | 2 +- .../Actions/Actions/DebugTargetEntity.cs | 2 +- .../Actions/Actions/DebugTargetPoint.cs | 2 +- Content.Server/Actions/Actions/DebugToggle.cs | 2 +- .../Actions/Actions/DisarmAction.cs | 4 +- .../Actions/Spells/GiveItemSpell.cs | 5 +- .../BaseComputerUserInterfaceComponent.cs | 2 +- .../Atmos/Components/GasAnalyzerComponent.cs | 2 +- .../Atmos/EntitySystems/FlammableSystem.cs | 2 +- .../AtmosUnsafeUnanchorSystem.cs | 3 +- Content.Server/Body/Behavior/LungBehavior.cs | 2 +- .../Body/Mechanism/MechanismComponent.cs | 3 +- Content.Server/Body/Part/BodyPartComponent.cs | 3 +- .../Body/Respiratory/RespiratorComponent.cs | 2 +- .../Surgery/BiologicalSurgeryDataComponent.cs | 3 +- .../Components/SurgeryToolComponent.cs | 2 +- .../Botany/Components/PlantHolderComponent.cs | 4 +- .../Components/SeedExtractorComponent.cs | 3 +- Content.Server/Botany/Seed.cs | 3 +- .../Buckle/Components/BuckleComponent.cs | 2 +- Content.Server/Cabinet/ItemCabinetSystem.cs | 3 +- .../Components/MagicMirrorComponent.cs | 3 +- .../Chat/Commands/SuicideCommand.cs | 5 +- Content.Server/Chat/Managers/ChatManager.cs | 2 +- .../Components/ChemMasterComponent.cs | 2 +- .../Components/HyposprayComponent.cs | 2 +- .../Chemistry/Components/InjectorComponent.cs | 2 +- .../Components/ReagentDispenserComponent.cs | 2 +- .../Components/SolutionTransferComponent.cs | 3 +- .../EntitySystems/RehydratableSystem.cs | 2 +- .../Climbing/Components/ClimbableComponent.cs | 5 +- .../Cloning/Components/CloningPodComponent.cs | 3 +- .../Clothing/Components/ClothingComponent.cs | 4 +- .../Construction/Completions/PopupEveryone.cs | 2 +- .../Construction/Completions/PopupUser.cs | 3 +- .../Components/ConstructionComponent.Verbs.cs | 3 +- .../Construction/ConstructionSystem.cs | 3 +- Content.Server/Conveyor/ConveyorSystem.cs | 4 +- Content.Server/Crayon/CrayonComponent.cs | 4 +- .../Cuffs/Components/CuffableComponent.cs | 3 +- .../Cuffs/Components/HandcuffComponent.cs | 3 +- Content.Server/Dice/DiceSystem.cs | 2 +- .../Components/DisposalRouterComponent.cs | 3 +- .../Components/DisposalTaggerComponent.cs | 3 +- .../Tube/Components/DisposalTubeComponent.cs | 3 +- .../Unit/EntitySystems/DisposalUnitSystem.cs | 2 +- .../Doors/Components/AirlockComponent.cs | 5 - .../Doors/Components/FirelockComponent.cs | 5 - Content.Server/Doors/Systems/AirlockSystem.cs | 2 +- .../Doors/Systems/FirelockSystem.cs | 2 +- Content.Server/Entry/EntryPoint.cs | 2 - .../Extinguisher/FireExtinguisherComponent.cs | 3 +- Content.Server/Flash/FlashSystem.cs | 2 +- .../Fluids/Components/BucketComponent.cs | 2 +- .../Fluids/Components/MopComponent.cs | 2 +- .../Fluids/Components/SpillableComponent.cs | 2 +- .../Fluids/Components/SprayComponent.cs | 2 +- .../Hands/Components/HandsComponent.cs | 4 +- Content.Server/Hands/Systems/HandsSystem.cs | 3 +- .../Instruments/InstrumentComponent.cs | 3 +- .../Interaction/InRangeUnoccludedVerb.cs | 3 +- .../Interaction/InteractionSystem.cs | 10 +- .../Components/DebugEquipComponent.cs | 3 +- .../Components/InventoryComponent.cs | 3 +- Content.Server/IoC/ServerContentIoC.cs | 7 - .../Components/KitchenSpikeComponent.cs | 5 +- .../Kitchen/Components/MicrowaveComponent.cs | 4 +- .../EntitySystems/ReagentGrinderSystem.cs | 2 +- .../Components/HandheldLightComponent.cs | 3 +- .../Components/LightReplacerComponent.cs | 3 +- .../Light/Components/PoweredLightComponent.cs | 2 +- Content.Server/Lock/LockSystem.cs | 2 +- .../System/SignalLinkerSystem.cs | 5 +- .../Components/MedicalScannerComponent.cs | 7 +- .../BodyBagEntityStorageComponent.cs | 2 +- .../CrematoriumEntityStorageComponent.cs | 6 +- .../MorgueEntityStorageComponent.cs | 4 +- .../NodeGroups/NodeGroupAttribute.cs | 2 +- .../Managers/IServerNotifyManager.cs | 10 - .../Managers/ServerNotifyManager.cs | 71 ------- .../Nutrition/Components/DrinkComponent.cs | 2 +- .../Nutrition/Components/FoodComponent.cs | 2 +- .../Nutrition/EntitySystems/CreamPieSystem.cs | 4 +- Content.Server/PDA/PDAComponent.cs | 4 +- .../ParticleAcceleratorControlBoxComponent.cs | 2 +- .../Components/PottedPlantHideComponent.cs | 3 +- .../Pointing/EntitySystems/PointingSystem.cs | 3 +- .../PopupExtensions.cs} | 7 +- .../PopupMsgCommand.cs | 5 +- Content.Server/Popups/PopupSystem.cs | 32 ++++ .../Power/Components/ApcComponent.cs | 2 +- .../Power/Components/BaseCharger.cs | 3 +- .../RCD/Components/RCDAmmoComponent.cs | 3 +- Content.Server/RCD/Components/RCDComponent.cs | 3 +- .../Components/HandheldRadioComponent.cs | 3 +- .../Recycling/Components/RecyclerComponent.cs | 14 +- Content.Server/Repairable/RepairableSystem.cs | 2 +- .../Rotation/Components/FlippableComponent.cs | 3 +- .../Rotation/Components/RotatableComponent.cs | 3 +- .../Shuttles/ShuttleConsoleSystem.cs | 2 +- .../Components/RadiationCollectorComponent.cs | 2 +- .../EntitySystems/EmitterSystem.cs | 2 +- Content.Server/Stack/StackSystem.cs | 3 +- .../Components/EntityStorageComponent.cs | 2 +- .../Components/SecretStashComponent.cs | 3 +- .../Components/ServerStorageComponent.cs | 2 +- Content.Server/Strip/StrippableComponent.cs | 3 +- .../Components/StunnableComponent.cs | 4 +- Content.Server/Stunnable/StunbatonSystem.cs | 3 +- Content.Server/Toilet/ToiletComponent.cs | 5 +- .../Tools/Components/WelderComponent.cs | 5 +- .../TraitorDeathMatchRedemptionComponent.cs | 3 +- .../VendingMachineComponent.cs | 2 +- .../Ammunition/Components/AmmoBoxComponent.cs | 3 +- .../Components/RangedMagazineComponent.cs | 3 +- .../Components/SpeedLoaderComponent.cs | 3 +- .../Components/BoltActionBarrelComponent.cs | 3 +- .../Barrels/Components/PumpBarrelComponent.cs | 3 +- .../Components/RevolverBarrelComponent.cs | 3 +- .../ServerMagazineBarrelComponent.cs | 3 +- .../Ranged/ServerRangedWeaponComponent.cs | 2 +- Content.Server/Wieldable/WieldableSystem.cs | 4 +- Content.Server/Window/WindowComponent.cs | 2 +- Content.Server/WireHacking/WiresComponent.cs | 2 +- .../Interaction/SharedInteractionSystem.cs | 5 +- .../Managers/ISharedNotifyManager.cs | 86 --------- .../Managers/SharedNotifyManager.cs | 73 ------- .../Popups/SharedPopupExtensions.cs | 57 ++++++ Content.Shared/Popups/SharedPopupSystem.cs | 97 ++++++++++ 142 files changed, 513 insertions(+), 705 deletions(-) delete mode 100644 Content.Client/Notifications/Managers/ClientNotifyManager.cs delete mode 100644 Content.Client/Notifications/Managers/IClientNotifyManager.cs create mode 100644 Content.Client/Popups/PopupSystem.cs delete mode 100644 Content.Server/Notification/Managers/IServerNotifyManager.cs delete mode 100644 Content.Server/Notification/Managers/ServerNotifyManager.cs rename Content.Server/{Notification/NotifyExtensions.cs => Popups/PopupExtensions.cs} (93%) rename Content.Server/{Notification => Popups}/PopupMsgCommand.cs (86%) create mode 100644 Content.Server/Popups/PopupSystem.cs delete mode 100644 Content.Shared/Notification/Managers/ISharedNotifyManager.cs delete mode 100644 Content.Shared/Notification/Managers/SharedNotifyManager.cs create mode 100644 Content.Shared/Popups/SharedPopupExtensions.cs create mode 100644 Content.Shared/Popups/SharedPopupSystem.cs diff --git a/Content.Client/Commands/DebugCommands.cs b/Content.Client/Commands/DebugCommands.cs index 0d4eb5e048..4982f33bc4 100644 --- a/Content.Client/Commands/DebugCommands.cs +++ b/Content.Client/Commands/DebugCommands.cs @@ -1,6 +1,6 @@ using System; using Content.Client.Markers; -using Content.Client.Notifications.Managers; +using Content.Client.Popups; using Content.Shared.SubFloor; using Robust.Client.GameObjects; using Robust.Shared.Console; @@ -73,8 +73,7 @@ namespace Content.Client.Commands { var message = args[0]; - var notifyManager = IoCManager.Resolve(); - notifyManager.PopupMessage(message); + EntitySystem.Get().PopupCursor(message); } } diff --git a/Content.Client/ContextMenu/UI/ContextMenuElement.cs b/Content.Client/ContextMenu/UI/ContextMenuElement.cs index 9f9c049763..d2fa8b146d 100644 --- a/Content.Client/ContextMenu/UI/ContextMenuElement.cs +++ b/Content.Client/ContextMenu/UI/ContextMenuElement.cs @@ -176,7 +176,7 @@ namespace Content.Client.ContextMenu.UI } } - public sealed class ContextMenuPopup : Popup + public sealed class ContextMenuPopup : Robust.Client.UserInterface.Controls.Popup { private static readonly Color DefaultColor = Color.FromHex("#1116"); private static readonly Color MarginColor = Color.FromHex("#222E"); diff --git a/Content.Client/DragDrop/DragDropSystem.cs b/Content.Client/DragDrop/DragDropSystem.cs index eeea12cdeb..f0f1a14f34 100644 --- a/Content.Client/DragDrop/DragDropSystem.cs +++ b/Content.Client/DragDrop/DragDropSystem.cs @@ -4,8 +4,7 @@ using Content.Client.Viewport; using Content.Shared.DragDrop; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Client.GameObjects; using Robust.Client.Graphics; diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs index 95a7ec0596..73b04aa78a 100644 --- a/Content.Client/Entry/EntryPoint.cs +++ b/Content.Client/Entry/EntryPoint.cs @@ -6,14 +6,12 @@ using Content.Client.Chat.Managers; using Content.Client.EscapeMenu; using Content.Client.Eui; using Content.Client.Flash; -using Content.Client.GameTicking.Managers; using Content.Client.HUD; using Content.Client.Input; using Content.Client.IoC; using Content.Client.Launcher; using Content.Client.MainMenu; using Content.Client.MobState.Overlays; -using Content.Client.Notifications.Managers; using Content.Client.Parallax; using Content.Client.Parallax.Managers; using Content.Client.Preferences; @@ -32,7 +30,6 @@ using Content.Shared.Cargo.Components; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Dispenser; using Content.Shared.Gravity; -using Content.Shared.Kitchen.Components; using Content.Shared.Lathe; using Content.Shared.Markers; using Content.Shared.Research.Components; @@ -166,7 +163,6 @@ namespace Content.Client.Entry ContentContexts.SetupContexts(inputMan.Contexts); IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); var overlayMgr = IoCManager.Resolve(); overlayMgr.AddOverlay(new ParallaxOverlay()); @@ -228,7 +224,7 @@ namespace Content.Client.Entry switch (level) { case ModUpdateLevel.FramePreEngine: - IoCManager.Resolve().FrameUpdate(frameEventArgs); + // TODO: Turn IChatManager into an EntitySystem and remove the line below. IoCManager.Resolve().FrameUpdate(frameEventArgs); break; } diff --git a/Content.Client/IoC/ClientContentIoC.cs b/Content.Client/IoC/ClientContentIoC.cs index 990a4f7822..307702f8c5 100644 --- a/Content.Client/IoC/ClientContentIoC.cs +++ b/Content.Client/IoC/ClientContentIoC.cs @@ -4,11 +4,9 @@ using Content.Client.Chat.Managers; using Content.Client.Clickable; using Content.Client.EscapeMenu; using Content.Client.Eui; -using Content.Client.GameTicking.Managers; using Content.Client.HUD; using Content.Client.Items.Managers; using Content.Client.Module; -using Content.Client.Notifications.Managers; using Content.Client.Parallax.Managers; using Content.Client.Preferences; using Content.Client.Sandbox; @@ -20,8 +18,6 @@ using Content.Client.Voting; using Content.Shared.Actions; using Content.Shared.Alert; using Content.Shared.Module; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; using Robust.Shared.IoC; namespace Content.Client.IoC @@ -31,8 +27,6 @@ namespace Content.Client.IoC public static void Register() { IoCManager.Register(); - IoCManager.Register(); - IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); diff --git a/Content.Client/Notifications/Managers/ClientNotifyManager.cs b/Content.Client/Notifications/Managers/ClientNotifyManager.cs deleted file mode 100644 index 4ba044ed9f..0000000000 --- a/Content.Client/Notifications/Managers/ClientNotifyManager.cs +++ /dev/null @@ -1,178 +0,0 @@ -using System; -using System.Collections.Generic; -using Content.Client.Stylesheets; -using Content.Shared; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; -using Robust.Client.Graphics; -using Robust.Client.Player; -using Robust.Client.UserInterface; -using Robust.Client.UserInterface.Controls; -using Robust.Shared.Console; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Map; -using Robust.Shared.Maths; -using Robust.Shared.Network; -using Robust.Shared.Timing; -using Robust.Shared.Utility; - -namespace Content.Client.Notifications.Managers -{ - public class ClientNotifyManager : SharedNotifyManager, IClientNotifyManager - { - [Dependency] private readonly IPlayerManager _playerManager = default!; - [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; - [Dependency] private readonly IEyeManager _eyeManager = default!; - [Dependency] private readonly IClientNetManager _netManager = default!; - [Dependency] private readonly IEntityManager _entityManager = default!; - - private readonly List _aliveLabels = new(); - private bool _initialized; - - public void Initialize() - { - DebugTools.Assert(!_initialized); - - _netManager.RegisterNetMessage(DoNotifyCursor); - _netManager.RegisterNetMessage(DoNotifyCoordinates); - _netManager.RegisterNetMessage(DoNotifyEntity); - - _initialized = true; - } - - private void DoNotifyCursor(MsgDoNotifyCursor message) - { - PopupMessage(message.Message); - } - - private void DoNotifyCoordinates(MsgDoNotifyCoordinates message) - { - PopupMessage(_eyeManager.CoordinatesToScreen(message.Coordinates), message.Message); - } - - private void DoNotifyEntity(MsgDoNotifyEntity message) - { - if (_playerManager.LocalPlayer?.ControlledEntity == null || - !_entityManager.TryGetEntity(message.Entity, out var entity)) - { - return; - } - - PopupMessage(entity, _playerManager.LocalPlayer.ControlledEntity, message.Message); - } - - public override void PopupMessage(IEntity source, IEntity viewer, string message) - { - PopupMessage(_eyeManager.CoordinatesToScreen(source.Transform.Coordinates), message, source); - } - - public override void PopupMessage(EntityCoordinates coordinates, IEntity viewer, string message) - { - if (viewer != _playerManager.LocalPlayer?.ControlledEntity) - { - return; - } - - PopupMessage(_eyeManager.CoordinatesToScreen(coordinates), message); - } - - public override void PopupMessageCursor(IEntity viewer, string message) - { - if (viewer != _playerManager.LocalPlayer?.ControlledEntity) - { - return; - } - - PopupMessage(message); - } - - public void PopupMessage(ScreenCoordinates coordinates, string message) - { - PopupMessage(coordinates, message, null); - } - - public void PopupMessage(ScreenCoordinates coordinates, string message, IEntity? entity) - { - var label = new PopupLabel(_eyeManager) - { - Entity = entity, - Text = message, - StyleClasses = { StyleNano.StyleClassPopupMessage }, - }; - - _userInterfaceManager.PopupRoot.AddChild(label); - label.Measure(Vector2.Infinity); - var minimumSize = label.DesiredSize; - - label.InitialPos = (coordinates.Position / label.UIScale) - minimumSize / 2; - LayoutContainer.SetPosition(label, label.InitialPos); - _aliveLabels.Add(label); - } - - public void PopupMessage(string message) - { - PopupMessage(_userInterfaceManager.MousePositionScaled, message); - } - - public void FrameUpdate(FrameEventArgs eventArgs) - { - _aliveLabels.ForEach(l => - { - if (l.TimeLeft > 3f) - { - l.Dispose(); - } - }); - - _aliveLabels.RemoveAll(l => l.Disposed); - } - - private class PopupLabel : Label - { - private readonly IEyeManager _eyeManager; - - public float TimeLeft { get; private set; } - public Vector2 InitialPos { get; set; } - public IEntity? Entity { get; set; } - - public PopupLabel(IEyeManager eyeManager) - { - _eyeManager = eyeManager; - ShadowOffsetXOverride = 1; - ShadowOffsetYOverride = 1; - FontColorShadowOverride = Color.Black; - } - - protected override void FrameUpdate(FrameEventArgs eventArgs) - { - TimeLeft += eventArgs.DeltaSeconds; - - var position = Entity == null - ? InitialPos - : (_eyeManager.CoordinatesToScreen(Entity.Transform.Coordinates).Position / UIScale) - DesiredSize / 2; - - LayoutContainer.SetPosition(this, position - (0, 20 * (TimeLeft * TimeLeft + TimeLeft))); - - if (TimeLeft > 0.5f) - { - Modulate = Color.White.WithAlpha(1f - 0.2f * (float)Math.Pow(TimeLeft - 0.5f, 3f)); - } - } - } - } - - public class PopupMessageCommand : IConsoleCommand - { - public string Command => "popupmsg"; - public string Description => ""; - public string Help => ""; - - public void Execute(IConsoleShell shell, string argStr, string[] args) - { - var arg = args[0]; - var mgr = IoCManager.Resolve(); - mgr.PopupMessage(arg); - } - } -} diff --git a/Content.Client/Notifications/Managers/IClientNotifyManager.cs b/Content.Client/Notifications/Managers/IClientNotifyManager.cs deleted file mode 100644 index 159b6579a0..0000000000 --- a/Content.Client/Notifications/Managers/IClientNotifyManager.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; -using Robust.Shared.Map; -using Robust.Shared.Timing; - -namespace Content.Client.Notifications.Managers -{ - public interface IClientNotifyManager : ISharedNotifyManager - { - void Initialize(); - void PopupMessage(ScreenCoordinates coordinates, string message); - void PopupMessage(string message); - void FrameUpdate(FrameEventArgs eventArgs); - } -} diff --git a/Content.Client/Popups/PopupSystem.cs b/Content.Client/Popups/PopupSystem.cs new file mode 100644 index 0000000000..e4776ff6d4 --- /dev/null +++ b/Content.Client/Popups/PopupSystem.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using Content.Client.Stylesheets; +using Content.Shared.GameTicking; +using Content.Shared.Popups; +using Robust.Client.Graphics; +using Robust.Client.Player; +using Robust.Client.UserInterface; +using Robust.Client.UserInterface.Controls; +using Robust.Shared.GameObjects; +using Robust.Shared.IoC; +using Robust.Shared.Map; +using Robust.Shared.Maths; +using Robust.Shared.Player; +using Robust.Shared.Timing; + +namespace Content.Client.Popups +{ + public class PopupSystem : SharedPopupSystem + { + [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly IEyeManager _eyeManager = default!; + + private readonly List _aliveLabels = new(); + + public override void Initialize() + { + SubscribeNetworkEvent(OnPopupCursorEvent); + SubscribeNetworkEvent(OnPopupCoordinatesEvent); + SubscribeNetworkEvent(OnPopupEntityEvent); + SubscribeNetworkEvent(OnRoundRestart); + } + + #region Actual Implementation + + public void PopupCursor(string message) + { + PopupMessage(message, _userInterfaceManager.MousePositionScaled); + } + + public void PopupCoordinates(string message, EntityCoordinates coordinates) + { + PopupMessage(message, _eyeManager.CoordinatesToScreen(coordinates)); + } + + public void PopupEntity(string message, EntityUid uid) + { + if (!EntityManager.EntityExists(uid)) + return; + + var transform = ComponentManager.GetComponent(uid); + PopupMessage(message, _eyeManager.CoordinatesToScreen(transform.Coordinates)); + } + + public void PopupMessage(string message, ScreenCoordinates coordinates, IEntity? entity = null) + { + var label = new PopupLabel(_eyeManager) + { + Entity = entity, + Text = message, + StyleClasses = { StyleNano.StyleClassPopupMessage }, + }; + + _userInterfaceManager.PopupRoot.AddChild(label); + label.Measure(Vector2.Infinity); + var minimumSize = label.DesiredSize; + + label.InitialPos = coordinates.Position / label.UIScale - minimumSize / 2; + LayoutContainer.SetPosition(label, label.InitialPos); + _aliveLabels.Add(label); + } + + #endregion + + #region Abstract Method Implementations + + public override void PopupCursor(string message, Filter filter) + { + if (!filter.CheckPrediction) + return; + } + + public override void PopupCoordinates(string message, EntityCoordinates coordinates, Filter filter) + { + if (!filter.CheckPrediction) + return; + } + + public override void PopupEntity(string message, EntityUid uid, Filter filter) + { + if (!filter.CheckPrediction) + return; + } + + public override Filter GetFilterFromEntity(IEntity entity) + { + return _playerManager.LocalPlayer?.ControlledEntity == entity + ? Filter.Local() : Filter.Empty().Unpredicted(); + } + + #endregion + + #region Network Event Handlers + + private void OnPopupCursorEvent(PopupCursorEvent ev) + { + PopupCursor(ev.Message); + } + + private void OnPopupCoordinatesEvent(PopupCoordinatesEvent ev) + { + PopupCoordinates(ev.Message, ev.Coordinates); + } + + private void OnPopupEntityEvent(PopupEntityEvent ev) + { + PopupEntity(ev.Message, ev.Uid); + } + + private void OnRoundRestart(RoundRestartCleanupEvent ev) + { + foreach (var label in _aliveLabels) + { + label.Dispose(); + } + + _aliveLabels.Clear(); + } + + #endregion + + public override void FrameUpdate(float frameTime) + { + foreach (var l in _aliveLabels) + { + if (l.TimeLeft > 3f) + l.Dispose(); + } + + _aliveLabels.RemoveAll(l => l.Disposed); + } + + private class PopupLabel : Label + { + private readonly IEyeManager _eyeManager; + + public float TimeLeft { get; private set; } + public Vector2 InitialPos { get; set; } + public IEntity? Entity { get; set; } + + public PopupLabel(IEyeManager eyeManager) + { + _eyeManager = eyeManager; + ShadowOffsetXOverride = 1; + ShadowOffsetYOverride = 1; + FontColorShadowOverride = Color.Black; + } + + protected override void FrameUpdate(FrameEventArgs eventArgs) + { + TimeLeft += eventArgs.DeltaSeconds; + + var position = Entity == null + ? InitialPos + : (_eyeManager.CoordinatesToScreen(Entity.Transform.Coordinates).Position / UIScale) - DesiredSize / 2; + + LayoutContainer.SetPosition(this, position - (0, 20 * (TimeLeft * TimeLeft + TimeLeft))); + + if (TimeLeft > 0.5f) + { + Modulate = Color.White.WithAlpha(1f - 0.2f * (float)Math.Pow(TimeLeft - 0.5f, 3f)); + } + } + } + } +} diff --git a/Content.Client/Suspicion/SuspicionGui.xaml.cs b/Content.Client/Suspicion/SuspicionGui.xaml.cs index ec70ed5e2b..064fcebe2b 100644 --- a/Content.Client/Suspicion/SuspicionGui.xaml.cs +++ b/Content.Client/Suspicion/SuspicionGui.xaml.cs @@ -2,8 +2,7 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Client.AutoGenerated; using Robust.Client.Player; using Robust.Client.UserInterface; diff --git a/Content.Server/AME/Components/AMEControllerComponent.cs b/Content.Server/AME/Components/AMEControllerComponent.cs index f25c93b023..1077eea4b8 100644 --- a/Content.Server/AME/Components/AMEControllerComponent.cs +++ b/Content.Server/AME/Components/AMEControllerComponent.cs @@ -8,8 +8,7 @@ using Content.Server.UserInterface; using Content.Shared.ActionBlocker; using Content.Shared.AME; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/AME/Components/AMEPartComponent.cs b/Content.Server/AME/Components/AMEPartComponent.cs index d7971c0f00..cb54a50b34 100644 --- a/Content.Server/AME/Components/AMEPartComponent.cs +++ b/Content.Server/AME/Components/AMEPartComponent.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using Content.Server.Hands.Components; using Content.Server.Tools.Components; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Tool; using Robust.Server.GameObjects; diff --git a/Content.Server/Access/Components/IdCardConsoleComponent.cs b/Content.Server/Access/Components/IdCardConsoleComponent.cs index 4b9bb5c397..5ea5085974 100644 --- a/Content.Server/Access/Components/IdCardConsoleComponent.cs +++ b/Content.Server/Access/Components/IdCardConsoleComponent.cs @@ -9,8 +9,7 @@ using Content.Shared.Access; using Content.Shared.ActionBlocker; using Content.Shared.Acts; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Server.GameObjects; using Robust.Shared.Containers; diff --git a/Content.Server/Actions/Actions/CombatMode.cs b/Content.Server/Actions/Actions/CombatMode.cs index 4ce41fd4bb..c00ab41d5d 100644 --- a/Content.Server/Actions/Actions/CombatMode.cs +++ b/Content.Server/Actions/Actions/CombatMode.cs @@ -1,7 +1,6 @@ using Content.Server.CombatMode; using Content.Shared.Actions.Behaviors; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Shared.Localization; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/Actions/Actions/DebugInstant.cs b/Content.Server/Actions/Actions/DebugInstant.cs index a1564b5f9c..02c54137a4 100644 --- a/Content.Server/Actions/Actions/DebugInstant.cs +++ b/Content.Server/Actions/Actions/DebugInstant.cs @@ -1,4 +1,4 @@ -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Actions.Behaviors; using Content.Shared.Actions.Behaviors.Item; using Content.Shared.Cooldown; diff --git a/Content.Server/Actions/Actions/DebugTargetEntity.cs b/Content.Server/Actions/Actions/DebugTargetEntity.cs index ad1181761f..c16b60e051 100644 --- a/Content.Server/Actions/Actions/DebugTargetEntity.cs +++ b/Content.Server/Actions/Actions/DebugTargetEntity.cs @@ -1,4 +1,4 @@ -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Actions.Behaviors; using JetBrains.Annotations; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/Actions/Actions/DebugTargetPoint.cs b/Content.Server/Actions/Actions/DebugTargetPoint.cs index ee5c6e662b..18496f109a 100644 --- a/Content.Server/Actions/Actions/DebugTargetPoint.cs +++ b/Content.Server/Actions/Actions/DebugTargetPoint.cs @@ -1,4 +1,4 @@ -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Actions.Behaviors; using JetBrains.Annotations; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/Actions/Actions/DebugToggle.cs b/Content.Server/Actions/Actions/DebugToggle.cs index 03c3a95602..7b386601df 100644 --- a/Content.Server/Actions/Actions/DebugToggle.cs +++ b/Content.Server/Actions/Actions/DebugToggle.cs @@ -1,4 +1,4 @@ -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Actions.Behaviors; using Content.Shared.Actions.Behaviors.Item; using JetBrains.Annotations; diff --git a/Content.Server/Actions/Actions/DisarmAction.cs b/Content.Server/Actions/Actions/DisarmAction.cs index a9d1074f22..e4177a6757 100644 --- a/Content.Server/Actions/Actions/DisarmAction.cs +++ b/Content.Server/Actions/Actions/DisarmAction.cs @@ -1,6 +1,5 @@ using Content.Server.Act; using Content.Server.Interaction; -using Content.Server.Notification; using Content.Server.Weapon.Melee; using Content.Shared.ActionBlocker; using Content.Shared.Actions; @@ -9,7 +8,6 @@ using Content.Shared.Actions.Components; using Content.Shared.Audio; using Content.Shared.Cooldown; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; using Content.Shared.Sound; using JetBrains.Annotations; using Robust.Server.GameObjects; @@ -24,6 +22,8 @@ using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; using System; using System.Linq; +using Content.Server.Popups; +using Content.Shared.Popups; namespace Content.Server.Actions.Actions { diff --git a/Content.Server/Actions/Spells/GiveItemSpell.cs b/Content.Server/Actions/Spells/GiveItemSpell.cs index f5151c4ae0..c8a3a1b593 100644 --- a/Content.Server/Actions/Spells/GiveItemSpell.cs +++ b/Content.Server/Actions/Spells/GiveItemSpell.cs @@ -1,11 +1,10 @@ using Content.Server.Hands.Components; using Content.Server.Items; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.ActionBlocker; using Content.Shared.Actions.Behaviors; -using Content.Shared.Actions.Components; using Content.Shared.Cooldown; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using JetBrains.Annotations; using Robust.Shared.Audio; diff --git a/Content.Server/Atmos/Components/BaseComputerUserInterfaceComponent.cs b/Content.Server/Atmos/Components/BaseComputerUserInterfaceComponent.cs index 8023127069..d5e28c2b9a 100644 --- a/Content.Server/Atmos/Components/BaseComputerUserInterfaceComponent.cs +++ b/Content.Server/Atmos/Components/BaseComputerUserInterfaceComponent.cs @@ -2,7 +2,7 @@ using Content.Server.Power.Components; using Content.Server.UserInterface; using Content.Shared.ActionBlocker; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Atmos/Components/GasAnalyzerComponent.cs b/Content.Server/Atmos/Components/GasAnalyzerComponent.cs index 1e09798edd..702afa8d25 100644 --- a/Content.Server/Atmos/Components/GasAnalyzerComponent.cs +++ b/Content.Server/Atmos/Components/GasAnalyzerComponent.cs @@ -7,7 +7,7 @@ using Content.Shared.Atmos; using Content.Shared.Atmos.Components; using Content.Shared.DragDrop; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.GameObjects; diff --git a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs index ea1c278f7e..0d0c463f82 100644 --- a/Content.Server/Atmos/EntitySystems/FlammableSystem.cs +++ b/Content.Server/Atmos/EntitySystems/FlammableSystem.cs @@ -8,7 +8,7 @@ using Content.Shared.Alert; using Content.Shared.Atmos; using Content.Shared.Damage; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Temperature; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; diff --git a/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs b/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs index 9e8935d0d3..39e1b71911 100644 --- a/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs +++ b/Content.Server/Atmos/Piping/EntitySystems/AtmosUnsafeUnanchorSystem.cs @@ -1,11 +1,10 @@ -using System.Buffers; using Content.Server.Atmos.EntitySystems; using Content.Server.Atmos.Piping.Components; using Content.Server.Construction.Components; using Content.Server.NodeContainer; using Content.Server.NodeContainer.Nodes; using Content.Shared.Atmos; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Shared.GameObjects; using Robust.Shared.IoC; diff --git a/Content.Server/Body/Behavior/LungBehavior.cs b/Content.Server/Body/Behavior/LungBehavior.cs index 28c5c6028e..6399b6a635 100644 --- a/Content.Server/Body/Behavior/LungBehavior.cs +++ b/Content.Server/Body/Behavior/LungBehavior.cs @@ -4,7 +4,7 @@ using Content.Server.Atmos.Components; using Content.Server.Atmos.EntitySystems; using Content.Server.Body.Circulatory; using Content.Server.Body.Respiratory; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Atmos; using Content.Shared.Body.Components; using Content.Shared.MobState; diff --git a/Content.Server/Body/Mechanism/MechanismComponent.cs b/Content.Server/Body/Mechanism/MechanismComponent.cs index de9c1c476f..52c5cb56ca 100644 --- a/Content.Server/Body/Mechanism/MechanismComponent.cs +++ b/Content.Server/Body/Mechanism/MechanismComponent.cs @@ -6,8 +6,7 @@ using Content.Shared.Body.Mechanism; using Content.Shared.Body.Part; using Content.Shared.Body.Surgery; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.GameObjects; diff --git a/Content.Server/Body/Part/BodyPartComponent.cs b/Content.Server/Body/Part/BodyPartComponent.cs index c3939acf98..63b09f2138 100644 --- a/Content.Server/Body/Part/BodyPartComponent.cs +++ b/Content.Server/Body/Part/BodyPartComponent.cs @@ -6,8 +6,7 @@ using Content.Shared.Body.Mechanism; using Content.Shared.Body.Part; using Content.Shared.Body.Surgery; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Random.Helpers; using Content.Shared.Verbs; using Robust.Server.Console; diff --git a/Content.Server/Body/Respiratory/RespiratorComponent.cs b/Content.Server/Body/Respiratory/RespiratorComponent.cs index 277b95f6e8..979110d8e9 100644 --- a/Content.Server/Body/Respiratory/RespiratorComponent.cs +++ b/Content.Server/Body/Respiratory/RespiratorComponent.cs @@ -13,7 +13,7 @@ using Content.Shared.Atmos; using Content.Shared.Body.Components; using Content.Shared.Damage; using Content.Shared.MobState; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; using Robust.Shared.Localization; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/Body/Surgery/BiologicalSurgeryDataComponent.cs b/Content.Server/Body/Surgery/BiologicalSurgeryDataComponent.cs index 870f0cd670..4485859f8c 100644 --- a/Content.Server/Body/Surgery/BiologicalSurgeryDataComponent.cs +++ b/Content.Server/Body/Surgery/BiologicalSurgeryDataComponent.cs @@ -7,8 +7,7 @@ using Content.Shared.Body.Components; using Content.Shared.Body.Mechanism; using Content.Shared.Body.Part; using Content.Shared.Body.Surgery; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; using Robust.Shared.Localization; using static Content.Shared.Body.Surgery.ISurgeryData; diff --git a/Content.Server/Body/Surgery/Components/SurgeryToolComponent.cs b/Content.Server/Body/Surgery/Components/SurgeryToolComponent.cs index 50115a2b47..58e01a5c02 100644 --- a/Content.Server/Body/Surgery/Components/SurgeryToolComponent.cs +++ b/Content.Server/Body/Surgery/Components/SurgeryToolComponent.cs @@ -9,7 +9,7 @@ using Content.Shared.Body.Mechanism; using Content.Shared.Body.Part; using Content.Shared.Body.Surgery; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.GameObjects; diff --git a/Content.Server/Botany/Components/PlantHolderComponent.cs b/Content.Server/Botany/Components/PlantHolderComponent.cs index 927be946eb..190340dcec 100644 --- a/Content.Server/Botany/Components/PlantHolderComponent.cs +++ b/Content.Server/Botany/Components/PlantHolderComponent.cs @@ -4,8 +4,8 @@ using Content.Server.Atmos; using Content.Server.Atmos.EntitySystems; using Content.Server.Fluids.Components; using Content.Server.Hands.Components; -using Content.Server.Notification; using Content.Server.Plants; +using Content.Server.Popups; using Content.Shared.ActionBlocker; using Content.Shared.Audio; using Content.Shared.Botany; @@ -13,7 +13,7 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Random.Helpers; using Content.Shared.Tag; using Robust.Server.GameObjects; diff --git a/Content.Server/Botany/Components/SeedExtractorComponent.cs b/Content.Server/Botany/Components/SeedExtractorComponent.cs index 6863e72d90..5b638ac7ff 100644 --- a/Content.Server/Botany/Components/SeedExtractorComponent.cs +++ b/Content.Server/Botany/Components/SeedExtractorComponent.cs @@ -1,8 +1,7 @@ using System.Threading.Tasks; using Content.Server.Power.Components; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; diff --git a/Content.Server/Botany/Seed.cs b/Content.Server/Botany/Seed.cs index de011031e8..5e0545772d 100644 --- a/Content.Server/Botany/Seed.cs +++ b/Content.Server/Botany/Seed.cs @@ -4,8 +4,7 @@ using System.Linq; using Content.Server.Botany.Components; using Content.Server.Plants; using Content.Shared.Atmos; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Random.Helpers; using Content.Shared.Tag; using Robust.Server.GameObjects; diff --git a/Content.Server/Buckle/Components/BuckleComponent.cs b/Content.Server/Buckle/Components/BuckleComponent.cs index aae2920187..d6a57fc116 100644 --- a/Content.Server/Buckle/Components/BuckleComponent.cs +++ b/Content.Server/Buckle/Components/BuckleComponent.cs @@ -9,7 +9,7 @@ using Content.Shared.Alert; using Content.Shared.Buckle.Components; using Content.Shared.Interaction.Helpers; using Content.Shared.MobState.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Standing; using Content.Shared.Verbs; using Robust.Server.GameObjects; diff --git a/Content.Server/Cabinet/ItemCabinetSystem.cs b/Content.Server/Cabinet/ItemCabinetSystem.cs index b56e1d52cd..bc7b031e4d 100644 --- a/Content.Server/Cabinet/ItemCabinetSystem.cs +++ b/Content.Server/Cabinet/ItemCabinetSystem.cs @@ -3,8 +3,7 @@ using Content.Server.Items; using Content.Shared.Audio; using Content.Shared.Cabinet; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.GameObjects; diff --git a/Content.Server/CharacterAppearance/Components/MagicMirrorComponent.cs b/Content.Server/CharacterAppearance/Components/MagicMirrorComponent.cs index bdccf0cacb..d7993453d0 100644 --- a/Content.Server/CharacterAppearance/Components/MagicMirrorComponent.cs +++ b/Content.Server/CharacterAppearance/Components/MagicMirrorComponent.cs @@ -2,8 +2,7 @@ using Content.Server.UserInterface; using Content.Shared.CharacterAppearance; using Content.Shared.CharacterAppearance.Components; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.IoC; diff --git a/Content.Server/Chat/Commands/SuicideCommand.cs b/Content.Server/Chat/Commands/SuicideCommand.cs index 8271987166..a9ba9f309d 100644 --- a/Content.Server/Chat/Commands/SuicideCommand.cs +++ b/Content.Server/Chat/Commands/SuicideCommand.cs @@ -5,12 +5,11 @@ using Content.Server.Chat.Managers; using Content.Server.GameTicking; using Content.Server.Hands.Components; using Content.Server.Items; -using Content.Server.Notification; using Content.Server.Players; +using Content.Server.Popups; using Content.Shared.Damage; using Content.Shared.Damage.Prototypes; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.Player; using Robust.Shared.Console; using Robust.Shared.Enums; diff --git a/Content.Server/Chat/Managers/ChatManager.cs b/Content.Server/Chat/Managers/ChatManager.cs index 9ea60b2a35..f362de9fd2 100644 --- a/Content.Server/Chat/Managers/ChatManager.cs +++ b/Content.Server/Chat/Managers/ChatManager.cs @@ -13,7 +13,7 @@ using Content.Shared.Administration; using Content.Shared.CCVar; using Content.Shared.Chat; using Content.Shared.Inventory; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Configuration; diff --git a/Content.Server/Chemistry/Components/ChemMasterComponent.cs b/Content.Server/Chemistry/Components/ChemMasterComponent.cs index 8589397e88..5dd67f76d3 100644 --- a/Content.Server/Chemistry/Components/ChemMasterComponent.cs +++ b/Content.Server/Chemistry/Components/ChemMasterComponent.cs @@ -11,7 +11,7 @@ using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Random.Helpers; using Content.Shared.Sound; using Content.Shared.Verbs; diff --git a/Content.Server/Chemistry/Components/HyposprayComponent.cs b/Content.Server/Chemistry/Components/HyposprayComponent.cs index 947481699e..90a4839389 100644 --- a/Content.Server/Chemistry/Components/HyposprayComponent.cs +++ b/Content.Server/Chemistry/Components/HyposprayComponent.cs @@ -4,7 +4,7 @@ using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.MobState.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/Chemistry/Components/InjectorComponent.cs b/Content.Server/Chemistry/Components/InjectorComponent.cs index 4f6fa6e531..b4ef96f17f 100644 --- a/Content.Server/Chemistry/Components/InjectorComponent.cs +++ b/Content.Server/Chemistry/Components/InjectorComponent.cs @@ -8,7 +8,7 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; using Robust.Shared.Localization; using Robust.Shared.Players; diff --git a/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs b/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs index b4fb8c0858..f91267cf0a 100644 --- a/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs +++ b/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs @@ -12,7 +12,7 @@ using Content.Shared.Chemistry.Dispenser; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Verbs; using JetBrains.Annotations; diff --git a/Content.Server/Chemistry/Components/SolutionTransferComponent.cs b/Content.Server/Chemistry/Components/SolutionTransferComponent.cs index d4bbd47846..52fef40479 100644 --- a/Content.Server/Chemistry/Components/SolutionTransferComponent.cs +++ b/Content.Server/Chemistry/Components/SolutionTransferComponent.cs @@ -9,9 +9,8 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; -using Microsoft.EntityFrameworkCore.Metadata.Builders; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Chemistry/EntitySystems/RehydratableSystem.cs b/Content.Server/Chemistry/EntitySystems/RehydratableSystem.cs index 3c86fa881b..57e14195ad 100644 --- a/Content.Server/Chemistry/EntitySystems/RehydratableSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/RehydratableSystem.cs @@ -1,5 +1,5 @@ using Content.Server.Chemistry.Components; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using JetBrains.Annotations; diff --git a/Content.Server/Climbing/Components/ClimbableComponent.cs b/Content.Server/Climbing/Components/ClimbableComponent.cs index ba899056db..90f218f7b1 100644 --- a/Content.Server/Climbing/Components/ClimbableComponent.cs +++ b/Content.Server/Climbing/Components/ClimbableComponent.cs @@ -1,14 +1,13 @@ using System; using Content.Server.DoAfter; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.ActionBlocker; using Content.Shared.Body.Components; using Content.Shared.Body.Part; using Content.Shared.Climbing; using Content.Shared.DragDrop; -using Content.Shared.Interaction.Events; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Cloning/Components/CloningPodComponent.cs b/Content.Server/Cloning/Components/CloningPodComponent.cs index fba96c8860..3fb773448a 100644 --- a/Content.Server/Cloning/Components/CloningPodComponent.cs +++ b/Content.Server/Cloning/Components/CloningPodComponent.cs @@ -6,8 +6,7 @@ using Content.Server.Power.Components; using Content.Server.UserInterface; using Content.Shared.Cloning; using Content.Shared.MobState; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Containers; diff --git a/Content.Server/Clothing/Components/ClothingComponent.cs b/Content.Server/Clothing/Components/ClothingComponent.cs index 3b78a97709..238bfede80 100644 --- a/Content.Server/Clothing/Components/ClothingComponent.cs +++ b/Content.Server/Clothing/Components/ClothingComponent.cs @@ -4,12 +4,10 @@ using Content.Server.Items; using Content.Shared.Clothing; using Content.Shared.Interaction; using Content.Shared.Item; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; -using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.GameStates; -using Robust.Shared.Player; using Robust.Shared.Players; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; diff --git a/Content.Server/Construction/Completions/PopupEveryone.cs b/Content.Server/Construction/Completions/PopupEveryone.cs index 7c9132bfa2..cec7251f5b 100644 --- a/Content.Server/Construction/Completions/PopupEveryone.cs +++ b/Content.Server/Construction/Completions/PopupEveryone.cs @@ -1,5 +1,5 @@ using System.Threading.Tasks; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Construction; using Robust.Shared.GameObjects; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/Construction/Completions/PopupUser.cs b/Content.Server/Construction/Completions/PopupUser.cs index f7d620e734..48e8850634 100644 --- a/Content.Server/Construction/Completions/PopupUser.cs +++ b/Content.Server/Construction/Completions/PopupUser.cs @@ -1,7 +1,6 @@ using System.Threading.Tasks; using Content.Shared.Construction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Shared.GameObjects; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/Construction/Components/ConstructionComponent.Verbs.cs b/Content.Server/Construction/Components/ConstructionComponent.Verbs.cs index 96f7b0b8c4..b7920cb832 100644 --- a/Content.Server/Construction/Components/ConstructionComponent.Verbs.cs +++ b/Content.Server/Construction/Components/ConstructionComponent.Verbs.cs @@ -1,6 +1,5 @@ using Content.Shared.ActionBlocker; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Construction/ConstructionSystem.cs b/Content.Server/Construction/ConstructionSystem.cs index d699f5f4db..6269a06862 100644 --- a/Content.Server/Construction/ConstructionSystem.cs +++ b/Content.Server/Construction/ConstructionSystem.cs @@ -15,9 +15,8 @@ using Content.Shared.Construction.Prototypes; using Content.Shared.Construction.Steps; using Content.Shared.Coordinates; using Content.Shared.Examine; -using Content.Shared.Interaction.Events; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Shared.Containers; using Robust.Shared.GameObjects; diff --git a/Content.Server/Conveyor/ConveyorSystem.cs b/Content.Server/Conveyor/ConveyorSystem.cs index 8edda86258..097a9849ea 100644 --- a/Content.Server/Conveyor/ConveyorSystem.cs +++ b/Content.Server/Conveyor/ConveyorSystem.cs @@ -3,12 +3,11 @@ using Content.Server.Items; using Content.Server.MachineLinking.Events; using Content.Server.MachineLinking.Models; using Content.Server.Power.Components; -using Content.Server.Recycling.Components; using Content.Server.Stunnable.Components; using Content.Shared.Conveyor; using Content.Shared.MachineLinking; using Content.Shared.Movement.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Shared.Containers; using Robust.Shared.GameObjects; @@ -16,7 +15,6 @@ using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Physics; -using Robust.Shared.Physics.Dynamics; namespace Content.Server.Conveyor { diff --git a/Content.Server/Crayon/CrayonComponent.cs b/Content.Server/Crayon/CrayonComponent.cs index a4ce08b2d6..57dbfd2831 100644 --- a/Content.Server/Crayon/CrayonComponent.cs +++ b/Content.Server/Crayon/CrayonComponent.cs @@ -3,11 +3,9 @@ using System.Threading.Tasks; using Content.Server.UserInterface; using Content.Shared.Audio; using Content.Shared.Crayon; -using Content.Shared.DragDrop; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/Cuffs/Components/CuffableComponent.cs b/Content.Server/Cuffs/Components/CuffableComponent.cs index fd550d228d..e01c022428 100644 --- a/Content.Server/Cuffs/Components/CuffableComponent.cs +++ b/Content.Server/Cuffs/Components/CuffableComponent.cs @@ -7,9 +7,8 @@ using Content.Server.Hands.Components; using Content.Shared.ActionBlocker; using Content.Shared.Alert; using Content.Shared.Cuffs.Components; -using Content.Shared.Interaction.Events; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/Cuffs/Components/HandcuffComponent.cs b/Content.Server/Cuffs/Components/HandcuffComponent.cs index 24cedb9a26..f175e89a26 100644 --- a/Content.Server/Cuffs/Components/HandcuffComponent.cs +++ b/Content.Server/Cuffs/Components/HandcuffComponent.cs @@ -6,9 +6,8 @@ using Content.Server.Stunnable.Components; using Content.Shared.ActionBlocker; using Content.Shared.Cuffs.Components; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/Dice/DiceSystem.cs b/Content.Server/Dice/DiceSystem.cs index 2369f11b36..073969859b 100644 --- a/Content.Server/Dice/DiceSystem.cs +++ b/Content.Server/Dice/DiceSystem.cs @@ -1,5 +1,5 @@ using System; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Audio; using Content.Shared.Examine; using Content.Shared.Interaction; diff --git a/Content.Server/Disposal/Tube/Components/DisposalRouterComponent.cs b/Content.Server/Disposal/Tube/Components/DisposalRouterComponent.cs index 5c1256202d..3a973d2395 100644 --- a/Content.Server/Disposal/Tube/Components/DisposalRouterComponent.cs +++ b/Content.Server/Disposal/Tube/Components/DisposalRouterComponent.cs @@ -6,8 +6,7 @@ using Content.Server.Hands.Components; using Content.Server.UserInterface; using Content.Shared.ActionBlocker; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Verbs; using Robust.Server.Console; diff --git a/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs b/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs index 03a4bd73b2..2cf41cbf4a 100644 --- a/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs +++ b/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs @@ -3,8 +3,7 @@ using Content.Server.Hands.Components; using Content.Server.UserInterface; using Content.Shared.ActionBlocker; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Verbs; using Robust.Server.Console; diff --git a/Content.Server/Disposal/Tube/Components/DisposalTubeComponent.cs b/Content.Server/Disposal/Tube/Components/DisposalTubeComponent.cs index 6e5840106f..49856650bf 100644 --- a/Content.Server/Disposal/Tube/Components/DisposalTubeComponent.cs +++ b/Content.Server/Disposal/Tube/Components/DisposalTubeComponent.cs @@ -4,7 +4,7 @@ using Content.Server.Construction.Components; using Content.Server.Disposal.Unit.Components; using Content.Shared.Acts; using Content.Shared.Disposal.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Verbs; using Robust.Server.Console; @@ -17,7 +17,6 @@ using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Physics; using Robust.Shared.Serialization.Manager.Attributes; -using Robust.Shared.Timing; using Robust.Shared.ViewVariables; namespace Content.Server.Disposal.Tube.Components diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index 9cdbc62f63..42c442d944 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -15,7 +15,7 @@ using Content.Shared.Disposal; using Content.Shared.Disposal.Components; using Content.Shared.Interaction; using Content.Shared.Movement; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Throwing; using Robust.Server.GameObjects; using Robust.Shared.Containers; diff --git a/Content.Server/Doors/Components/AirlockComponent.cs b/Content.Server/Doors/Components/AirlockComponent.cs index d9bc2e2f4d..14a0cee02b 100644 --- a/Content.Server/Doors/Components/AirlockComponent.cs +++ b/Content.Server/Doors/Components/AirlockComponent.cs @@ -4,14 +4,9 @@ using Content.Server.Power.Components; using Content.Server.VendingMachines; using Content.Server.WireHacking; using Content.Shared.Doors; -using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; using Content.Shared.Sound; -using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.GameObjects; -using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Player; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/Doors/Components/FirelockComponent.cs b/Content.Server/Doors/Components/FirelockComponent.cs index ee7154bb28..1e43518e69 100644 --- a/Content.Server/Doors/Components/FirelockComponent.cs +++ b/Content.Server/Doors/Components/FirelockComponent.cs @@ -1,12 +1,7 @@ using Content.Server.Atmos.Components; using Content.Server.Atmos.EntitySystems; -using Content.Server.Doors; -using Content.Server.Doors.Components; using Content.Shared.Doors; -using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; using Robust.Shared.GameObjects; -using Robust.Shared.Localization; using Robust.Shared.Serialization.Manager.Attributes; namespace Content.Server.Doors.Components diff --git a/Content.Server/Doors/Systems/AirlockSystem.cs b/Content.Server/Doors/Systems/AirlockSystem.cs index 4645319b53..ea5dc50f6b 100644 --- a/Content.Server/Doors/Systems/AirlockSystem.cs +++ b/Content.Server/Doors/Systems/AirlockSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Doors.Components; using Content.Server.Power.Components; using Content.Shared.Doors; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Doors/Systems/FirelockSystem.cs b/Content.Server/Doors/Systems/FirelockSystem.cs index 49ab584471..5f3d2e1c40 100644 --- a/Content.Server/Doors/Systems/FirelockSystem.cs +++ b/Content.Server/Doors/Systems/FirelockSystem.cs @@ -1,6 +1,6 @@ using Content.Server.Doors.Components; using Content.Shared.Doors; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Entry/EntryPoint.cs b/Content.Server/Entry/EntryPoint.cs index 621801dc93..446f543b77 100644 --- a/Content.Server/Entry/EntryPoint.cs +++ b/Content.Server/Entry/EntryPoint.cs @@ -11,7 +11,6 @@ using Content.Server.GameTicking; using Content.Server.Holiday.Interfaces; using Content.Server.IoC; using Content.Server.NodeContainer.NodeGroups; -using Content.Server.Notification.Managers; using Content.Server.PDA.Managers; using Content.Server.Preferences.Managers; using Content.Server.Sandbox; @@ -62,7 +61,6 @@ namespace Content.Server.Entry _euiManager = IoCManager.Resolve(); _voteManager = IoCManager.Resolve(); - IoCManager.Resolve().Initialize(); IoCManager.Resolve().Initialize(); var playerManager = IoCManager.Resolve(); diff --git a/Content.Server/Extinguisher/FireExtinguisherComponent.cs b/Content.Server/Extinguisher/FireExtinguisherComponent.cs index 1ad75af4d5..eb40b6cd90 100644 --- a/Content.Server/Extinguisher/FireExtinguisherComponent.cs +++ b/Content.Server/Extinguisher/FireExtinguisherComponent.cs @@ -1,10 +1,9 @@ using System.Threading.Tasks; using Content.Server.Chemistry.Components; -using Content.Server.Fluids.Components; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index 0e7a731377..286ebfc30a 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -8,8 +8,8 @@ using Content.Shared.Flash; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; using Content.Shared.Inventory; -using Content.Shared.Notification.Managers; using Content.Shared.Physics; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/Fluids/Components/BucketComponent.cs b/Content.Server/Fluids/Components/BucketComponent.cs index 14600d1dd8..33a0bb8409 100644 --- a/Content.Server/Fluids/Components/BucketComponent.cs +++ b/Content.Server/Fluids/Components/BucketComponent.cs @@ -5,7 +5,7 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/Fluids/Components/MopComponent.cs b/Content.Server/Fluids/Components/MopComponent.cs index 4bd7db7d0e..72545604b6 100644 --- a/Content.Server/Fluids/Components/MopComponent.cs +++ b/Content.Server/Fluids/Components/MopComponent.cs @@ -5,7 +5,7 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/Fluids/Components/SpillableComponent.cs b/Content.Server/Fluids/Components/SpillableComponent.cs index e026c171bf..0a2ac3dd93 100644 --- a/Content.Server/Fluids/Components/SpillableComponent.cs +++ b/Content.Server/Fluids/Components/SpillableComponent.cs @@ -3,7 +3,7 @@ using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Fluids/Components/SprayComponent.cs b/Content.Server/Fluids/Components/SprayComponent.cs index 4179491fe7..bad39a8232 100644 --- a/Content.Server/Fluids/Components/SprayComponent.cs +++ b/Content.Server/Fluids/Components/SprayComponent.cs @@ -9,7 +9,7 @@ using Content.Shared.Chemistry.Reagent; using Content.Shared.Cooldown; using Content.Shared.Fluids; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Vapor; using Robust.Server.GameObjects; diff --git a/Content.Server/Hands/Components/HandsComponent.cs b/Content.Server/Hands/Components/HandsComponent.cs index a044676de3..e25da84dd1 100644 --- a/Content.Server/Hands/Components/HandsComponent.cs +++ b/Content.Server/Hands/Components/HandsComponent.cs @@ -5,12 +5,12 @@ using System.Linq; using Content.Server.Act; using Content.Server.Interaction; using Content.Server.Items; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Server.Pulling; using Content.Shared.Audio; using Content.Shared.Body.Part; using Content.Shared.Hands.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Pulling.Components; using Content.Shared.Sound; using Robust.Server.GameObjects; diff --git a/Content.Server/Hands/Systems/HandsSystem.cs b/Content.Server/Hands/Systems/HandsSystem.cs index e2d420f21b..23dfbb8779 100644 --- a/Content.Server/Hands/Systems/HandsSystem.cs +++ b/Content.Server/Hands/Systems/HandsSystem.cs @@ -2,7 +2,6 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Linq; using Content.Server.Hands.Components; -using Content.Server.Hands.Systems; using Content.Server.Interaction; using Content.Server.Inventory.Components; using Content.Server.Items; @@ -13,8 +12,8 @@ using Content.Shared.Examine; using Content.Shared.Hands; using Content.Shared.Hands.Components; using Content.Shared.Input; -using Content.Shared.Notification.Managers; using Content.Shared.Physics.Pull; +using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Server.Player; using Robust.Shared.Containers; diff --git a/Content.Server/Instruments/InstrumentComponent.cs b/Content.Server/Instruments/InstrumentComponent.cs index 499d0a3e6d..4b44643772 100644 --- a/Content.Server/Instruments/InstrumentComponent.cs +++ b/Content.Server/Instruments/InstrumentComponent.cs @@ -3,11 +3,10 @@ using System.Linq; using Content.Server.Stunnable.Components; using Content.Server.UserInterface; using Content.Shared.ActionBlocker; -using Content.Shared.DragDrop; using Content.Shared.Hands; using Content.Shared.Instruments; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Standing; using Content.Shared.Throwing; using Robust.Server.GameObjects; diff --git a/Content.Server/Interaction/InRangeUnoccludedVerb.cs b/Content.Server/Interaction/InRangeUnoccludedVerb.cs index dd59bd9956..00a06f229b 100644 --- a/Content.Server/Interaction/InRangeUnoccludedVerb.cs +++ b/Content.Server/Interaction/InRangeUnoccludedVerb.cs @@ -1,6 +1,5 @@ using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Server.Console; using Robust.Server.GameObjects; diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs index 259017aa09..006450a77d 100644 --- a/Content.Server/Interaction/InteractionSystem.cs +++ b/Content.Server/Interaction/InteractionSystem.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Threading.Tasks; using Content.Server.Buckle.Components; using Content.Server.CombatMode; -using Content.Server.DoAfter; using Content.Server.Hands.Components; using Content.Server.Items; using Content.Server.Pulling; @@ -15,10 +14,9 @@ using Content.Shared.Hands; using Content.Shared.Hands.Components; using Content.Shared.Input; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; using Content.Shared.Interaction.Helpers; using Content.Shared.Inventory; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Rotatable; using Content.Shared.Throwing; using Content.Shared.Verbs; @@ -314,7 +312,7 @@ namespace Content.Server.Interaction /// Resolves user interactions with objects. /// /// - /// Checks Whether combat mode is enabled and whether the user can actually interact with the given entity. + /// Checks Whether combat mode is enabled and whether the user can actually interact with the given entity. /// /// Whether to use default or alternative interactions (usually as a result of /// alt+clicking). If combat mode is enabled, the alternative action is to perform the default non-combat @@ -324,7 +322,7 @@ namespace Content.Server.Interaction // TODO COMBAT Consider using alt-interact for advanced combat? maybe alt-interact disarms? if (!altInteract && user.TryGetComponent(out CombatModeComponent? combatMode) && combatMode.IsInCombatMode) { - + DoAttack(user, coordinates, false, clickedUid); return; @@ -501,7 +499,7 @@ namespace Content.Server.Interaction } /// - /// Alternative interactions on an entity. + /// Alternative interactions on an entity. /// /// /// Uses the context menu verb list, and acts out the first verb marked as an alternative interaction. Note diff --git a/Content.Server/Inventory/Components/DebugEquipComponent.cs b/Content.Server/Inventory/Components/DebugEquipComponent.cs index 5fe20dd515..e5c375cf3c 100644 --- a/Content.Server/Inventory/Components/DebugEquipComponent.cs +++ b/Content.Server/Inventory/Components/DebugEquipComponent.cs @@ -1,7 +1,6 @@ using Content.Shared.Hands; using Content.Shared.Inventory; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; namespace Content.Server.Inventory.Components diff --git a/Content.Server/Inventory/Components/InventoryComponent.cs b/Content.Server/Inventory/Components/InventoryComponent.cs index 37983eadfd..c6c9bb5cb3 100644 --- a/Content.Server/Inventory/Components/InventoryComponent.cs +++ b/Content.Server/Inventory/Components/InventoryComponent.cs @@ -12,9 +12,8 @@ using Content.Shared.ActionBlocker; using Content.Shared.Acts; using Content.Shared.EffectBlocker; using Content.Shared.Inventory; -using Content.Shared.Inventory.Events; using Content.Shared.Movement.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Server.Console; using Robust.Server.GameObjects; diff --git a/Content.Server/IoC/ServerContentIoC.cs b/Content.Server/IoC/ServerContentIoC.cs index 4e1fabb0bf..56e3d0ac45 100644 --- a/Content.Server/IoC/ServerContentIoC.cs +++ b/Content.Server/IoC/ServerContentIoC.cs @@ -9,17 +9,14 @@ using Content.Server.Connection; using Content.Server.Database; using Content.Server.DeviceNetwork; using Content.Server.EUI; -using Content.Server.GameTicking; using Content.Server.Holiday; using Content.Server.Holiday.Interfaces; using Content.Server.Module; using Content.Server.MoMMI; using Content.Server.NodeContainer.NodeGroups; -using Content.Server.Notification.Managers; using Content.Server.Objectives; using Content.Server.Objectives.Interfaces; using Content.Server.PDA.Managers; -using Content.Server.Power.Components; using Content.Server.Preferences.Managers; using Content.Server.Sandbox; using Content.Server.Speech; @@ -28,8 +25,6 @@ using Content.Shared.Actions; using Content.Shared.Alert; using Content.Shared.Kitchen; using Content.Shared.Module; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; using Robust.Shared.IoC; namespace Content.Server.IoC @@ -38,8 +33,6 @@ namespace Content.Server.IoC { public static void Register() { - IoCManager.Register(); - IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); diff --git a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs index f4cb1e6022..8d7fa8593d 100644 --- a/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs +++ b/Content.Server/Kitchen/Components/KitchenSpikeComponent.cs @@ -3,14 +3,13 @@ using System.Diagnostics.CodeAnalysis; using Content.Server.Act; using Content.Server.Chat.Managers; using Content.Server.DoAfter; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.DragDrop; using Content.Shared.Interaction; using Content.Shared.Kitchen.Components; using Content.Shared.MobState; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; using Content.Shared.Nutrition.Components; +using Content.Shared.Popups; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/Kitchen/Components/MicrowaveComponent.cs b/Content.Server/Kitchen/Components/MicrowaveComponent.cs index 36f1f81f05..8c22cea40e 100644 --- a/Content.Server/Kitchen/Components/MicrowaveComponent.cs +++ b/Content.Server/Kitchen/Components/MicrowaveComponent.cs @@ -6,7 +6,7 @@ using Content.Server.Chat.Managers; using Content.Server.Chemistry.Components; using Content.Server.Hands.Components; using Content.Server.Items; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Server.Power.Components; using Content.Server.UserInterface; using Content.Shared.Acts; @@ -18,7 +18,7 @@ using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; using Content.Shared.Kitchen; using Content.Shared.Kitchen.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Power; using Content.Shared.Sound; using Robust.Server.GameObjects; diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs index 3cb133828c..e99321c241 100644 --- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs @@ -11,7 +11,7 @@ using Content.Server.UserInterface; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Interaction; using Content.Shared.Kitchen.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Random.Helpers; using JetBrains.Annotations; using Robust.Server.GameObjects; diff --git a/Content.Server/Light/Components/HandheldLightComponent.cs b/Content.Server/Light/Components/HandheldLightComponent.cs index fa115c131f..12a5ed590b 100644 --- a/Content.Server/Light/Components/HandheldLightComponent.cs +++ b/Content.Server/Light/Components/HandheldLightComponent.cs @@ -8,9 +8,8 @@ using Content.Shared.Actions.Behaviors.Item; using Content.Shared.Actions.Components; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; using Content.Shared.Light.Component; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Rounding; using Content.Shared.Sound; using Content.Shared.Verbs; diff --git a/Content.Server/Light/Components/LightReplacerComponent.cs b/Content.Server/Light/Components/LightReplacerComponent.cs index fbcf622b1c..fcbe69c2f3 100644 --- a/Content.Server/Light/Components/LightReplacerComponent.cs +++ b/Content.Server/Light/Components/LightReplacerComponent.cs @@ -2,9 +2,8 @@ using System; using System.Collections.Generic; using System.Linq; using Content.Server.Storage.Components; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; -using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.GameObjects; diff --git a/Content.Server/Light/Components/PoweredLightComponent.cs b/Content.Server/Light/Components/PoweredLightComponent.cs index 3500926088..8a37337bc7 100644 --- a/Content.Server/Light/Components/PoweredLightComponent.cs +++ b/Content.Server/Light/Components/PoweredLightComponent.cs @@ -8,7 +8,7 @@ using Content.Shared.Audio; using Content.Shared.Damage; using Content.Shared.Interaction; using Content.Shared.Light; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/Lock/LockSystem.cs b/Content.Server/Lock/LockSystem.cs index 737cf2ac43..db8702d3e3 100644 --- a/Content.Server/Lock/LockSystem.cs +++ b/Content.Server/Lock/LockSystem.cs @@ -2,7 +2,7 @@ using Content.Server.Access.Components; using Content.Server.Storage.Components; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Storage; using JetBrains.Annotations; using Robust.Server.GameObjects; diff --git a/Content.Server/MachineLinking/System/SignalLinkerSystem.cs b/Content.Server/MachineLinking/System/SignalLinkerSystem.cs index 45194bdba2..833b056588 100644 --- a/Content.Server/MachineLinking/System/SignalLinkerSystem.cs +++ b/Content.Server/MachineLinking/System/SignalLinkerSystem.cs @@ -7,15 +7,12 @@ using Content.Server.MachineLinking.Events; using Content.Server.MachineLinking.Exceptions; using Content.Server.MachineLinking.Models; using Content.Server.Power.Components; -using Content.Server.Power.EntitySystems; using Content.Server.UserInterface; using Content.Shared.Interaction; using Content.Shared.MachineLinking; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.GameObjects; -using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Utility; diff --git a/Content.Server/Medical/Components/MedicalScannerComponent.cs b/Content.Server/Medical/Components/MedicalScannerComponent.cs index 16b5ee5993..fdca140516 100644 --- a/Content.Server/Medical/Components/MedicalScannerComponent.cs +++ b/Content.Server/Medical/Components/MedicalScannerComponent.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Content.Server.Cloning; using Content.Server.Mind.Components; using Content.Server.Power.Components; @@ -12,20 +11,16 @@ using Content.Shared.DragDrop; using Content.Shared.Interaction; using Content.Shared.MedicalScanner; using Content.Shared.MobState; -using Content.Shared.Movement; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Preferences; using Content.Shared.Verbs; using Robust.Server.GameObjects; -using Robust.Server.Player; using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Maths; using Robust.Shared.Network; -using Robust.Shared.Timing; using Robust.Shared.ViewVariables; namespace Content.Server.Medical.Components diff --git a/Content.Server/Morgue/Components/BodyBagEntityStorageComponent.cs b/Content.Server/Morgue/Components/BodyBagEntityStorageComponent.cs index 48c5b51efa..d05d59d58e 100644 --- a/Content.Server/Morgue/Components/BodyBagEntityStorageComponent.cs +++ b/Content.Server/Morgue/Components/BodyBagEntityStorageComponent.cs @@ -8,7 +8,7 @@ using Content.Shared.Body.Components; using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Morgue; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Standing; using Content.Shared.Verbs; using Robust.Server.GameObjects; diff --git a/Content.Server/Morgue/Components/CrematoriumEntityStorageComponent.cs b/Content.Server/Morgue/Components/CrematoriumEntityStorageComponent.cs index 45961a49ba..d44a93f672 100644 --- a/Content.Server/Morgue/Components/CrematoriumEntityStorageComponent.cs +++ b/Content.Server/Morgue/Components/CrematoriumEntityStorageComponent.cs @@ -2,22 +2,20 @@ using System.Threading; using Content.Server.Act; using Content.Server.Chat.Managers; using Content.Server.GameTicking; -using Content.Server.Notification; using Content.Server.Players; +using Content.Server.Popups; using Content.Server.Storage.Components; using Content.Shared.ActionBlocker; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; using Content.Shared.Morgue; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Standing; using Content.Shared.Verbs; using Robust.Server.Player; using Robust.Shared.Audio; using Robust.Shared.GameObjects; -using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Player; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/Morgue/Components/MorgueEntityStorageComponent.cs b/Content.Server/Morgue/Components/MorgueEntityStorageComponent.cs index 76317cd299..a45d77a80e 100644 --- a/Content.Server/Morgue/Components/MorgueEntityStorageComponent.cs +++ b/Content.Server/Morgue/Components/MorgueEntityStorageComponent.cs @@ -6,8 +6,8 @@ using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; using Content.Shared.Morgue; -using Content.Shared.Notification.Managers; using Content.Shared.Physics; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Standing; using Robust.Server.GameObjects; @@ -165,7 +165,7 @@ namespace Content.Server.Morgue.Components if (DoSoulBeep && Appearance != null && Appearance.TryGetData(MorgueVisuals.HasSoul, out bool hasSoul) && hasSoul) { SoundSystem.Play(Filter.Pvs(Owner), _occupantHasSoulAlarmSound.GetSound(), Owner); - } + } } void IExamine.Examine(FormattedMessage message, bool inDetailsRange) diff --git a/Content.Server/NodeContainer/NodeGroups/NodeGroupAttribute.cs b/Content.Server/NodeContainer/NodeGroups/NodeGroupAttribute.cs index 109af6f67f..7c6b210869 100644 --- a/Content.Server/NodeContainer/NodeGroups/NodeGroupAttribute.cs +++ b/Content.Server/NodeContainer/NodeGroups/NodeGroupAttribute.cs @@ -5,7 +5,7 @@ namespace Content.Server.NodeContainer.NodeGroups { /// /// Associates a implementation with a . - /// This is used to gurantee all s of the same + /// This is used to gurantee all s of the same /// have the same type of . Used by . /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] diff --git a/Content.Server/Notification/Managers/IServerNotifyManager.cs b/Content.Server/Notification/Managers/IServerNotifyManager.cs deleted file mode 100644 index 5b2307e00e..0000000000 --- a/Content.Server/Notification/Managers/IServerNotifyManager.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; - -namespace Content.Server.Notification.Managers -{ - public interface IServerNotifyManager : ISharedNotifyManager - { - void Initialize(); - } -} diff --git a/Content.Server/Notification/Managers/ServerNotifyManager.cs b/Content.Server/Notification/Managers/ServerNotifyManager.cs deleted file mode 100644 index 040001d9de..0000000000 --- a/Content.Server/Notification/Managers/ServerNotifyManager.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Content.Shared; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; -using Robust.Server.GameObjects; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Map; -using Robust.Shared.Network; -using Robust.Shared.Utility; - -namespace Content.Server.Notification.Managers -{ - public class ServerNotifyManager : SharedNotifyManager, IServerNotifyManager - { - [Dependency] private readonly IServerNetManager _netManager = default!; - - private bool _initialized; - - public void Initialize() - { - DebugTools.Assert(!_initialized); - - _netManager.RegisterNetMessage(); - _netManager.RegisterNetMessage(); - _netManager.RegisterNetMessage(); - - _initialized = true; - } - - public override void PopupMessage(IEntity source, IEntity viewer, string message) - { - if (!viewer.TryGetComponent(out ActorComponent? actor)) - { - return; - } - - var netMessage = _netManager.CreateNetMessage(); - netMessage.Entity = source.Uid; - netMessage.Message = message; - - _netManager.ServerSendMessage(netMessage, actor.PlayerSession.ConnectedClient); - } - - public override void PopupMessage(EntityCoordinates coordinates, IEntity viewer, string message) - { - if (!viewer.TryGetComponent(out ActorComponent? actor)) - { - return; - } - - var netMessage = _netManager.CreateNetMessage(); - netMessage.Coordinates = coordinates; - netMessage.Message = message; - - _netManager.ServerSendMessage(netMessage, actor.PlayerSession.ConnectedClient); - } - - public override void PopupMessageCursor(IEntity viewer, string message) - { - if (!viewer.TryGetComponent(out ActorComponent? actor)) - { - return; - } - - var netMessage = _netManager.CreateNetMessage(); - netMessage.Message = message; - - _netManager.ServerSendMessage(netMessage, actor.PlayerSession.ConnectedClient); - } - } -} diff --git a/Content.Server/Nutrition/Components/DrinkComponent.cs b/Content.Server/Nutrition/Components/DrinkComponent.cs index e87fca3009..2a9104e7e3 100644 --- a/Content.Server/Nutrition/Components/DrinkComponent.cs +++ b/Content.Server/Nutrition/Components/DrinkComponent.cs @@ -9,8 +9,8 @@ using Content.Shared.Chemistry.Reagent; using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; using Content.Shared.Nutrition.Components; +using Content.Shared.Popups; using Content.Shared.Sound; using JetBrains.Annotations; using Robust.Server.GameObjects; diff --git a/Content.Server/Nutrition/Components/FoodComponent.cs b/Content.Server/Nutrition/Components/FoodComponent.cs index 5d76c8985c..1df6c71852 100644 --- a/Content.Server/Nutrition/Components/FoodComponent.cs +++ b/Content.Server/Nutrition/Components/FoodComponent.cs @@ -10,7 +10,7 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs index 887e0cf337..55ab60e0ff 100644 --- a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs @@ -1,11 +1,11 @@ using Content.Server.Fluids.Components; -using Content.Server.Notification; using Content.Server.Nutrition.Components; +using Content.Server.Popups; using Content.Shared.Audio; using Content.Shared.Chemistry.EntitySystems; -using Content.Shared.Notification.Managers; using Content.Shared.Nutrition.Components; using Content.Shared.Nutrition.EntitySystems; +using Content.Shared.Popups; using Content.Shared.Throwing; using JetBrains.Annotations; using Robust.Shared.Audio; diff --git a/Content.Server/PDA/PDAComponent.cs b/Content.Server/PDA/PDAComponent.cs index bc6de84383..5adaf73a10 100644 --- a/Content.Server/PDA/PDAComponent.cs +++ b/Content.Server/PDA/PDAComponent.cs @@ -9,11 +9,9 @@ using Content.Server.Items; using Content.Server.PDA.Managers; using Content.Server.UserInterface; using Content.Shared.ActionBlocker; -using Content.Shared.Hands.Components; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; using Content.Shared.PDA; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Tag; using Content.Shared.Verbs; diff --git a/Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs b/Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs index 8ef4e82bd4..dbdfb65cf7 100644 --- a/Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs +++ b/Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Threading; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; using Content.Server.UserInterface; diff --git a/Content.Server/Plants/Components/PottedPlantHideComponent.cs b/Content.Server/Plants/Components/PottedPlantHideComponent.cs index ecab584ba2..eae2ee3ac3 100644 --- a/Content.Server/Plants/Components/PottedPlantHideComponent.cs +++ b/Content.Server/Plants/Components/PottedPlantHideComponent.cs @@ -2,8 +2,7 @@ using System.Threading.Tasks; using Content.Server.Storage.Components; using Content.Shared.Audio; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Shared.Audio; using Robust.Shared.GameObjects; diff --git a/Content.Server/Pointing/EntitySystems/PointingSystem.cs b/Content.Server/Pointing/EntitySystems/PointingSystem.cs index 007e931658..68949852ca 100644 --- a/Content.Server/Pointing/EntitySystems/PointingSystem.cs +++ b/Content.Server/Pointing/EntitySystems/PointingSystem.cs @@ -6,9 +6,8 @@ using Content.Server.Pointing.Components; using Content.Server.Visible; using Content.Shared.ActionBlocker; using Content.Shared.Input; -using Content.Shared.Interaction.Events; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Server.GameObjects; using Robust.Server.Player; diff --git a/Content.Server/Notification/NotifyExtensions.cs b/Content.Server/Popups/PopupExtensions.cs similarity index 93% rename from Content.Server/Notification/NotifyExtensions.cs rename to Content.Server/Popups/PopupExtensions.cs index 685885a09b..2e94ccd9ba 100644 --- a/Content.Server/Notification/NotifyExtensions.cs +++ b/Content.Server/Popups/PopupExtensions.cs @@ -1,12 +1,11 @@ -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Server.Player; using Robust.Shared.GameObjects; using Robust.Shared.IoC; -namespace Content.Server.Notification +namespace Content.Server.Popups { - public static class NotifyExtensions + public static class PopupExtensions { /// /// Pops up a message for every player around to see, diff --git a/Content.Server/Notification/PopupMsgCommand.cs b/Content.Server/Popups/PopupMsgCommand.cs similarity index 86% rename from Content.Server/Notification/PopupMsgCommand.cs rename to Content.Server/Popups/PopupMsgCommand.cs index 212e7adca6..85392bc712 100644 --- a/Content.Server/Notification/PopupMsgCommand.cs +++ b/Content.Server/Popups/PopupMsgCommand.cs @@ -1,12 +1,11 @@ using Content.Server.Administration; using Content.Shared.Administration; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.Console; using Robust.Shared.GameObjects; using Robust.Shared.IoC; -namespace Content.Server.Notification +namespace Content.Server.Popups { [AdminCommand(AdminFlags.Debug)] public class PopupMsgCommand : IConsoleCommand diff --git a/Content.Server/Popups/PopupSystem.cs b/Content.Server/Popups/PopupSystem.cs new file mode 100644 index 0000000000..85335503a7 --- /dev/null +++ b/Content.Server/Popups/PopupSystem.cs @@ -0,0 +1,32 @@ +using Content.Shared.Popups; +using Robust.Server.GameObjects; +using Robust.Shared.GameObjects; +using Robust.Shared.Map; +using Robust.Shared.Player; + +namespace Content.Server.Popups +{ + public class PopupSystem : SharedPopupSystem + { + public override void PopupCursor(string message, Filter filter) + { + RaiseNetworkEvent(new PopupCursorEvent(message), filter); + } + + public override void PopupCoordinates(string message, EntityCoordinates coordinates, Filter filter) + { + RaiseNetworkEvent(new PopupCoordinatesEvent(message, coordinates), filter); + } + + public override void PopupEntity(string message, EntityUid uid, Filter filter) + { + RaiseNetworkEvent(new PopupEntityEvent(message, uid), filter); + } + + public override Filter GetFilterFromEntity(IEntity entity) + { + return entity.TryGetComponent(out ActorComponent? actor) + ? Filter.SinglePlayer(actor.PlayerSession) : Filter.Empty(); + } + } +} diff --git a/Content.Server/Power/Components/ApcComponent.cs b/Content.Server/Power/Components/ApcComponent.cs index 987dd2c16d..157859e5b3 100644 --- a/Content.Server/Power/Components/ApcComponent.cs +++ b/Content.Server/Power/Components/ApcComponent.cs @@ -4,7 +4,7 @@ using Content.Server.Power.NodeGroups; using Content.Server.UserInterface; using Content.Shared.APC; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/Power/Components/BaseCharger.cs b/Content.Server/Power/Components/BaseCharger.cs index 2b5544581d..a0eaa0c58c 100644 --- a/Content.Server/Power/Components/BaseCharger.cs +++ b/Content.Server/Power/Components/BaseCharger.cs @@ -5,8 +5,7 @@ using Content.Server.Items; using Content.Server.Weapon.Ranged.Barrels.Components; using Content.Shared.ActionBlocker; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Power; using Content.Shared.Verbs; using Robust.Server.GameObjects; diff --git a/Content.Server/RCD/Components/RCDAmmoComponent.cs b/Content.Server/RCD/Components/RCDAmmoComponent.cs index 5ea8367fbd..64a97f49a1 100644 --- a/Content.Server/RCD/Components/RCDAmmoComponent.cs +++ b/Content.Server/RCD/Components/RCDAmmoComponent.cs @@ -3,8 +3,7 @@ using System.Threading.Tasks; using Content.Server.Hands.Components; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; using Robust.Shared.Localization; using Robust.Shared.Serialization.Manager.Attributes; diff --git a/Content.Server/RCD/Components/RCDComponent.cs b/Content.Server/RCD/Components/RCDComponent.cs index 3479d667b0..63467e154a 100644 --- a/Content.Server/RCD/Components/RCDComponent.cs +++ b/Content.Server/RCD/Components/RCDComponent.cs @@ -7,8 +7,7 @@ using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; using Content.Shared.Maps; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/Radio/Components/HandheldRadioComponent.cs b/Content.Server/Radio/Components/HandheldRadioComponent.cs index eabd047e9b..2aaf3ef6fd 100644 --- a/Content.Server/Radio/Components/HandheldRadioComponent.cs +++ b/Content.Server/Radio/Components/HandheldRadioComponent.cs @@ -4,8 +4,7 @@ using Content.Server.Radio.EntitySystems; using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; diff --git a/Content.Server/Recycling/Components/RecyclerComponent.cs b/Content.Server/Recycling/Components/RecyclerComponent.cs index ea7b4f1de4..e7d03939c3 100644 --- a/Content.Server/Recycling/Components/RecyclerComponent.cs +++ b/Content.Server/Recycling/Components/RecyclerComponent.cs @@ -1,26 +1,16 @@ -using System.Collections.Generic; using Content.Server.Act; using Content.Server.Chat.Managers; -using Content.Server.Conveyor; using Content.Server.GameTicking; -using Content.Server.Items; -using Content.Server.Notification; using Content.Server.Players; -using Content.Server.Power.Components; +using Content.Server.Popups; using Content.Shared.Body.Components; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Recycling; using Robust.Server.GameObjects; using Robust.Server.Player; using Robust.Shared.Analyzers; -using Robust.Shared.Containers; using Robust.Shared.GameObjects; -using Robust.Shared.IoC; using Robust.Shared.Localization; -using Robust.Shared.Physics; -using Robust.Shared.Physics.Collision; -using Robust.Shared.Physics.Dynamics; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; diff --git a/Content.Server/Repairable/RepairableSystem.cs b/Content.Server/Repairable/RepairableSystem.cs index f5a529cdf1..cd36b1b096 100644 --- a/Content.Server/Repairable/RepairableSystem.cs +++ b/Content.Server/Repairable/RepairableSystem.cs @@ -1,7 +1,7 @@ using Content.Server.Tools.Components; using Content.Shared.Damage; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Tool; using Robust.Shared.GameObjects; using Robust.Shared.IoC; diff --git a/Content.Server/Rotation/Components/FlippableComponent.cs b/Content.Server/Rotation/Components/FlippableComponent.cs index 201900244d..1c4fa5f308 100644 --- a/Content.Server/Rotation/Components/FlippableComponent.cs +++ b/Content.Server/Rotation/Components/FlippableComponent.cs @@ -1,6 +1,5 @@ using Content.Shared.ActionBlocker; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Rotation/Components/RotatableComponent.cs b/Content.Server/Rotation/Components/RotatableComponent.cs index cd490bd2fc..5b795741b5 100644 --- a/Content.Server/Rotation/Components/RotatableComponent.cs +++ b/Content.Server/Rotation/Components/RotatableComponent.cs @@ -1,6 +1,5 @@ using Content.Shared.ActionBlocker; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Rotatable; using Content.Shared.Verbs; using Robust.Shared.GameObjects; diff --git a/Content.Server/Shuttles/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/ShuttleConsoleSystem.cs index af7c725d72..a288c614a8 100644 --- a/Content.Server/Shuttles/ShuttleConsoleSystem.cs +++ b/Content.Server/Shuttles/ShuttleConsoleSystem.cs @@ -4,7 +4,7 @@ using Content.Server.Power.Components; using Content.Shared.ActionBlocker; using Content.Shared.Alert; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Shuttles; using Content.Shared.Tag; using Robust.Shared.GameObjects; diff --git a/Content.Server/Singularity/Components/RadiationCollectorComponent.cs b/Content.Server/Singularity/Components/RadiationCollectorComponent.cs index ccb0fd897b..157ee949ec 100644 --- a/Content.Server/Singularity/Components/RadiationCollectorComponent.cs +++ b/Content.Server/Singularity/Components/RadiationCollectorComponent.cs @@ -1,7 +1,7 @@ using System; using Content.Server.Power.Components; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Radiation; using Content.Shared.Singularity.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs index cb543e10d4..5bca57f942 100644 --- a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs +++ b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs @@ -6,7 +6,7 @@ using Content.Server.Projectiles.Components; using Content.Server.Singularity.Components; using Content.Shared.Audio; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Singularity.Components; using JetBrains.Annotations; using Robust.Shared.Audio; diff --git a/Content.Server/Stack/StackSystem.cs b/Content.Server/Stack/StackSystem.cs index d1a979231c..b5b655b834 100644 --- a/Content.Server/Stack/StackSystem.cs +++ b/Content.Server/Stack/StackSystem.cs @@ -1,7 +1,6 @@ using System; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Stacks; using JetBrains.Annotations; using Robust.Shared.GameObjects; diff --git a/Content.Server/Storage/Components/EntityStorageComponent.cs b/Content.Server/Storage/Components/EntityStorageComponent.cs index a94d1e8434..fbdbe5374b 100644 --- a/Content.Server/Storage/Components/EntityStorageComponent.cs +++ b/Content.Server/Storage/Components/EntityStorageComponent.cs @@ -8,9 +8,9 @@ using Content.Shared.Acts; using Content.Shared.Body.Components; using Content.Shared.Interaction; using Content.Shared.Item; -using Content.Shared.Notification.Managers; using Content.Shared.Physics; using Content.Shared.Placeable; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Storage; using Content.Shared.Tool; diff --git a/Content.Server/Storage/Components/SecretStashComponent.cs b/Content.Server/Storage/Components/SecretStashComponent.cs index 30af3865fc..b1ef79b4f6 100644 --- a/Content.Server/Storage/Components/SecretStashComponent.cs +++ b/Content.Server/Storage/Components/SecretStashComponent.cs @@ -2,8 +2,7 @@ using Content.Server.Hands.Components; using Content.Server.Items; using Content.Shared.Acts; using Content.Shared.Item; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/Storage/Components/ServerStorageComponent.cs b/Content.Server/Storage/Components/ServerStorageComponent.cs index a92f85ed93..664028a1c8 100644 --- a/Content.Server/Storage/Components/ServerStorageComponent.cs +++ b/Content.Server/Storage/Components/ServerStorageComponent.cs @@ -11,8 +11,8 @@ using Content.Shared.Acts; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; using Content.Shared.Item; -using Content.Shared.Notification.Managers; using Content.Shared.Placeable; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Storage; using Content.Shared.Verbs; diff --git a/Content.Server/Strip/StrippableComponent.cs b/Content.Server/Strip/StrippableComponent.cs index cd52255b4b..be000b25e0 100644 --- a/Content.Server/Strip/StrippableComponent.cs +++ b/Content.Server/Strip/StrippableComponent.cs @@ -8,8 +8,7 @@ using Content.Server.Items; using Content.Server.UserInterface; using Content.Shared.ActionBlocker; using Content.Shared.DragDrop; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Strip.Components; using Content.Shared.Verbs; using Robust.Server.GameObjects; diff --git a/Content.Server/Stunnable/Components/StunnableComponent.cs b/Content.Server/Stunnable/Components/StunnableComponent.cs index da72ca145b..574848ecce 100644 --- a/Content.Server/Stunnable/Components/StunnableComponent.cs +++ b/Content.Server/Stunnable/Components/StunnableComponent.cs @@ -1,8 +1,8 @@ using Content.Server.Act; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Audio; using Content.Shared.MobState; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Standing; using Content.Shared.Stunnable; diff --git a/Content.Server/Stunnable/StunbatonSystem.cs b/Content.Server/Stunnable/StunbatonSystem.cs index 3efb8cdbb9..57073cd59b 100644 --- a/Content.Server/Stunnable/StunbatonSystem.cs +++ b/Content.Server/Stunnable/StunbatonSystem.cs @@ -7,8 +7,7 @@ using Content.Shared.ActionBlocker; using Content.Shared.Audio; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Throwing; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/Toilet/ToiletComponent.cs b/Content.Server/Toilet/ToiletComponent.cs index f010ced8e9..063ee4ca0d 100644 --- a/Content.Server/Toilet/ToiletComponent.cs +++ b/Content.Server/Toilet/ToiletComponent.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using Content.Server.Act; using Content.Server.Buckle.Components; using Content.Server.Chat.Managers; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Server.Storage.Components; using Content.Server.Tools.Components; using Content.Shared.Audio; @@ -10,8 +10,7 @@ using Content.Shared.Body.Components; using Content.Shared.Body.Part; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Toilet; using Content.Shared.Tool; diff --git a/Content.Server/Tools/Components/WelderComponent.cs b/Content.Server/Tools/Components/WelderComponent.cs index 367c0eaf4a..c5ffdb0999 100644 --- a/Content.Server/Tools/Components/WelderComponent.cs +++ b/Content.Server/Tools/Components/WelderComponent.cs @@ -6,16 +6,15 @@ using Content.Server.Chat.Managers; using Content.Server.Chemistry.Components; using Content.Server.Explosion; using Content.Server.Items; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Audio; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; -using Content.Shared.Temperature; using Content.Shared.Tool; using Robust.Server.GameObjects; using Robust.Shared.Audio; diff --git a/Content.Server/TraitorDeathMatch/Components/TraitorDeathMatchRedemptionComponent.cs b/Content.Server/TraitorDeathMatch/Components/TraitorDeathMatchRedemptionComponent.cs index d6e95e117d..07d8c0d8d7 100644 --- a/Content.Server/TraitorDeathMatch/Components/TraitorDeathMatchRedemptionComponent.cs +++ b/Content.Server/TraitorDeathMatch/Components/TraitorDeathMatchRedemptionComponent.cs @@ -4,8 +4,7 @@ using Content.Server.Mind.Components; using Content.Server.PDA; using Content.Shared.Interaction; using Content.Shared.Inventory; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Robust.Shared.GameObjects; using Robust.Shared.Localization; diff --git a/Content.Server/VendingMachines/VendingMachineComponent.cs b/Content.Server/VendingMachines/VendingMachineComponent.cs index c0bfb232cf..f3a2ddf1b3 100644 --- a/Content.Server/VendingMachines/VendingMachineComponent.cs +++ b/Content.Server/VendingMachines/VendingMachineComponent.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using Content.Server.Access.Components; using Content.Server.Advertise; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Server.Power.Components; using Content.Server.UserInterface; using Content.Server.WireHacking; diff --git a/Content.Server/Weapon/Ranged/Ammunition/Components/AmmoBoxComponent.cs b/Content.Server/Weapon/Ranged/Ammunition/Components/AmmoBoxComponent.cs index 768a763e15..e3cb536765 100644 --- a/Content.Server/Weapon/Ranged/Ammunition/Components/AmmoBoxComponent.cs +++ b/Content.Server/Weapon/Ranged/Ammunition/Components/AmmoBoxComponent.cs @@ -7,8 +7,7 @@ using Content.Server.Weapon.Ranged.Barrels.Components; using Content.Shared.ActionBlocker; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Verbs; using Content.Shared.Weapons.Ranged.Barrels.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/Weapon/Ranged/Ammunition/Components/RangedMagazineComponent.cs b/Content.Server/Weapon/Ranged/Ammunition/Components/RangedMagazineComponent.cs index 33187160b6..781eb1b140 100644 --- a/Content.Server/Weapon/Ranged/Ammunition/Components/RangedMagazineComponent.cs +++ b/Content.Server/Weapon/Ranged/Ammunition/Components/RangedMagazineComponent.cs @@ -6,8 +6,7 @@ using Content.Server.Items; using Content.Server.Weapon.Ranged.Barrels.Components; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Weapons.Ranged.Barrels.Components; using Robust.Server.GameObjects; using Robust.Shared.Containers; diff --git a/Content.Server/Weapon/Ranged/Ammunition/Components/SpeedLoaderComponent.cs b/Content.Server/Weapon/Ranged/Ammunition/Components/SpeedLoaderComponent.cs index a8c8f1503f..c0c761532d 100644 --- a/Content.Server/Weapon/Ranged/Ammunition/Components/SpeedLoaderComponent.cs +++ b/Content.Server/Weapon/Ranged/Ammunition/Components/SpeedLoaderComponent.cs @@ -4,8 +4,7 @@ using Content.Server.Hands.Components; using Content.Server.Items; using Content.Server.Weapon.Ranged.Barrels.Components; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Weapons.Ranged.Barrels.Components; using Robust.Server.GameObjects; using Robust.Shared.Containers; diff --git a/Content.Server/Weapon/Ranged/Barrels/Components/BoltActionBarrelComponent.cs b/Content.Server/Weapon/Ranged/Barrels/Components/BoltActionBarrelComponent.cs index 1f6a0ca9bd..ccf9147918 100644 --- a/Content.Server/Weapon/Ranged/Barrels/Components/BoltActionBarrelComponent.cs +++ b/Content.Server/Weapon/Ranged/Barrels/Components/BoltActionBarrelComponent.cs @@ -4,8 +4,7 @@ using Content.Server.Weapon.Ranged.Ammunition.Components; using Content.Shared.ActionBlocker; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Verbs; using Content.Shared.Weapons.Ranged.Barrels.Components; diff --git a/Content.Server/Weapon/Ranged/Barrels/Components/PumpBarrelComponent.cs b/Content.Server/Weapon/Ranged/Barrels/Components/PumpBarrelComponent.cs index 2da511c079..f60a93a650 100644 --- a/Content.Server/Weapon/Ranged/Barrels/Components/PumpBarrelComponent.cs +++ b/Content.Server/Weapon/Ranged/Barrels/Components/PumpBarrelComponent.cs @@ -2,8 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Content.Server.Weapon.Ranged.Ammunition.Components; using Content.Shared.Interaction; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Weapons.Ranged.Barrels.Components; using Robust.Server.GameObjects; diff --git a/Content.Server/Weapon/Ranged/Barrels/Components/RevolverBarrelComponent.cs b/Content.Server/Weapon/Ranged/Barrels/Components/RevolverBarrelComponent.cs index 0d3cfe0aa4..80497da912 100644 --- a/Content.Server/Weapon/Ranged/Barrels/Components/RevolverBarrelComponent.cs +++ b/Content.Server/Weapon/Ranged/Barrels/Components/RevolverBarrelComponent.cs @@ -3,8 +3,7 @@ using System.Threading.Tasks; using Content.Server.Weapon.Ranged.Ammunition.Components; using Content.Shared.ActionBlocker; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Verbs; using Content.Shared.Weapons.Ranged.Barrels.Components; diff --git a/Content.Server/Weapon/Ranged/Barrels/Components/ServerMagazineBarrelComponent.cs b/Content.Server/Weapon/Ranged/Barrels/Components/ServerMagazineBarrelComponent.cs index 3629789f7a..8bbab9eaca 100644 --- a/Content.Server/Weapon/Ranged/Barrels/Components/ServerMagazineBarrelComponent.cs +++ b/Content.Server/Weapon/Ranged/Barrels/Components/ServerMagazineBarrelComponent.cs @@ -7,8 +7,7 @@ using Content.Server.Weapon.Ranged.Ammunition.Components; using Content.Shared.ActionBlocker; using Content.Shared.Examine; using Content.Shared.Interaction; -using Content.Shared.Interaction.Events; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Verbs; using Content.Shared.Weapons.Ranged; diff --git a/Content.Server/Weapon/Ranged/ServerRangedWeaponComponent.cs b/Content.Server/Weapon/Ranged/ServerRangedWeaponComponent.cs index b149de094e..44bdfc85f9 100644 --- a/Content.Server/Weapon/Ranged/ServerRangedWeaponComponent.cs +++ b/Content.Server/Weapon/Ranged/ServerRangedWeaponComponent.cs @@ -8,7 +8,7 @@ using Content.Server.Weapon.Ranged.Barrels.Components; using Content.Shared.ActionBlocker; using Content.Shared.Damage; using Content.Shared.Hands; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Weapons.Ranged.Components; using Robust.Shared.Audio; diff --git a/Content.Server/Wieldable/WieldableSystem.cs b/Content.Server/Wieldable/WieldableSystem.cs index babae5b5ed..2500ae8a3c 100644 --- a/Content.Server/Wieldable/WieldableSystem.cs +++ b/Content.Server/Wieldable/WieldableSystem.cs @@ -5,10 +5,8 @@ using Content.Server.Items; using Content.Server.Weapon.Melee; using Content.Server.Wieldable.Components; using Content.Shared.Hands; -using Content.Shared.Hands.Components; using Content.Shared.Interaction; -using Content.Shared.Notification.Managers; -using Content.Shared.Throwing; +using Content.Shared.Popups; using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.IoC; diff --git a/Content.Server/Window/WindowComponent.cs b/Content.Server/Window/WindowComponent.cs index 188e2bd782..a70bf7b6aa 100644 --- a/Content.Server/Window/WindowComponent.cs +++ b/Content.Server/Window/WindowComponent.cs @@ -1,7 +1,7 @@ using System; using Content.Server.Destructible; using Content.Server.Destructible.Thresholds.Triggers; -using Content.Server.Notification; +using Content.Server.Popups; using Content.Shared.Audio; using Content.Shared.Damage; using Content.Shared.Examine; diff --git a/Content.Server/WireHacking/WiresComponent.cs b/Content.Server/WireHacking/WiresComponent.cs index ffa9def798..8b65de151f 100644 --- a/Content.Server/WireHacking/WiresComponent.cs +++ b/Content.Server/WireHacking/WiresComponent.cs @@ -9,7 +9,7 @@ using Content.Server.VendingMachines; using Content.Shared.Examine; using Content.Shared.Interaction; using Content.Shared.Interaction.Helpers; -using Content.Shared.Notification.Managers; +using Content.Shared.Popups; using Content.Shared.Sound; using Content.Shared.Tool; using Content.Shared.Wires; diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index 6e0e1f1185..b278081d92 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -1,15 +1,13 @@ using System; using System.Linq; -using Content.Shared.Notification; -using Content.Shared.Notification.Managers; using Content.Shared.Physics; +using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Map; using Robust.Shared.Physics; -using Robust.Shared.Physics.Broadphase; using Robust.Shared.Serialization; namespace Content.Shared.Interaction @@ -21,6 +19,7 @@ namespace Content.Shared.Interaction public abstract class SharedInteractionSystem : EntitySystem { [Dependency] private readonly SharedBroadphaseSystem _sharedBroadphaseSystem = default!; + [Dependency] private readonly SharedPopupSystem _popupSystem = default!; public const float InteractionRange = 2; public const float InteractionRangeSquared = InteractionRange * InteractionRange; diff --git a/Content.Shared/Notification/Managers/ISharedNotifyManager.cs b/Content.Shared/Notification/Managers/ISharedNotifyManager.cs deleted file mode 100644 index 542bde46ed..0000000000 --- a/Content.Shared/Notification/Managers/ISharedNotifyManager.cs +++ /dev/null @@ -1,86 +0,0 @@ -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Map; - -namespace Content.Shared.Notification.Managers -{ - /// - /// Allows the ability to create floating text messages at locations in the world. - /// - public interface ISharedNotifyManager - { - /// - /// Makes a string of text float up from an entity. - /// - /// The entity that the message is floating up from. - /// The client attached entity that the message is being sent to. - /// Text contents of the message. - void PopupMessage(IEntity source, IEntity viewer, string message); - - /// - /// Makes a string of text float up from a location on a grid. - /// - /// Location on a grid that the message floats up from. - /// The client attached entity that the message is being sent to. - /// Text contents of the message. - void PopupMessage(EntityCoordinates coordinates, IEntity viewer, string message); - - /// - /// Makes a string of text float up from a client's cursor. - /// - /// The client attached entity that the message is being sent to. - /// Text contents of the message. - void PopupMessageCursor(IEntity viewer, string message); - } - - public static class SharedNotifyExtensions - { - /// - /// Pops up a message at the location of for - /// alone to see. - /// - /// The entity above which the message will appear. - /// The entity that will see the message. - /// The message to show. - public static void PopupMessage(this IEntity source, IEntity viewer, string message) - { - var notifyManager = IoCManager.Resolve(); - notifyManager.PopupMessage(source, viewer, message); - } - - /// - /// Pops up a message at the given entity's location for it alone to see. - /// - /// The entity that will see the message. - /// The message to be seen. - public static void PopupMessage(this IEntity viewer, string message) - { - viewer.PopupMessage(viewer, message); - } - - /// - /// Makes a string of text float up from a location on a grid. - /// - /// Location on a grid that the message floats up from. - /// The client attached entity that the message is being sent to. - /// Text contents of the message. - public static void PopupMessage(this EntityCoordinates coordinates, IEntity viewer, string message) - { - var notifyManager = IoCManager.Resolve(); - notifyManager.PopupMessage(coordinates, viewer, message); - } - - /// - /// Makes a string of text float up from a client's cursor. - /// - /// - /// The client attached entity that the message is being sent to. - /// - /// Text contents of the message. - public static void PopupMessageCursor(this IEntity viewer, string message) - { - var notifyManager = IoCManager.Resolve(); - notifyManager.PopupMessageCursor(viewer, message); - } - } -} diff --git a/Content.Shared/Notification/Managers/SharedNotifyManager.cs b/Content.Shared/Notification/Managers/SharedNotifyManager.cs deleted file mode 100644 index 7f43acde85..0000000000 --- a/Content.Shared/Notification/Managers/SharedNotifyManager.cs +++ /dev/null @@ -1,73 +0,0 @@ -using Lidgren.Network; -using Robust.Shared.GameObjects; -using Robust.Shared.Map; -using Robust.Shared.Network; - -namespace Content.Shared.Notification.Managers -{ - public abstract class SharedNotifyManager : ISharedNotifyManager - { - public abstract void PopupMessage(IEntity source, IEntity viewer, string message); - - public abstract void PopupMessage(EntityCoordinates coordinates, IEntity viewer, string message); - - public abstract void PopupMessageCursor(IEntity viewer, string message); - - protected class MsgDoNotifyCursor : NetMessage - { - public override MsgGroups MsgGroup => MsgGroups.Command; - - public string Message { get; set; } = string.Empty; - - public override void ReadFromBuffer(NetIncomingMessage buffer) - { - Message = buffer.ReadString(); - } - - public override void WriteToBuffer(NetOutgoingMessage buffer) - { - buffer.Write(Message); - } - } - - protected class MsgDoNotifyCoordinates : NetMessage - { - public override MsgGroups MsgGroup => MsgGroups.Command; - - public string Message { get; set; } = string.Empty; - public EntityCoordinates Coordinates; - - public override void ReadFromBuffer(NetIncomingMessage buffer) - { - Message = buffer.ReadString(); - Coordinates = buffer.ReadEntityCoordinates(); - } - - public override void WriteToBuffer(NetOutgoingMessage buffer) - { - buffer.Write(Message); - buffer.Write(Coordinates); - } - } - - protected class MsgDoNotifyEntity : NetMessage - { - public override MsgGroups MsgGroup => MsgGroups.Command; - - public string Message { get; set; } = string.Empty; - public EntityUid Entity; - - public override void ReadFromBuffer(NetIncomingMessage buffer) - { - Message = buffer.ReadString(); - Entity = buffer.ReadEntityUid(); - } - - public override void WriteToBuffer(NetOutgoingMessage buffer) - { - buffer.Write(Message); - buffer.Write(Entity); - } - } - } -} diff --git a/Content.Shared/Popups/SharedPopupExtensions.cs b/Content.Shared/Popups/SharedPopupExtensions.cs new file mode 100644 index 0000000000..ca88410654 --- /dev/null +++ b/Content.Shared/Popups/SharedPopupExtensions.cs @@ -0,0 +1,57 @@ +using Robust.Shared.GameObjects; +using Robust.Shared.Map; + +namespace Content.Shared.Popups +{ + public static class SharedPopupExtensions + { + /// + /// Pops up a message at the location of for + /// alone to see. + /// + /// The entity above which the message will appear. + /// The entity that will see the message. + /// The message to show. + public static void PopupMessage(this IEntity source, IEntity viewer, string message) + { + var popupSystem = EntitySystem.Get(); + + popupSystem.PopupEntity(message, source.Uid, popupSystem.GetFilterFromEntity(viewer)); + } + + /// + /// Pops up a message at the given entity's location for it alone to see. + /// + /// The entity that will see the message. + /// The message to be seen. + public static void PopupMessage(this IEntity viewer, string message) + { + viewer.PopupMessage(viewer, message); + } + + /// + /// Makes a string of text float up from a location on a grid. + /// + /// Location on a grid that the message floats up from. + /// The client attached entity that the message is being sent to. + /// Text contents of the message. + public static void PopupMessage(this EntityCoordinates coordinates, IEntity viewer, string message) + { + var popupSystem = EntitySystem.Get(); + popupSystem.PopupCoordinates(message, coordinates, popupSystem.GetFilterFromEntity(viewer)); + } + + /// + /// Makes a string of text float up from a client's cursor. + /// + /// + /// The client attached entity that the message is being sent to. + /// + /// Text contents of the message. + public static void PopupMessageCursor(this IEntity viewer, string message) + { + var popupSystem = EntitySystem.Get(); + popupSystem.PopupCursor(message, popupSystem.GetFilterFromEntity(viewer)); + } + } +} diff --git a/Content.Shared/Popups/SharedPopupSystem.cs b/Content.Shared/Popups/SharedPopupSystem.cs new file mode 100644 index 0000000000..0849d75fbe --- /dev/null +++ b/Content.Shared/Popups/SharedPopupSystem.cs @@ -0,0 +1,97 @@ +using System; +using Robust.Shared.GameObjects; +using Robust.Shared.Map; +using Robust.Shared.Player; +using Robust.Shared.Serialization; + +namespace Content.Shared.Popups +{ + /// + /// System for displaying small text popups on users' screens. + /// + public abstract class SharedPopupSystem : EntitySystem + { + /// + /// Shows a popup on the users' cursors. + /// + /// The message to display. + /// Filter for the players that will see the popup. + public abstract void PopupCursor(string message, Filter filter); + + /// + /// Shows a popup at a world location. + /// + /// The message to display. + /// The coordinates where to display the message. + /// Filter for the players that will see the popup. + public abstract void PopupCoordinates(string message, EntityCoordinates coordinates, Filter filter); + + /// + /// Shows a popup above an entity. + /// + /// The message to display. + /// The UID of the entity. + /// Filter for the players that will see the popup. + public abstract void PopupEntity(string message, EntityUid uid, Filter filter); + + /// + /// Given an , returns a that is either empty or contains the + /// player attached to the entity. + /// + /// Using this method is NOT recommended, please use one of the other methods instead. + public abstract Filter GetFilterFromEntity(IEntity entity); + } + + /// + /// Common base for all popup network events. + /// + [Serializable, NetSerializable] + public abstract class PopupEvent : EntityEventArgs + { + public string Message { get; } + + protected PopupEvent(string message) + { + Message = message; + } + } + + /// + /// Network event for displaying a popup on the user's cursor. + /// + [Serializable, NetSerializable] + public class PopupCursorEvent : PopupEvent + { + public PopupCursorEvent(string message) : base(message) + { + } + } + + /// + /// Network event for displaying a popup at a world location. + /// + [Serializable, NetSerializable] + public class PopupCoordinatesEvent : PopupEvent + { + public EntityCoordinates Coordinates { get; } + + public PopupCoordinatesEvent(string message, EntityCoordinates coordinates) : base(message) + { + Coordinates = coordinates; + } + } + + /// + /// Network event for displaying a popup above an entity. + /// + [Serializable, NetSerializable] + public class PopupEntityEvent : PopupEvent + { + public EntityUid Uid { get; } + + public PopupEntityEvent(string message, EntityUid uid) : base(message) + { + Uid = uid; + } + } +}