2022-11-16 20:22:11 +01:00
|
|
|
using Content.Shared.Storage;
|
2022-08-29 22:31:27 -04:00
|
|
|
|
|
|
|
|
namespace Content.Server.Medical.BiomassReclaimer
|
|
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class BiomassReclaimerComponent : Component
|
2022-08-29 22:31:27 -04:00
|
|
|
{
|
2022-10-04 03:55:15 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// This gets set for each mob it processes.
|
|
|
|
|
/// When it hits 0, there is a chance for the reclaimer to either spill blood or throw an item.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public float RandomMessTimer = 0f;
|
2022-08-29 22:31:27 -04:00
|
|
|
|
2022-10-04 03:55:15 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// The interval for <see cref="RandomMessTimer"/>.
|
|
|
|
|
/// </summary>
|
2024-03-12 01:59:21 +04:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField]
|
2022-08-29 22:31:27 -04:00
|
|
|
public TimeSpan RandomMessInterval = TimeSpan.FromSeconds(5);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This gets set for each mob it processes.
|
2022-10-04 03:55:15 +02:00
|
|
|
/// When it hits 0, spit out biomass.
|
2022-08-29 22:31:27 -04:00
|
|
|
/// </summary>
|
2022-10-04 03:55:15 +02:00
|
|
|
[ViewVariables]
|
|
|
|
|
public float ProcessingTimer = default;
|
2022-08-29 22:31:27 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
2022-10-04 03:55:15 +02:00
|
|
|
/// Amount of biomass that the mob being processed will yield.
|
|
|
|
|
/// This is calculated from the YieldPerUnitMass.
|
2024-03-12 01:59:21 +04:00
|
|
|
/// Also stores non-integer leftovers.
|
2022-08-29 22:31:27 -04:00
|
|
|
/// </summary>
|
2022-10-04 03:55:15 +02:00
|
|
|
[ViewVariables]
|
2024-03-12 01:59:21 +04:00
|
|
|
public float CurrentExpectedYield = 0f;
|
2022-08-29 22:31:27 -04:00
|
|
|
|
2022-10-04 03:55:15 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// The reagent that will be spilled while processing a mob.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public string? BloodReagent;
|
2022-08-29 22:31:27 -04:00
|
|
|
|
2022-10-04 03:55:15 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Entities that can be randomly spawned while processing a mob.
|
|
|
|
|
/// </summary>
|
2022-08-29 22:31:27 -04:00
|
|
|
public List<EntitySpawnEntry> SpawnedEntities = new();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How many units of biomass it produces for each unit of mass.
|
|
|
|
|
/// </summary>
|
2024-01-22 17:13:04 -05:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float YieldPerUnitMass = 0.4f;
|
2022-10-04 03:55:15 +02:00
|
|
|
|
2024-03-12 01:59:21 +04:00
|
|
|
/// <summary>
|
|
|
|
|
/// How many seconds to take to insert an entity per unit of its mass.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float BaseInsertionDelay = 0.1f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How much to multiply biomass yield from botany produce.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float ProduceYieldMultiplier = 0.25f;
|
|
|
|
|
|
2022-10-04 03:55:15 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// The time it takes to process a mob, per mass.
|
2022-09-27 04:00:30 -04:00
|
|
|
/// </summary>
|
2024-01-22 17:13:04 -05:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float ProcessingTimePerUnitMass = 0.5f;
|
2022-10-04 03:55:15 +02:00
|
|
|
|
2022-08-29 22:31:27 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Will this refuse to gib a living mob?
|
|
|
|
|
/// </summary>
|
2024-03-12 01:59:21 +04:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField]
|
2022-08-29 22:31:27 -04:00
|
|
|
public bool SafetyEnabled = true;
|
|
|
|
|
}
|
|
|
|
|
}
|