Class BatterySystem
Inheritance
System.Object
BatterySystem
Assembly: Content.Server.dll
Syntax
public sealed class BatterySystem : EntitySystem
Methods
|
Improve this Doc
View Source
Initialize()
Declaration
public override void Initialize()
|
Improve this Doc
View Source
IsFull(EntityUid, BatteryComponent)
Returns whether the battery is at least 99% charged, basically full.
Declaration
public bool IsFull(EntityUid uid, BatteryComponent battery = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
SetCharge(EntityUid, Single, BatteryComponent)
Declaration
public void SetCharge(EntityUid uid, float value, BatteryComponent battery = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.Single |
value |
|
BatteryComponent |
battery |
|
|
Improve this Doc
View Source
SetMaxCharge(EntityUid, Single, BatteryComponent)
Declaration
public void SetMaxCharge(EntityUid uid, float value, BatteryComponent battery = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.Single |
value |
|
BatteryComponent |
battery |
|
|
Improve this Doc
View Source
TryUseCharge(EntityUid, Single, BatteryComponent)
If sufficient charge is available on the battery, use it. Otherwise, don't.
Declaration
public bool TryUseCharge(EntityUid uid, float value, BatteryComponent battery = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.Single |
value |
|
BatteryComponent |
battery |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Update(Single)
Declaration
public override void Update(float frameTime)
Parameters
Type |
Name |
Description |
System.Single |
frameTime |
|
|
Improve this Doc
View Source
UseCharge(EntityUid, Single, BatteryComponent)
Declaration
public float UseCharge(EntityUid uid, float value, BatteryComponent battery = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.Single |
value |
|
BatteryComponent |
battery |
|
Returns
Type |
Description |
System.Single |
|