Fix slot interactions (again) (#11903)

This commit is contained in:
Leon Friedrich
2022-10-14 07:35:10 +13:00
committed by GitHub
parent 5b962f651e
commit 15d92c39fe
2 changed files with 3 additions and 9 deletions

View File

@@ -236,7 +236,7 @@ namespace Content.Client.Inventory
public void UIInventoryStorageActivate(string slot) public void UIInventoryStorageActivate(string slot)
{ {
EntityManager.RaisePredictiveEvent(new OpenSlotStorageNetworkMessage(slot)); EntityManager.EntityNetManager?.SendSystemNetworkMessage(new OpenSlotStorageNetworkMessage(slot));
} }
public void UIInventoryExamine(string slot, EntityUid uid) public void UIInventoryExamine(string slot, EntityUid uid)
@@ -260,7 +260,7 @@ namespace Content.Client.Inventory
if (!TryGetSlotEntity(uid, slot, out var item)) if (!TryGetSlotEntity(uid, slot, out var item))
return; return;
EntityManager.EntityNetManager?.SendSystemNetworkMessage( EntityManager.RaisePredictiveEvent(
new InteractInventorySlotEvent(item.Value, altInteract: false)); new InteractInventorySlotEvent(item.Value, altInteract: false));
} }

View File

@@ -1,4 +1,4 @@
using Content.Client.Gameplay; using Content.Client.Gameplay;
using Content.Client.Hands; using Content.Client.Hands;
using Content.Client.Inventory; using Content.Client.Inventory;
using Content.Client.Storage; using Content.Client.Storage;
@@ -207,12 +207,6 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
return; return;
} }
if (args.Function == ContentKeyFunctions.ActivateItemInWorld)
{
_inventorySystem.UIInventoryStorageActivate(control.SlotName);
return;
}
if (_playerInventory == null) if (_playerInventory == null)
{ {
return; return;