2022-02-21 14:39:24 +11:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2021-01-01 15:28:58 +01:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Recycling.Components
|
2021-01-01 15:28:58 +01:00
|
|
|
{
|
2022-02-21 14:39:24 +11:00
|
|
|
[RegisterComponent, Friend(typeof(RecyclerSystem))]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class RecyclableComponent : Component
|
2021-01-01 15:28:58 +01:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The prototype that will be spawned on recycle.
|
|
|
|
|
/// </summary>
|
2022-02-21 14:39:24 +11:00
|
|
|
[DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))] public string? Prototype;
|
2021-01-01 15:28:58 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The amount of things that will be spawned on recycle.
|
|
|
|
|
/// </summary>
|
2022-02-21 14:39:24 +11:00
|
|
|
[DataField("amount")] public int Amount = 1;
|
2021-01-01 15:28:58 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this is "safe" to recycle or not.
|
|
|
|
|
/// If this is false, the recycler's safety must be disabled to recycle it.
|
|
|
|
|
/// </summary>
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("safe")]
|
|
|
|
|
public bool Safe { get; set; } = true;
|
2021-01-01 15:28:58 +01:00
|
|
|
}
|
|
|
|
|
}
|