Fix the flashlight's power bar and status with no battery (#1862)
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
@@ -9,15 +9,20 @@ namespace Content.Shared.GameObjects.Components
|
||||
public sealed override string Name => "HandheldLight";
|
||||
public sealed override uint? NetID => ContentNetIDs.HANDHELD_LIGHT;
|
||||
|
||||
protected abstract bool HasCell { get; }
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
protected sealed class HandheldLightComponentState : ComponentState
|
||||
{
|
||||
public HandheldLightComponentState(float? charge) : base(ContentNetIDs.HANDHELD_LIGHT)
|
||||
public HandheldLightComponentState(float? charge, bool hasCell) : base(ContentNetIDs.HANDHELD_LIGHT)
|
||||
{
|
||||
Charge = charge;
|
||||
HasCell = hasCell;
|
||||
}
|
||||
|
||||
public float? Charge { get; }
|
||||
|
||||
public bool HasCell { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user