Code cleanup: Dirty(Comp) (#26238)
* Replaced uses of Dirty(Component) with Dirty(Uid, Component) Modified some systems (notably pulling-related) to use uids. * Missed a few * Revert changes to pulling * No
This commit is contained in:
@@ -89,7 +89,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
/// </summary>
|
||||
public void AddItemSlot(EntityUid uid, string id, ItemSlot slot, ItemSlotsComponent? itemSlots = null)
|
||||
{
|
||||
itemSlots ??= EntityManager.EnsureComponent<ItemSlotsComponent>(uid);
|
||||
itemSlots ??= EnsureComp<ItemSlotsComponent>(uid);
|
||||
DebugTools.AssertOwner(uid, itemSlots);
|
||||
|
||||
if (itemSlots.Slots.TryGetValue(id, out var existing))
|
||||
@@ -103,7 +103,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
|
||||
slot.ContainerSlot = _containers.EnsureContainer<ContainerSlot>(uid, id);
|
||||
itemSlots.Slots[id] = slot;
|
||||
Dirty(itemSlots);
|
||||
Dirty(uid, itemSlots);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -127,7 +127,7 @@ namespace Content.Shared.Containers.ItemSlots
|
||||
if (itemSlots.Slots.Count == 0)
|
||||
EntityManager.RemoveComponent(uid, itemSlots);
|
||||
else
|
||||
Dirty(itemSlots);
|
||||
Dirty(uid, itemSlots);
|
||||
}
|
||||
|
||||
public bool TryGetSlot(EntityUid uid, string slotId, [NotNullWhen(true)] out ItemSlot? itemSlot, ItemSlotsComponent? component = null)
|
||||
|
||||
Reference in New Issue
Block a user