72 lines
2.1 KiB
C#
72 lines
2.1 KiB
C#
// SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
|
|
// SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
|
|
// SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
|
|
// SPDX-FileCopyrightText: 2025 Rouden <149893554+Roudenn@users.noreply.github.com>
|
|
// SPDX-FileCopyrightText: 2025 Roudenn <romabond091@gmail.com>
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
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;
|
|
}
|