Storage CanInsert() tweaks (#21623)
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
using Content.Server.Storage.EntitySystems;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Stacks;
|
||||
using Content.Shared.Storage;
|
||||
using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.Containers;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -17,8 +14,6 @@ namespace Content.Server.Stack
|
||||
[UsedImplicitly]
|
||||
public sealed class StackSystem : SharedStackSystem
|
||||
{
|
||||
[Dependency] private readonly ContainerSystem _container = default!;
|
||||
[Dependency] private readonly StorageSystem _storage = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
public static readonly int[] DefaultSplitAmounts = { 1, 5, 10, 20, 30, 50 };
|
||||
@@ -165,12 +160,6 @@ namespace Content.Server.Stack
|
||||
if (Split(uid, amount, userTransform.Coordinates, stack) is not {} split)
|
||||
return;
|
||||
|
||||
if (_container.TryGetContainingContainer(uid, out var container) &&
|
||||
TryComp<StorageComponent>(container.Owner, out var storage))
|
||||
{
|
||||
_storage.UpdateUI(container.Owner, storage);
|
||||
}
|
||||
|
||||
Hands.PickupOrDrop(userUid, split);
|
||||
|
||||
Popup.PopupCursor(Loc.GetString("comp-stack-split"), userUid);
|
||||
|
||||
Reference in New Issue
Block a user