slow work

This commit is contained in:
Deserty0
2025-09-04 22:54:20 +10:00
parent 310126c660
commit dcecaded17
4 changed files with 59 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
using Content.Shared._CP14.Fishing;
using Content.Shared._CP14.Fishing.Components;
using Content.Shared.Interaction;
namespace Content.Client._CP14.Fishing;
public sealed class CP14FishingSystem : CP14SharedFishingSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CP14FishingRodComponent, AfterInteractEvent>(OnInteract);
}
private void OnInteract(EntityUid uid, CP14FishingRodComponent component, AfterInteractEvent args)
{
if (args.Handled)
return;
if (!args.CanReach || args.Target is not { Valid: true } target)
return;
if (!TryComp<CP14FishingPondComponent>(args.Target, out var pond))
return;
if (component.FishingProcess)
return;
OpenFishingPopup();
}
private void OpenFishingPopup()
{
}
}

View File

@@ -0,0 +1,5 @@
namespace Content.Shared._CP14.Fishing;
public abstract class CP14SharedFishingSystem : EntitySystem
{
}

View File

@@ -0,0 +1,15 @@
using System.Runtime.Serialization;
using Content.Shared.EntityTable;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.Fishing.Components;
/// <summary>
/// This is used for...
/// </summary>
[RegisterComponent]
public sealed partial class CP14FishingPondComponent : Component
{
[DataField]
public ProtoId<EntityTablePrototype> LootTable;
}

View File

@@ -6,5 +6,5 @@ namespace Content.Shared._CP14.Fishing.Components;
[RegisterComponent]
public sealed partial class CP14FishingRodComponent : Component
{
public bool FishingProcess = false;
}