slow work
This commit is contained in:
38
Content.Client/_CP14/Fishing/CP14FishingSystem.cs
Normal file
38
Content.Client/_CP14/Fishing/CP14FishingSystem.cs
Normal 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()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
5
Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs
Normal file
5
Content.Shared/_CP14/Fishing/CP14SharedFishingSystem.cs
Normal file
@@ -0,0 +1,5 @@
|
||||
namespace Content.Shared._CP14.Fishing;
|
||||
|
||||
public abstract class CP14SharedFishingSystem : EntitySystem
|
||||
{
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -6,5 +6,5 @@ namespace Content.Shared._CP14.Fishing.Components;
|
||||
[RegisterComponent]
|
||||
public sealed partial class CP14FishingRodComponent : Component
|
||||
{
|
||||
|
||||
public bool FishingProcess = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user