Improve autolathe & protolathe visuals.

Used correct Eris autolathe sprite.
Gave them an unlit layer.
This commit is contained in:
Pieter-Jan Briers
2019-10-14 09:57:57 +02:00
parent f3f05b0396
commit 9a38577a18
23 changed files with 612 additions and 12 deletions

View File

@@ -2,6 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Power;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
@@ -248,15 +250,14 @@ namespace Content.Server.GameObjects.Components.Power
{
var oldPowered = Powered;
Powered = !IsPowerCut && (ExternalPowered || InternalPowered);
if (oldPowered != Powered)
{
if (Powered)
OnPowerStateChanged?.Invoke(this, new PowerStateEventArgs(Powered));
if (Owner.TryGetComponent(out AppearanceComponent appearance))
{
OnPowerStateChanged?.Invoke(this, new PowerStateEventArgs(true));
}
else
{
OnPowerStateChanged?.Invoke(this, new PowerStateEventArgs(false));
appearance.SetData(PowerDeviceVisuals.Powered, Powered);
}
}
}