Thief beacons (try 2) (#29997)

content
This commit is contained in:
Ed
2024-08-08 16:17:50 +03:00
committed by GitHub
parent 6d6c836095
commit 03745efc7f
14 changed files with 264 additions and 24 deletions

View File

@@ -0,0 +1,23 @@
using Content.Server.Objectives.Systems;
using Content.Server.Thief.Systems;
namespace Content.Server.Objectives.Components;
/// <summary>
/// An abstract component that allows other systems to count adjacent objects as "stolen" when controlling other systems
/// </summary>
[RegisterComponent, Access(typeof(StealConditionSystem), typeof(ThiefBeaconSystem))]
public sealed partial class StealAreaComponent : Component
{
[DataField]
public bool Enabled = true;
[DataField]
public float Range = 1f;
/// <summary>
/// all the minds that will be credited with stealing from this area.
/// </summary>
[DataField]
public HashSet<EntityUid> Owners = new();
}

View File

@@ -22,11 +22,18 @@ public sealed partial class StealConditionComponent : Component
[DataField]
public bool VerifyMapExistence = true;
/// <summary>
/// If true, counts objects that are close to steal areas.
/// </summary>
[DataField]
public bool CheckStealAreas = false;
/// <summary>
/// If the target may be alive but has died, it will not be counted
/// </summary>
[DataField]
public bool CheckAlive = false;
/// <summary>
/// The minimum number of items you need to steal to fulfill a objective
/// </summary>