namespace Content.Shared.Power.Generator; /// /// This handles small, portable generators that run off a material fuel. /// /// public abstract class SharedGeneratorSystem : EntitySystem { /// /// Calculates the expected fuel efficiency based on the optimal and target power levels. /// /// Target power level /// Optimal power level /// /// Expected fuel efficiency as a percentage public static float CalcFuelEfficiency(float targetPower, float optimalPower, FuelGeneratorComponent component) { return MathF.Pow(optimalPower / targetPower, component.FuelEfficiencyConstant); } }