swaggy swaggy swags

This commit is contained in:
Deserty0
2025-10-05 17:33:13 +10:00
parent 88575e2286
commit 2fdd3923f5
3 changed files with 8 additions and 4 deletions

View File

@@ -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;
}
}

View File

@@ -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;

View File

@@ -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