Remove usages of obsolete SpriteView.Sprite.set() (#19500)

This commit is contained in:
Visne
2023-08-25 03:16:46 +02:00
committed by GitHub
parent 3c667b6f7e
commit 11a57be230
20 changed files with 72 additions and 95 deletions

View File

@@ -222,14 +222,16 @@ namespace Content.Client.Examine
vBox.AddChild(hBox);
if (EntityManager.TryGetComponent(target, out SpriteComponent? sprite))
if (EntityManager.HasComponent<SpriteComponent>(target))
{
hBox.AddChild(new SpriteView
var spriteView = new SpriteView
{
Sprite = sprite, OverrideDirection = Direction.South,
OverrideDirection = Direction.South,
SetSize = new Vector2(32, 32),
Margin = new Thickness(2, 0, 2, 0),
});
};
spriteView.SetEntity(target);
hBox.AddChild(spriteView);
}
if (knowTarget)