Power Cell Refactor (#5943)

Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
This commit is contained in:
Leon Friedrich
2022-01-05 17:20:25 +13:00
committed by GitHub
parent 4eddefdda1
commit 0aa4f9efbe
37 changed files with 673 additions and 987 deletions

View File

@@ -16,8 +16,6 @@ namespace Content.Client.Light.Components
[Friend(typeof(HandheldLightSystem))]
public sealed class HandheldLightComponent : SharedHandheldLightComponent, IItemStatus
{
[ViewVariables] protected override bool HasCell => Level != null;
public byte? Level;
public Control MakeControl()
@@ -69,9 +67,6 @@ namespace Content.Client.Light.Components
{
base.FrameUpdate(args);
if (!_parent.HasCell)
return;
_timer += args.DeltaSeconds;
_timer %= TimerCycle;
@@ -81,7 +76,7 @@ namespace Content.Client.Light.Components
{
if (i == 0)
{
if (level == 0)
if (level == 0 || level == null)
{
_sections[0].PanelOverride = StyleBoxUnlit;
}