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
This commit is contained in:
@@ -11,16 +11,15 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
{
|
||||
public override string Name => "Battery";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public int MaxCharge { get => _maxCharge; set => SetMaxCharge(value); }
|
||||
[ViewVariables(VVAccess.ReadWrite)] public int MaxCharge { get => _maxCharge; set => SetMaxCharge(value); }
|
||||
private int _maxCharge;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float CurrentCharge { get => _currentCharge; set => SetCurrentCharge(value); }
|
||||
|
||||
private float _currentCharge;
|
||||
|
||||
[ViewVariables]
|
||||
public BatteryState BatteryState { get; private set; }
|
||||
[ViewVariables] public BatteryState BatteryState { get; private set; }
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
@@ -93,7 +92,7 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
private void SetMaxCharge(int newMax)
|
||||
{
|
||||
_maxCharge = Math.Max(newMax, 0);
|
||||
_currentCharge = Math.Min( _currentCharge, MaxCharge);
|
||||
_currentCharge = Math.Min(_currentCharge, MaxCharge);
|
||||
UpdateStorageState();
|
||||
OnChargeChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user