41 lines
1.4 KiB
C#
41 lines
1.4 KiB
C#
using Content.Server.Chemistry.Components.SolutionManager;
|
|
using Content.Shared.Chemistry.Reagent;
|
|
using Content.Shared.FixedPoint;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Server.Power.Generator;
|
|
|
|
/// <summary>
|
|
/// This is used for chemical fuel input into generators.
|
|
/// </summary>
|
|
[RegisterComponent, Access(typeof(GeneratorSystem))]
|
|
public sealed partial class ChemicalFuelGeneratorAdapterComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The reagent to accept as fuel.
|
|
/// </summary>
|
|
[DataField("reagent", customTypeSerializer: typeof(PrototypeIdSerializer<ReagentPrototype>))]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public string Reagent = "WeldingFuel";
|
|
|
|
/// <summary>
|
|
/// The solution on the <see cref="SolutionContainerManagerComponent"/> to use.
|
|
/// </summary>
|
|
[DataField("solution")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public string Solution = "tank";
|
|
|
|
/// <summary>
|
|
/// Value to multiply reagent amount by to get fuel amount.
|
|
/// </summary>
|
|
[DataField("multiplier"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float Multiplier = 1f;
|
|
|
|
/// <summary>
|
|
/// How much reagent (can be fractional) is left in the generator.
|
|
/// Stored in units of <see cref="FixedPoint2.Epsilon"/>.
|
|
/// </summary>
|
|
[DataField("fractionalReagent"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float FractionalReagent;
|
|
}
|