diff --git a/Content.Client/Atmos/EntitySystems/GasTileOverlaySystem.cs b/Content.Client/Atmos/EntitySystems/GasTileOverlaySystem.cs index 7f477619a4..4f3e2b2cb5 100644 --- a/Content.Client/Atmos/EntitySystems/GasTileOverlaySystem.cs +++ b/Content.Client/Atmos/EntitySystems/GasTileOverlaySystem.cs @@ -176,8 +176,12 @@ namespace Content.Client.Atmos.EntitySystems var frameCount = FrameCounter[i]; Timer[i] += frameTime; - if (!(Timer[i] >= delays[frameCount])) continue; - Timer[i] = 0f; + var time = delays[frameCount]; + + if (Timer[i] < time) + continue; + + Timer[i] -= time; FrameCounter[i] = (frameCount + 1) % Frames[i].Length; } @@ -188,8 +192,10 @@ namespace Content.Client.Atmos.EntitySystems var frameCount = FireFrameCounter[i]; FireTimer[i] += frameTime; - if (!(FireTimer[i] >= delays[frameCount])) continue; - FireTimer[i] = 0f; + var time = delays[frameCount]; + + if (FireTimer[i] < time) continue; + FireTimer[i] -= time; FireFrameCounter[i] = (frameCount + 1) % FireFrames[i].Length; } } diff --git a/Content.Client/Atmos/Visualizers/PressurePumpVisualizer.cs b/Content.Client/Atmos/Visualizers/PressurePumpVisualizer.cs index 7eff2bdc6e..bf6d4a34ca 100644 --- a/Content.Client/Atmos/Visualizers/PressurePumpVisualizer.cs +++ b/Content.Client/Atmos/Visualizers/PressurePumpVisualizer.cs @@ -8,7 +8,7 @@ namespace Content.Client.Atmos.Visualizers public sealed class PressurePumpVisualizer : EnabledAtmosDeviceVisualizer { protected override object LayerMap => Layers.Enabled; - protected override Enum DataKey => PressurePumpVisuals.Enabled; + protected override Enum DataKey => PumpVisuals.Enabled; enum Layers : byte { diff --git a/Content.Client/Commands/DebugCommands.cs b/Content.Client/Commands/DebugCommands.cs index 32ff1cf0f7..c098cecc3b 100644 --- a/Content.Client/Commands/DebugCommands.cs +++ b/Content.Client/Commands/DebugCommands.cs @@ -72,30 +72,4 @@ namespace Content.Client.Commands EntitySystem.Get().PopupCursor(message); } } - - internal sealed class MappingCommand : IConsoleCommand - { - public string Command => "mapping"; - public string Description => "Creates and teleports you to a new uninitialized map for mapping."; - public string Help => $"Usage: {Command} / {Command} "; - - public void Execute(IConsoleShell shell, string argStr, string[] args) - { - if (args.Length == 0) - { - shell.WriteLine(Help); - return; - } - -#if DEBUG - shell.WriteError("WARNING: The client is using a debug build. You are risking losing your changes."); -#endif - - shell.ConsoleHost.RegisteredCommands["togglelight"].Execute(shell, string.Empty, Array.Empty()); - shell.ConsoleHost.RegisteredCommands["showsubfloorforever"].Execute(shell, string.Empty, Array.Empty()); - shell.ConsoleHost.RegisteredCommands["showmarkers"].Execute(shell, string.Empty, Array.Empty()); - - shell.RemoteExecuteCommand(argStr); - } - } } diff --git a/Content.Client/Content.Client.csproj b/Content.Client/Content.Client.csproj index 153483e0d7..04b1e3dd29 100644 --- a/Content.Client/Content.Client.csproj +++ b/Content.Client/Content.Client.csproj @@ -1,4 +1,4 @@ - + @@ -26,5 +26,4 @@ - diff --git a/Content.Client/DragDrop/DragDropSystem.cs b/Content.Client/DragDrop/DragDropSystem.cs index f362f2a778..7afe513b64 100644 --- a/Content.Client/DragDrop/DragDropSystem.cs +++ b/Content.Client/DragDrop/DragDropSystem.cs @@ -1,12 +1,9 @@ -using System; -using System.Collections.Generic; using Content.Client.Outline; using Content.Client.Viewport; using Content.Shared.ActionBlocker; using Content.Shared.DragDrop; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; -using Content.Shared.Interaction.Helpers; using Content.Shared.Popups; using JetBrains.Annotations; using Robust.Client.GameObjects; @@ -14,13 +11,8 @@ using Robust.Client.Graphics; using Robust.Client.Input; using Robust.Client.Player; using Robust.Client.State; -using Robust.Shared.GameObjects; using Robust.Shared.Input; using Robust.Shared.Input.Binding; -using Robust.Shared.IoC; -using Robust.Shared.Localization; -using Robust.Shared.Log; -using Robust.Shared.Maths; using Robust.Shared.Prototypes; using Robust.Shared.Utility; using DrawDepth = Content.Shared.DrawDepth.DrawDepth; @@ -237,13 +229,11 @@ namespace Content.Client.DragDrop if (_dragShadow == default) return false; - EntityManager.GetComponent(_dragShadow).WorldPosition = mousePos.Position; - _targetRecheckTime += frameTime; if (_targetRecheckTime > TargetRecheckInterval) { HighlightTargets(); - _targetRecheckTime = 0; + _targetRecheckTime -= TargetRecheckInterval; } return true; @@ -464,7 +454,20 @@ namespace Content.Client.DragDrop public override void Update(float frameTime) { base.Update(frameTime); + _dragDropHelper.Update(frameTime); } + + public override void FrameUpdate(float frameTime) + { + base.FrameUpdate(frameTime); + + // Update position every frame to make it smooth. + if (_dragDropHelper.IsDragging) + { + var mousePos = _eyeManager.ScreenToMap(_inputManager.MouseScreenPosition); + Transform(_dragShadow).WorldPosition = mousePos.Position; + } + } } } diff --git a/Content.Client/EscapeMenu/UI/OptionsMenu.xaml b/Content.Client/EscapeMenu/UI/OptionsMenu.xaml index 5a38e4b0a3..2057182430 100644 --- a/Content.Client/EscapeMenu/UI/OptionsMenu.xaml +++ b/Content.Client/EscapeMenu/UI/OptionsMenu.xaml @@ -1,4 +1,4 @@ - @@ -6,5 +6,6 @@ + diff --git a/Content.Client/EscapeMenu/UI/OptionsMenu.xaml.cs b/Content.Client/EscapeMenu/UI/OptionsMenu.xaml.cs index f5e5f997a5..9c9ae3270e 100644 --- a/Content.Client/EscapeMenu/UI/OptionsMenu.xaml.cs +++ b/Content.Client/EscapeMenu/UI/OptionsMenu.xaml.cs @@ -1,4 +1,4 @@ -using Robust.Client.AutoGenerated; +using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; using Robust.Shared.IoC; @@ -17,6 +17,7 @@ namespace Content.Client.EscapeMenu.UI Tabs.SetTabTitle(0, Loc.GetString("ui-options-tab-graphics")); Tabs.SetTabTitle(1, Loc.GetString("ui-options-tab-controls")); Tabs.SetTabTitle(2, Loc.GetString("ui-options-tab-audio")); + Tabs.SetTabTitle(3, Loc.GetString("ui-options-tab-network")); } } } diff --git a/Content.Client/EscapeMenu/UI/Tabs/NetworkTab.xaml b/Content.Client/EscapeMenu/UI/Tabs/NetworkTab.xaml new file mode 100644 index 0000000000..7d2741ab14 --- /dev/null +++ b/Content.Client/EscapeMenu/UI/Tabs/NetworkTab.xaml @@ -0,0 +1,39 @@ + + + + + + + + +