Add power selling price (#11395)

This commit is contained in:
corentt
2022-10-15 23:10:48 +02:00
committed by GitHub
parent d6197732d7
commit 67760da204
5 changed files with 19 additions and 4 deletions

View File

@@ -29,6 +29,13 @@ namespace Content.Server.Power.Components
/// </summary>
[ViewVariables] public bool IsFullyCharged => MathHelper.CloseToPercent(CurrentCharge, MaxCharge);
/// <summary>
/// The price per one joule. Default is 1 credit for 10kJ.
/// </summary>
[DataField("pricePerJoule")]
[ViewVariables(VVAccess.ReadWrite)]
public float PricePerJoule = 0.0001f;
/// <summary>
/// If sufficient charge is avaiable on the battery, use it. Otherwise, don't.
/// </summary>