Content ecs containers (#22484)
This commit is contained in:
@@ -173,7 +173,7 @@ public sealed class StickySystem : EntitySystem
|
||||
// add container to entity and insert sticker into it
|
||||
var container = _containerSystem.EnsureContainer<Container>(target, StickerSlotId);
|
||||
container.ShowContents = true;
|
||||
if (!container.Insert(uid))
|
||||
if (!_containerSystem.Insert(uid, container))
|
||||
return;
|
||||
|
||||
// show message to user
|
||||
@@ -207,11 +207,11 @@ public sealed class StickySystem : EntitySystem
|
||||
return;
|
||||
|
||||
// try to remove sticky item from target container
|
||||
if (!_containerSystem.TryGetContainer(stuckTo, StickerSlotId, out var container) || !container.Remove(uid))
|
||||
if (!_containerSystem.TryGetContainer(stuckTo, StickerSlotId, out var container) || !_containerSystem.Remove(uid, container))
|
||||
return;
|
||||
// delete container if it's now empty
|
||||
if (container.ContainedEntities.Count == 0)
|
||||
container.Shutdown();
|
||||
_containerSystem.ShutdownContainer(container);
|
||||
|
||||
// try place dropped entity into user hands
|
||||
_handsSystem.PickupOrDrop(user, uid);
|
||||
|
||||
Reference in New Issue
Block a user