using Content.Shared.Guidebook; using Robust.Shared.GameStates; namespace Content.Shared.Power.Generator; /// /// This is used for generators that run off some kind of fuel. /// /// /// /// Generators must be anchored to be able to run. /// /// /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedGeneratorSystem))] public sealed partial class FuelGeneratorComponent : Component { /// /// Is the generator currently running? /// [DataField, AutoNetworkedField] public bool On; /// /// The generator's target power. /// [DataField] public float TargetPower = 15_000.0f; /// /// The maximum target power. /// [DataField] [GuidebookData] public float MaxTargetPower = 30_000.0f; /// /// The minimum target power. /// /// /// Setting this to any value above 0 means that the generator can't idle without consuming some amount of fuel. /// [DataField] public float MinTargetPower = 1_000; /// /// The "optimal" power at which the generator is considered to be at 100% efficiency. /// [DataField] public float OptimalPower = 15_000.0f; /// /// The rate at which one unit of fuel should be consumed. /// [DataField] public float OptimalBurnRate = 1 / 60.0f; // Once every 60 seconds. /// /// A constant used to calculate fuel efficiency in relation to target power output and optimal power output /// [DataField] public float FuelEfficiencyConstant = 1.3f; }