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:
@@ -13,7 +13,10 @@ namespace Content.Client.GameObjects.Components
|
||||
[RegisterComponent]
|
||||
public sealed class HandheldLightComponent : SharedHandheldLightComponent, IItemStatus
|
||||
{
|
||||
private bool _hasCell;
|
||||
|
||||
[ViewVariables] public float? Charge { get; private set; }
|
||||
[ViewVariables] protected override bool HasCell => _hasCell;
|
||||
|
||||
public Control MakeControl()
|
||||
{
|
||||
@@ -26,6 +29,7 @@ namespace Content.Client.GameObjects.Components
|
||||
return;
|
||||
|
||||
Charge = cast.Charge;
|
||||
_hasCell = cast.HasCell;
|
||||
}
|
||||
|
||||
private sealed class StatusControl : Control
|
||||
|
||||
Reference in New Issue
Block a user