Files
wwdpublic/Content.Shared/_Goobstation/Fishing/Components/FishingRodComponent.cs
Will-Oliver-Br 322dba921b Port Fishing 2.0 (#2416)
# Description

Continuation of this
[PR](https://github.com/Simple-Station/Einstein-Engines/pull/2398)

Port fishing from
[Goob-Station](https://github.com/Goob-Station/Goob-Station). Some PRs
from [Wizards](https://github.com/space-wizards/space-station-14) and
sprites from [TG](https://github.com/tgstation/tgstation).
Prs:
https://github.com/space-wizards/space-station-14/pull/30921
https://github.com/Goob-Station/Goob-Station/pull/1970
https://github.com/Goob-Station/Goob-Station/pull/2416

---

# TODO

- [x] Port fishing
- [x] Add more fish

---

<details><summary><h1>Media</h1></summary>
<p>

![Captura de tela 2025-05-04
182540](https://github.com/user-attachments/assets/d6e7984a-b1a2-4dfd-92af-12e968e7e291)
![Captura de tela 2025-05-04
182739](https://github.com/user-attachments/assets/781f2c52-f053-4171-9af1-632979f841ac)

</p>
</details>

---

# Changelog

🆑 Rouden, Aidenkrz, Aviu, Will-Oliver-Br
- add: Added fishing.

---------

Co-authored-by: Rouden <149893554+Roudenn@users.noreply.github.com>
Co-authored-by: Aidenkrz <aiden@djkraz.com>
Co-authored-by: GoobBot <uristmchands@proton.me>
Co-authored-by: Aiden <28298836+Aidenkrz@users.noreply.github.com>
Co-authored-by: Aviu00 <93730715+Aviu00@users.noreply.github.com>
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>

(cherry picked from commit e61def844e5d116d28c4a5ee4e88b1c5a2186937)
2025-05-10 00:57:56 +03:00

64 lines
1.7 KiB
C#

using Robust.Shared.Prototypes;
using Robust.Shared.GameStates;
using Robust.Shared.Utility;
using System.Numerics;
namespace Content.Shared._Goobstation.Fishing.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class FishingRodComponent : Component
{
/// <summary>
/// Higher value will make every interact more productive.
/// </summary>
[DataField]
public float Efficiency = 1f;
/// <summary>
/// At what progress fishing starts.
/// </summary>
[DataField]
public float StartingProgress = 0.33f;
/// <summary>
/// How many seconds we wait until fish starts to fight with us
/// </summary>
[DataField]
public float StartingStruggleTime = 0.3f;
/// <summary>
/// If lure moves bigger than this distance away from the rod,
/// it will force it to reel instantly.
/// </summary>
[DataField]
public float BreakOnDistance = 8f;
[DataField]
public EntProtoId FloatPrototype = "FishingLure";
[DataField]
public SpriteSpecifier RopeSprite =
new SpriteSpecifier.Rsi(new ResPath("_Goobstation/Objects/Specific/Fishing/fishing_lure.rsi"), "rope");
[DataField, ViewVariables]
public Vector2 RopeUserOffset = new (0f, 0f);
[DataField, ViewVariables]
public Vector2 RopeLureOffset = new (0f, 0f);
[DataField, AutoNetworkedField]
public EntityUid? FishingLure;
[DataField]
public EntProtoId ThrowLureActionId = "ActionStartFishing";
[DataField, AutoNetworkedField]
public EntityUid? ThrowLureActionEntity;
[DataField]
public EntProtoId PullLureActionId = "ActionStopFishing";
[DataField, AutoNetworkedField]
public EntityUid? PullLureActionEntity;
}