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:
DrSmugleaf
2020-08-23 13:19:40 +02:00
committed by GitHub
parent a4a25a9975
commit 814daaba4c
3 changed files with 17 additions and 4 deletions

View File

@@ -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; }
}
}
}