From 2fdd3923f5a490a816a92f1d89cbb81bacb76798 Mon Sep 17 00:00:00 2001 From: Deserty0 Date: Sun, 5 Oct 2025 17:33:13 +1000 Subject: [PATCH] swaggy swaggy swags --- Content.Client/_CP14/Fishing/UI/CP14FishingWindow.xaml.cs | 4 ++++ Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs | 6 +++--- .../CP14FishingComponents.cs} | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) rename Content.Shared/_CP14/Fishing/{CP14FishingSerializable.cs => Components/CP14FishingComponents.cs} (88%) diff --git a/Content.Client/_CP14/Fishing/UI/CP14FishingWindow.xaml.cs b/Content.Client/_CP14/Fishing/UI/CP14FishingWindow.xaml.cs index d304bd418c..f560ad0f55 100644 --- a/Content.Client/_CP14/Fishing/UI/CP14FishingWindow.xaml.cs +++ b/Content.Client/_CP14/Fishing/UI/CP14FishingWindow.xaml.cs @@ -22,6 +22,8 @@ public sealed partial class CP14FishingWindow : BaseWindow public void InitVisuals(CP14FishingRodComponent component) { + FishingWindow.Visible = false; + // Getting data if (!_prototypeManager.Resolve(component.FishingMinigame, out var minigameStyle)) return; @@ -65,6 +67,8 @@ public sealed partial class CP14FishingWindow : BaseWindow { Texture = fishTexture, }; + + FishingWindow.Visible = true; } } diff --git a/Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs b/Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs index 7403780348..b8a78b5369 100644 --- a/Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs +++ b/Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs @@ -28,8 +28,8 @@ public abstract class CP14SharedFishingSystem : EntitySystem [Dependency] private readonly SharedHandsSystem _hands = default!; [Dependency] private readonly ThrowingSystem _throwing = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; - [Dependency] private readonly UserInterfaceSystem _userInterface = default!; [Dependency] private readonly SharedInteractionSystem _interaction = default!; + [Dependency] private readonly SharedUserInterfaceSystem _userInterface = default!; [Dependency] private readonly ISharedPlayerManager _playerManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IRobustRandom _random = default!; @@ -68,7 +68,7 @@ public abstract class CP14SharedFishingSystem : EntitySystem private void UpdatePositions(EntityUid fishingRod, CP14FishingRodComponent fishingRodComponent, TimeSpan curTime) { - if (_netManager.IsClient && _gameTiming.IsFirstTimePredicted) + if (_netManager.IsClient && !_gameTiming.IsFirstTimePredicted) return; if (fishingRodComponent.CaughtFish is null) @@ -164,7 +164,7 @@ public abstract class CP14SharedFishingSystem : EntitySystem { fishingRodComponent.FishHooked = true; - _userInterface.OpenUi(fishingRod, CP14FishingUiKey.Key); + _userInterface.TryOpenUi(fishingRod, CP14FishingUiKey.Key, fishingRodComponent.User!.Value); DirtyField(fishingRod, fishingRodComponent, nameof(CP14FishingRodComponent.FishHooked)); return; diff --git a/Content.Shared/_CP14/Fishing/CP14FishingSerializable.cs b/Content.Shared/_CP14/Fishing/Components/CP14FishingComponents.cs similarity index 88% rename from Content.Shared/_CP14/Fishing/CP14FishingSerializable.cs rename to Content.Shared/_CP14/Fishing/Components/CP14FishingComponents.cs index 4c3a75e43e..fc9c5efe31 100644 --- a/Content.Shared/_CP14/Fishing/CP14FishingSerializable.cs +++ b/Content.Shared/_CP14/Fishing/Components/CP14FishingComponents.cs @@ -1,6 +1,6 @@ using Robust.Shared.Serialization; -namespace Content.Shared._CP14.Fishing +namespace Content.Shared._CP14.Fishing.Components { [Serializable, NetSerializable] public enum CP14FishingUiKey : byte