Predict StorageComponent (#19682)

This commit is contained in:
metalgearsloth
2023-09-11 21:20:46 +10:00
committed by GitHub
parent 99b77bc2d3
commit d5bd1c6f86
68 changed files with 1124 additions and 1121 deletions

View File

@@ -1,12 +1,12 @@
using Content.Client.Gameplay;
using Content.Client.Hands.Systems;
using Content.Client.Inventory;
using Content.Client.Storage;
using Content.Client.UserInterface.Controls;
using Content.Client.UserInterface.Systems.Inventory.Controls;
using Content.Client.UserInterface.Systems.Inventory.Windows;
using Content.Shared.Hands.Components;
using Content.Shared.Input;
using Content.Shared.Storage;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controllers;
@@ -126,7 +126,7 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
container.AddButton(button);
}
var showStorage = _entities.HasComponent<ClientStorageComponent>(data.HeldEntity);
var showStorage = _entities.HasComponent<StorageComponent>(data.HeldEntity);
var update = new SlotSpriteUpdate(data.HeldEntity, data.SlotGroup, data.SlotName, showStorage);
SpriteUpdated(update);
}
@@ -151,7 +151,7 @@ public sealed class InventoryUIController : UIController, IOnStateEntered<Gamepl
_strippingWindow!.InventoryButtons.AddButton(button, data.ButtonOffset);
}
var showStorage = _entities.HasComponent<ClientStorageComponent>(data.HeldEntity);
var showStorage = _entities.HasComponent<StorageComponent>(data.HeldEntity);
var update = new SlotSpriteUpdate(data.HeldEntity, data.SlotGroup, data.SlotName, showStorage);
SpriteUpdated(update);
}