Show / Hide Table of Contents

Class BatteryComponent

Battery node on the pow3r network. Needs other components to connect to actual networks.

Inheritance
System.Object
BatteryComponent
Namespace: Content.Server.Power.Components
Assembly: Content.Server.dll
Syntax
public class BatteryComponent : Component

Fields

| Improve this Doc View Source

_maxCharge

Declaration
public float _maxCharge
Field Value
Type Description
System.Single
| Improve this Doc View Source

Charge

Declaration
public float Charge
Field Value
Type Description
System.Single
| Improve this Doc View Source

PricePerJoule

The price per one joule. Default is 1 credit for 10kJ.

Declaration
public float PricePerJoule
Field Value
Type Description
System.Single
| Improve this Doc View Source

SolutionName

Declaration
public string SolutionName
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

CurrentCharge

Current charge of the battery in joules (ie. watt seconds)

Declaration
public float CurrentCharge { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

IsFullyCharged

True if the battery is fully charged.

Declaration
public bool IsFullyCharged { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

MaxCharge

Maximum charge of the battery in joules (ie. watt seconds)

Declaration
public float MaxCharge { get; set; }
Property Value
Type Description
System.Single

Methods

| Improve this Doc View Source

TryUseCharge(Single)

Declaration
public bool TryUseCharge(float value)
Parameters
Type Name Description
System.Single value
Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾