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

@@ -91,7 +91,7 @@ namespace Content.Client.Inventory
UpdateSlot(args.Equipee, component, args.Slot);
if (args.Equipee != _playerManager.LocalPlayer?.ControlledEntity)
return;
var update = new SlotSpriteUpdate(args.SlotGroup, args.Slot, null, false);
var update = new SlotSpriteUpdate(null, args.SlotGroup, args.Slot, false);
OnSpriteUpdate?.Invoke(update);
}
@@ -100,8 +100,7 @@ namespace Content.Client.Inventory
UpdateSlot(args.Equipee, component, args.Slot);
if (args.Equipee != _playerManager.LocalPlayer?.ControlledEntity)
return;
var sprite = EntityManager.GetComponentOrNull<SpriteComponent>(args.Equipment);
var update = new SlotSpriteUpdate(args.SlotGroup, args.Slot, sprite,
var update = new SlotSpriteUpdate(args.Equipment, args.SlotGroup, args.Slot,
HasComp<ClientStorageComponent>(args.Equipment));
OnSpriteUpdate?.Invoke(update);
}
@@ -340,9 +339,9 @@ namespace Content.Client.Inventory
}
public readonly record struct SlotSpriteUpdate(
EntityUid? Entity,
string Group,
string Name,
SpriteComponent? Sprite,
bool ShowStorage
);
}