Files
tbd-station-14/Content.Shared/GameObjects/Components/SharedHandheldLightComponent.cs
SoulSloth df823d2245 Add Flashlight Visualizer/states (#1861)
* Add art assets for cloning

* Added a 'Scan DNA' button to the medical scanner

* Made the UI update unconditional for the medical scanner until checks for power changes are in place

* Update Medical scanner to reflect powered status and fix #1774

* added a 'scan dna' button the the medical scanner that will add the contained bodies Uid to a list in CloningSystem, fixed an issue with the menu not populating if the scanner starts in an unpowered state

* Add disabling logic to 'Scan DNA' button on medical scanner

* Removed un-used libraries

* Added playing parameter to radiatingLightComponent, changed it's animation key to radiatingLight

* refactored RadiatingLight into a visualizer

* Added different light animations for differnt power states of a flashlight

* split out the radiating light visualizer into two seperate visualizers

* further refactored and tweaked handheldlight animations

* further lantern light tweaks

* removed un-used attributes in flashlight and lantern prototypes

* fix null check in handheldlightcomponent
2020-08-24 12:32:18 +02:00

45 lines
1.1 KiB
C#

using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components
{
public abstract class SharedHandheldLightComponent : Component
{
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, bool hasCell) : base(ContentNetIDs.HANDHELD_LIGHT)
{
Charge = charge;
HasCell = hasCell;
}
public float? Charge { get; }
public bool HasCell { get; }
}
}
[Serializable, NetSerializable]
public enum HandheldLightVisuals
{
Power
}
[Serializable, NetSerializable]
public enum HandheldLightPowerStates
{
FullPower,
LowPower,
Dying,
}
}