From 90797f88b6b9fcae2d6800f69bc060cfb028ed77 Mon Sep 17 00:00:00 2001 From: Deserty0 Date: Fri, 19 Sep 2025 22:22:56 +1000 Subject: [PATCH] help me --- .../_CP14/Fishing/CP14FishingSystem.cs | 78 ++++++- .../_CP14/Fishing/CP14FishingSystem.cs | 37 ++- .../Fishing/Behaviors/CP14FishBaseBehavior.cs | 20 +- .../Behaviors/CP14FishLerpBehaviour.cs | 15 ++ .../Fishing/CP14FishingMinigamePrototype.cs | 3 + .../_CP14/Fishing/CP14SharedFishingSystem.cs | 220 +++++++++++++++++- .../Fishing/Components/CP14FishComponent.cs | 15 +- .../Components/CP14FishingRodComponent.cs | 30 ++- .../Locale/en-US/_CP14/fishing/fishing.ftl | 1 + .../Locale/ru-RU/_CP14/fishing/fishing.ftl | 1 + .../_CP14/Entities/Mobs/NPC/Flem.yml | 4 +- .../Entities/Structures/Floor/floorWater.yml | 1 + .../Prototypes/_CP14/Fishing/loottables.yml | 5 + .../default.yml => Fishing/styles.yml} | 1 + 14 files changed, 390 insertions(+), 41 deletions(-) create mode 100644 Content.Shared/_CP14/Fishing/Behaviors/CP14FishLerpBehaviour.cs create mode 100644 Resources/Locale/en-US/_CP14/fishing/fishing.ftl create mode 100644 Resources/Locale/ru-RU/_CP14/fishing/fishing.ftl create mode 100644 Resources/Prototypes/_CP14/Fishing/loottables.yml rename Resources/Prototypes/_CP14/{FishingStyles/default.yml => Fishing/styles.yml} (95%) diff --git a/Content.Client/_CP14/Fishing/CP14FishingSystem.cs b/Content.Client/_CP14/Fishing/CP14FishingSystem.cs index c903c58718..c951407e3b 100644 --- a/Content.Client/_CP14/Fishing/CP14FishingSystem.cs +++ b/Content.Client/_CP14/Fishing/CP14FishingSystem.cs @@ -1,11 +1,11 @@ using System.Numerics; using Content.Client.Hands.Systems; -using Content.Client.Interactable; using Content.Client.Resources; using Content.Client.UserInterface.Screens; using Content.Shared._CP14.Fishing; using Content.Shared._CP14.Fishing.Components; using Content.Shared._CP14.Input; +using Content.Shared.CombatMode; using Content.Shared.Interaction; using Robust.Client.GameObjects; using Robust.Client.Graphics; @@ -23,14 +23,20 @@ public sealed class CP14FishingSystem : CP14SharedFishingSystem { [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; [Dependency] private readonly IResourceCache _resourceCache = default!; - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly InputSystem _input = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly HandsSystem _handsSystem = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; private Popup? _fishingPopup; + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnFishingStatusChanged); + } public override void Update(float dt) { base.Update(dt); @@ -43,17 +49,73 @@ public sealed class CP14FishingSystem : CP14SharedFishingSystem if (!TryComp(heldUid, out var fishingRodComponent)) return; - if (!fishingRodComponent.FishCaught) - return; - if (_playerManager.LocalSession?.AttachedEntity is not { } player) return; - var reeling = _input.CmdStates.GetState(CP14ContentKeyFunctions.CP14FishingAction) == BoundKeyState.Down; - RaiseNetworkEvent(new FishingReelKeyMessage(player, reeling)); + UpdatePressedButtons(fishingRodComponent, player); + UpdateUserInterface(fishingRodComponent); } - private void OpenFishingPopup(EntityUid uid, CP14FishingRodComponent component, AfterInteractEvent args) + private void UpdatePressedButtons(CP14FishingRodComponent fishingRodComponent, EntityUid player) + { + if (fishingRodComponent.CaughtFish is null) + return; + + var reelKey = _input.CmdStates.GetState(CP14ContentKeyFunctions.CP14FishingAction) == BoundKeyState.Down; + + if (!TryComp(player, out var combatMode) || + !combatMode.IsInCombatMode) + reelKey = false; + + if (fishingRodComponent.Reeling == reelKey) + return; + + RaiseNetworkEvent(new FishingReelKeyMessage(reelKey)); + } + + private void UpdateUserInterface(CP14FishingRodComponent fishingRodComponent) + { + var fish = fishingRodComponent.CaughtFish; + + if (fish is null) + return; + + TryComp(fish, out CP14FishComponent? fishComponent); + + if (fishComponent is null) + return; + + if (!_prototypeManager.Resolve(fishingRodComponent.FishingMinigame, out var minigameStyle)) + return; + + var floatUI = minigameStyle.Float; + var progressbar = minigameStyle.Progressbar; + var fishIcon = minigameStyle.FishIcon; + + var firstLayer = _fishingPopup!.GetChild(0); + var secondLayer = _fishingPopup!.GetChild(1); + + var progressbarContainer = firstLayer.GetChild(0); + var floatContainer = firstLayer.GetChild(1); + var fishContainer = secondLayer.GetChild(0); + + floatContainer.Margin = new Thickness(floatUI.Offset.X, 0, floatUI.Offset.Y + fishingRodComponent.FloatPosition, 0); + fishContainer.Margin = new Thickness(fishIcon.Offset.X, 0, fishIcon.Offset.Y + fishComponent.FishPosAndDestination.X, 0); + } + + private void OnFishingStatusChanged(FishingUIStatus status) + { + if (status.UIStatus) + { + OpenFishingPopup(status.Component); + } + else + { + CloseFishingPopup(); + } + } + + private void OpenFishingPopup(CP14FishingRodComponent component) { // Getting data if (!_prototypeManager.Resolve(component.FishingMinigame, out var minigameStyle)) diff --git a/Content.Server/_CP14/Fishing/CP14FishingSystem.cs b/Content.Server/_CP14/Fishing/CP14FishingSystem.cs index b2d89a3d44..65fb3fa72d 100644 --- a/Content.Server/_CP14/Fishing/CP14FishingSystem.cs +++ b/Content.Server/_CP14/Fishing/CP14FishingSystem.cs @@ -1,8 +1,11 @@ using Content.Server.Hands.Systems; using Content.Shared._CP14.Fishing; using Content.Shared._CP14.Fishing.Components; +using Content.Shared.CombatMode; using Content.Shared.Interaction; using Content.Shared.Throwing; +using Robust.Shared.Random; +using Robust.Shared.Timing; namespace Content.Server._CP14.Fishing; @@ -12,6 +15,8 @@ public sealed class CP14FishingSystem : CP14SharedFishingSystem [Dependency] private readonly ThrowingSystem _throwingSystem = default!; [Dependency] private readonly SharedTransformSystem _transformSystem = default!; [Dependency] private readonly HandsSystem _handsSystem = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; + [Dependency] private readonly IRobustRandom _random = default!; public override void Initialize() { @@ -35,19 +40,29 @@ public sealed class CP14FishingSystem : CP14SharedFishingSystem continue; PredictedDel(component.FishingFloat); + component.FishingFloat = null; component.Target = null; + DirtyFields(uid, component, null, nameof(CP14FishingRodComponent.FishingFloat), nameof(CP14FishingRodComponent.Target)); } } - private void OnReelingMessage(FishingReelKeyMessage msg) + private void OnReelingMessage(FishingReelKeyMessage msg, EntitySessionEventArgs args) { - var held = _handsSystem.GetActiveItem(msg.User); - - if (!TryComp(held, out var rodComponent)) + if (args.SenderSession.AttachedEntity is not { } player) return; - rodComponent.Reeling = msg.Reeling; + if (!_handsSystem.TryGetActiveItem(player, out var activeItem) || + !TryComp(activeItem, out var fishingRodComponent)) + return; + + if (msg.Reeling && + (!TryComp(player, out var combatMode) || + !combatMode.IsInCombatMode)) + return; + + fishingRodComponent.Reeling = msg.Reeling; + DirtyField(activeItem.Value, fishingRodComponent, nameof(fishingRodComponent.Reeling)); } private void OnInteract(EntityUid uid, CP14FishingRodComponent component, AfterInteractEvent args) @@ -68,7 +83,10 @@ public sealed class CP14FishingSystem : CP14SharedFishingSystem return; args.Handled = true; - CastFloat(uid, component, args.Target.Value); + + component.FishingTime = _gameTiming.CurTime; + component.FishingTime += TimeSpan.FromSeconds(_random.NextDouble(component.MinAwaitTime, component.MaxAwaitTime)); + CastFloat(args.Used, component, args.Target.Value); } private void CastFloat(EntityUid uid, CP14FishingRodComponent component, EntityUid target) @@ -80,6 +98,13 @@ public sealed class CP14FishingSystem : CP14SharedFishingSystem component.FishingFloat = fishingFloat; component.Target = target; + component.User = uid; + DirtyFields(uid, + component, + null, + nameof(CP14FishingRodComponent.FishingFloat), + nameof(CP14FishingRodComponent.Target), + nameof(CP14FishingRodComponent.User)); _throwingSystem.TryThrow(fishingFloat, targetCoords, component.ThrowPower, recoil: false, doSpin: false); } diff --git a/Content.Shared/_CP14/Fishing/Behaviors/CP14FishBaseBehavior.cs b/Content.Shared/_CP14/Fishing/Behaviors/CP14FishBaseBehavior.cs index d1c8deaa14..4c418c861d 100644 --- a/Content.Shared/_CP14/Fishing/Behaviors/CP14FishBaseBehavior.cs +++ b/Content.Shared/_CP14/Fishing/Behaviors/CP14FishBaseBehavior.cs @@ -1,21 +1,29 @@ +using System.Numerics; +using JetBrains.Annotations; using Robust.Shared.Random; namespace Content.Shared._CP14.Fishing.Behaviors; -[ImplicitDataDefinitionForInheritors] +[ImplicitDataDefinitionForInheritors, UsedImplicitly(ImplicitUseTargetFlags.WithInheritors)] public abstract partial class CP14FishBaseBehavior { - public abstract float CalculatePosition(IRobustRandom random, float cordA); + /// + /// Calculates fish position + /// + /// Robust random + /// Current fish coordinates + /// Calculated fish coordinates + public abstract Vector2 TryCalculatePosition(IRobustRandom random, Vector2 fishCords); /// - /// Speed which fish uses when going from A to B +- 0.2*Speed + /// Speed which fish uses when going from A to B +- 0.2 * Speed /// [DataField] - public float Speed; + public float Speed = 0.25f; /// - /// How long fish will be in point B until selecting next point B +- 0.2*Difficulty + /// How long fish will be in point B until selecting next point B +- 0.2 * Difficulty /// [DataField] - public float Difficulty; + public TimeSpan Difficulty = TimeSpan.FromSeconds(0.2); } diff --git a/Content.Shared/_CP14/Fishing/Behaviors/CP14FishLerpBehaviour.cs b/Content.Shared/_CP14/Fishing/Behaviors/CP14FishLerpBehaviour.cs new file mode 100644 index 0000000000..5c0403ea5b --- /dev/null +++ b/Content.Shared/_CP14/Fishing/Behaviors/CP14FishLerpBehaviour.cs @@ -0,0 +1,15 @@ +using System.Numerics; +using Robust.Shared.Random; + +namespace Content.Shared._CP14.Fishing.Behaviors; + +public sealed partial class CP14FishLerpBehaviour : CP14FishBaseBehavior +{ + public override Vector2 TryCalculatePosition(IRobustRandom random, Vector2 fishCords) + { + var speed = Speed + Speed * 0.2f * random.NextFloat(-1, 1); + var nextPos = float.Lerp(fishCords.X, fishCords.Y, speed); + + return new Vector2(nextPos, fishCords.Y); + } +} diff --git a/Content.Shared/_CP14/Fishing/CP14FishingMinigamePrototype.cs b/Content.Shared/_CP14/Fishing/CP14FishingMinigamePrototype.cs index cce7c03520..4642d9f7df 100644 --- a/Content.Shared/_CP14/Fishing/CP14FishingMinigamePrototype.cs +++ b/Content.Shared/_CP14/Fishing/CP14FishingMinigamePrototype.cs @@ -25,6 +25,9 @@ public sealed partial class CP14FishingMinigamePrototype : IPrototype [DataField(required: true)] public FishingMinigameElementData Float; + [DataField(required: true)] + public float FishingMinigameSize; + [DataDefinition] public partial struct FishingMinigameElementData { diff --git a/Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs b/Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs index 0e6262df7a..5e5498b7d4 100644 --- a/Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs +++ b/Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs @@ -1,4 +1,11 @@ +using System.Linq; +using System.Numerics; using Content.Shared._CP14.Fishing.Components; +using Content.Shared.EntityTable; +using Content.Shared.Interaction.Events; +using Content.Shared.Item; +using Robust.Shared.Map; +using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Serialization; using Robust.Shared.Timing; @@ -9,6 +16,20 @@ public abstract class CP14SharedFishingSystem : EntitySystem { [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly EntityTableSystem _entityTable = default!; + [Dependency] private readonly MetaDataSystem _metaSystem = default!; + [Dependency] private readonly SharedMapSystem _map = default!; + + private MapId? _mapId; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnPickupEvent); + SubscribeLocalEvent(OnDropEvent); + } public override void Update(float frameTime) { @@ -16,35 +37,214 @@ public abstract class CP14SharedFishingSystem : EntitySystem var curTime = _gameTiming.CurTime; var query = EntityQueryEnumerator(); + _random.SetSeed((int)curTime.Ticks); while (query.MoveNext(out var uid, out var component)) { - if (curTime <= component.FishingTime) + if (component.User is null) continue; - if (component.FishingFloat is null) + if (component.CaughtFish is null) + { + TryToCatchFish(uid, component, curTime); continue; + } - component.FishingTime += curTime; - UpdateFishingFrequency(component); + if (!component.FishHooked) + { + UpdateFishWaitingStatus(uid, component, curTime); + continue; + } + + UpdatePositions(uid, component, curTime); } } - private void UpdateFishingFrequency(CP14FishingRodComponent component) + private void UpdatePositions(EntityUid fishingRod, CP14FishingRodComponent fishingRodComponent, TimeSpan curTime) { - _random.SetSeed((int)_gameTiming.CurTick.Value); - component.FishingTime += TimeSpan.FromSeconds(_random.NextDouble(component.MinAwaitTime, component.MaxAwaitTime)); + var fish = fishingRodComponent.CaughtFish; + + if (fish is null) + return; + + TryComp(fish, out CP14FishComponent? fishComponent); + + if (fishComponent is null) + return; + + _prototypeManager.Resolve(fishingRodComponent.FishingMinigame, out var minigamePrototype); + + if (minigamePrototype is null) + return; + + var maxCord = minigamePrototype.FishingMinigameSize; + var floatSpeed = fishingRodComponent.FloatSpeed; + var floatPosition = fishingRodComponent.FloatPosition; + + if (fishingRodComponent.Reeling) + { + if (floatSpeed + floatPosition < maxCord) + { + fishingRodComponent.FloatPosition += fishingRodComponent.FloatSpeed; + } + else + { + fishingRodComponent.FloatPosition = maxCord; + } + } + else + { + if (floatPosition - floatSpeed > 0f) + { + fishingRodComponent.FloatPosition -= floatSpeed; + } + else + { + fishingRodComponent.FloatPosition = 0; + } + } + + var fishPos = fishComponent.FishPosAndDestination.X; + var fishDest = fishComponent.FishPosAndDestination.Y; + var fishDiff = fishComponent.FishBehavior.Difficulty; + + if (Math.Abs(fishPos - fishDest) < 0.1f) + { + UpdateFishDestination(fish.Value, fishComponent, curTime, maxCord); + } + else + { + fishComponent.FishPosAndDestination = fishComponent.FishBehavior.TryCalculatePosition(_random, fishComponent.FishPosAndDestination); + + if (Math.Abs(fishPos - fishDest) < 0.1f) + { + fishComponent.FishSelectPosTime = curTime + fishDiff + fishDiff * 0.2 * _random.NextFloat(-1, 1); + } + } + + DirtyField(fishingRod, fishingRodComponent, nameof(fishingRodComponent.FloatPosition)); + DirtyField(fish.Value, fishComponent, nameof(fishComponent.FishPosAndDestination)); + } + + private void UpdateFishDestination(EntityUid fish, CP14FishComponent fishComponent, TimeSpan curTime, float maxCord) + { + if (curTime < fishComponent.FishSelectPosTime) + return; + + fishComponent.FishPosAndDestination.X = _random.NextFloat(0, maxCord); + } + + private void UpdateFishWaitingStatus(EntityUid fishingRod, CP14FishingRodComponent fishingRodComponent, TimeSpan curTime) + { + var fish = fishingRodComponent.CaughtFish; + TryComp(fish, out CP14FishComponent? fishComponent); + + if (fishComponent is null) + return; + + if (fishingRodComponent.Reeling) + { + fishingRodComponent.FishHooked = true; + + var user = fishingRodComponent.User; + RaiseLocalEvent(user!.Value, new FishingUIStatus(true, fishingRodComponent)); + + DirtyField(fishingRod, fishingRodComponent, nameof(CP14FishingRodComponent.FishHooked)); + return; + } + + if (curTime < fishComponent.FishGetAwayTime) + return; + + fishingRodComponent.CaughtFish = null; + DirtyField(fishingRod, fishingRodComponent, nameof(CP14FishingRodComponent.CaughtFish)); + Del(fish); + } + + private void TryToCatchFish(EntityUid fishingRod, CP14FishingRodComponent fishingRodComponent, TimeSpan curTime) + { + if (curTime < fishingRodComponent.FishingTime) + return; + + if (fishingRodComponent.FishingFloat is null) + return; + + if (fishingRodComponent.Target is null) + return; + + var pond = fishingRodComponent.Target; + TryComp(pond, out CP14FishingPondComponent? pondComponent); + + if (pondComponent?.LootTable is null) + return; + + _prototypeManager.Resolve(pondComponent.LootTable, out var lootTable); + + if (lootTable is null) + return; + + var fishes = _entityTable.GetSpawns(lootTable, _random.GetRandom()); + var fishId = fishes.First(); + + EnsurePausedMap(); + var fish = Spawn(fishId, new MapCoordinates(Vector2.Zero, _mapId!.Value)); + + TryComp(fish, out CP14FishComponent? fishComponent); + + if (fishComponent is null) + return; + + fishingRodComponent.CaughtFish = fish; + fishComponent.FishGetAwayTime = curTime; + fishComponent.FishGetAwayTime += TimeSpan.FromSeconds(_random.NextDouble(fishingRodComponent.MinAwaitTime, fishingRodComponent.MaxAwaitTime)); + DirtyField(fishingRod, fishingRodComponent, nameof(CP14FishingRodComponent.CaughtFish)); + DirtyField(fish, fishComponent, nameof(CP14FishComponent.FishGetAwayTime)); + } + + private void OnPickupEvent(EntityUid entity, CP14FishingRodComponent component, GettingPickedUpAttemptEvent ev) + { + if (ev.Cancelled) + return; + + component.User = ev.User; + } + + private void OnDropEvent(EntityUid entity, CP14FishingRodComponent component, DroppedEvent ev) + { + component.User = null; + } + + private void EnsurePausedMap() + { + if (_map.MapExists(_mapId)) + return; + + var mapUid = _map.CreateMap(out var newMapId); + _metaSystem.SetEntityName(mapUid, Loc.GetString("fishing-paused-map-name")); + _mapId = newMapId; + _map.SetPaused(mapUid, true); } [Serializable, NetSerializable] public sealed class FishingReelKeyMessage : EntityEventArgs { - public EntityUid User { get; } public bool Reeling { get; } - public FishingReelKeyMessage(EntityUid user, bool reeling) + public FishingReelKeyMessage(bool reeling) { - User = user; Reeling = reeling; } } + + public sealed class FishingUIStatus : EntityEventArgs + { + public bool UIStatus { get; } + + public CP14FishingRodComponent Component { get; } + + public FishingUIStatus(bool uiStatus, CP14FishingRodComponent component) + { + UIStatus = uiStatus; + Component = component; + } + } } diff --git a/Content.Shared/_CP14/Fishing/Components/CP14FishComponent.cs b/Content.Shared/_CP14/Fishing/Components/CP14FishComponent.cs index 5d927225e0..3cfdc01386 100644 --- a/Content.Shared/_CP14/Fishing/Components/CP14FishComponent.cs +++ b/Content.Shared/_CP14/Fishing/Components/CP14FishComponent.cs @@ -1,12 +1,23 @@ +using System.Numerics; using Content.Shared._CP14.Fishing.Behaviors; +using Robust.Shared.GameStates; namespace Content.Shared._CP14.Fishing.Components; -[RegisterComponent] +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), AutoGenerateComponentPause] public sealed partial class CP14FishComponent : Component { [DataField(required: true)] - public CP14FishBaseBehavior FishBehavior; + public CP14FishBaseBehavior FishBehavior = default!; + + [AutoNetworkedField, AutoPausedField] + public TimeSpan FishSelectPosTime = TimeSpan.Zero; + + [AutoNetworkedField, AutoPausedField] + public TimeSpan FishGetAwayTime = TimeSpan.Zero; + + [AutoNetworkedField] + public Vector2 FishPosAndDestination; [DataField] public double MinAwaitTime = 1; diff --git a/Content.Shared/_CP14/Fishing/Components/CP14FishingRodComponent.cs b/Content.Shared/_CP14/Fishing/Components/CP14FishingRodComponent.cs index dd3b879228..f33acd195b 100644 --- a/Content.Shared/_CP14/Fishing/Components/CP14FishingRodComponent.cs +++ b/Content.Shared/_CP14/Fishing/Components/CP14FishingRodComponent.cs @@ -6,30 +6,44 @@ namespace Content.Shared._CP14.Fishing.Components; /// /// Allows to fish with this item /// -[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause] +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true), AutoGenerateComponentPause] public sealed partial class CP14FishingRodComponent : Component { - [AutoNetworkedField] + // Vars + [AutoNetworkedField, ViewVariables] public EntityUid? FishingFloat; - [AutoNetworkedField] - public EntityUid? Target; + [AutoNetworkedField, ViewVariables] + public EntityUid? User; - [AutoNetworkedField, AutoPausedField] + [AutoNetworkedField, ViewVariables] + public float FloatPosition = 0f; + + [AutoNetworkedField, AutoPausedField, ViewVariables] public TimeSpan FishingTime = TimeSpan.Zero; - [AutoNetworkedField] - public bool FishCaught; + [AutoNetworkedField, ViewVariables] + public EntityUid? CaughtFish; - [AutoNetworkedField] + [AutoNetworkedField, ViewVariables] public bool Reeling; + [AutoNetworkedField, ViewVariables] + public bool FishHooked; + + [AutoNetworkedField, ViewVariables] + public EntityUid? Target; + + // Data definitions [DataField] public EntProtoId FloatPrototype = "CP14DefaultFishingFloat"; [DataField] public ProtoId FishingMinigame = "Default"; + [DataField] + public float FloatSpeed = 2f; + [DataField] public float MaxFishingDistance = 5f; diff --git a/Resources/Locale/en-US/_CP14/fishing/fishing.ftl b/Resources/Locale/en-US/_CP14/fishing/fishing.ftl new file mode 100644 index 0000000000..c2941d861f --- /dev/null +++ b/Resources/Locale/en-US/_CP14/fishing/fishing.ftl @@ -0,0 +1 @@ +fishing-paused-map-name = Fish map \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/fishing/fishing.ftl b/Resources/Locale/ru-RU/_CP14/fishing/fishing.ftl new file mode 100644 index 0000000000..0d4e21dbb9 --- /dev/null +++ b/Resources/Locale/ru-RU/_CP14/fishing/fishing.ftl @@ -0,0 +1 @@ +fishing-paused-map-name = Рыбная карта \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Flem.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Flem.yml index 5c5696f554..e34d13fb78 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Flem.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/Flem.yml @@ -97,4 +97,6 @@ - type: Tag tags: - FootstepSound - - CP14Mosquito \ No newline at end of file + - CP14Mosquito + - type: CP14Fish + fishBehavior: !type:CP14FishLerpBehaviour \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Floor/floorWater.yml b/Resources/Prototypes/_CP14/Entities/Structures/Floor/floorWater.yml index 5010b6c9d4..99be2a0fc0 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Floor/floorWater.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Floor/floorWater.yml @@ -72,6 +72,7 @@ effects: - !type:ExtinguishReaction - type: CP14FishingPond + lootTable: CP14WaterFishingLootTable - type: entity parent: CP14FloorWaterOptimized diff --git a/Resources/Prototypes/_CP14/Fishing/loottables.yml b/Resources/Prototypes/_CP14/Fishing/loottables.yml new file mode 100644 index 0000000000..04bc92166f --- /dev/null +++ b/Resources/Prototypes/_CP14/Fishing/loottables.yml @@ -0,0 +1,5 @@ +- type: entityTable + id: CP14WaterFishingLootTable + table: !type:GroupSelector + children: + - id: CP14MobMonsterFlem \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/FishingStyles/default.yml b/Resources/Prototypes/_CP14/Fishing/styles.yml similarity index 95% rename from Resources/Prototypes/_CP14/FishingStyles/default.yml rename to Resources/Prototypes/_CP14/Fishing/styles.yml index b099e1a978..d151f851bd 100644 --- a/Resources/Prototypes/_CP14/FishingStyles/default.yml +++ b/Resources/Prototypes/_CP14/Fishing/styles.yml @@ -16,3 +16,4 @@ texture: /Textures/_CP14/Interface/Fishing/Default/float.png size: 22, 76 offset: 26, 12 + fishingMinigameSize: 281