Remove some obsolete AppearanceComponent method usages (#13726)
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.RandomAppearance;
|
||||
|
||||
public sealed class RandomAppearanceSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -17,7 +19,7 @@ public sealed class RandomAppearanceSystem : EntitySystem
|
||||
{
|
||||
if (TryComp(uid, out AppearanceComponent? appearance) && component.EnumKey != null)
|
||||
{
|
||||
appearance.SetData(component.EnumKey, _random.Pick(component.SpriteStates));
|
||||
_appearance.SetData(uid, component.EnumKey, _random.Pick(component.SpriteStates), appearance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user