CatStation/Content.Shared/Gatherable/Components/GatherableComponent.cs
Winkarst-cpu 54986e0347
Prediction + small cleanup: GatherableSystem (#44840)
* Predict

* Reuse pos

* Update Content.Shared/Gatherable/GatherableSystem.cs

Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com>

* Update Content.Shared/Gatherable/GatherableSystem.cs

Co-authored-by: Connor Huffine <chuffine@gmail.com>

* Review

* refactor: GatherableSystem xml-doc

---------

Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com>
Co-authored-by: Connor Huffine <chuffine@gmail.com>
Co-authored-by: Fildrance <fildrance@gmail.com>
2026-07-22 18:27:24 +00:00

44 lines
1.2 KiB
C#

using Content.Shared.EntityTable.EntitySelectors;
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
namespace Content.Shared.Gatherable.Components;
/// <summary>
/// Makes the entity possible to gather.
/// </summary>
[RegisterComponent, NetworkedComponent]
[Access(typeof(GatherableSystem))]
public sealed partial class GatherableComponent : Component
{
/// <summary>
/// Whitelist for specifying the kind of tools can be used on a resource.
/// Supports multiple tags.
/// </summary>
[DataField(required: true)]
public EntityWhitelist? ToolWhitelist;
/// <summary>
/// YAML example below
/// (Tag1, Tag2, LootTableID1, LootTableID2 are placeholders for example)
/// --------------------
/// useMappedLoot: true
/// toolWhitelist:
/// tags:
/// - Tag1
/// - Tag2
/// loot:
/// Tag1: !type:NestedSelector
/// tableId: LootTableID1
/// Tag2: !type:NestedSelector
/// tableId: LootTableID2
/// </summary>
[DataField]
public Dictionary<string, EntityTableSelector>? Loot = [];
/// <summary>
/// Random shift of the appearing entity during gathering.
/// </summary>
[DataField]
public float GatherOffset = 0.3f;
}