Predict StorageComponent (#19682)
This commit is contained in:
@@ -18,7 +18,6 @@ using Content.Shared.Construction.Prototypes;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Gravity;
|
||||
using Content.Shared.Item;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -785,9 +784,7 @@ public abstract partial class InteractionTest
|
||||
return false;
|
||||
}
|
||||
|
||||
var clientTarget = CEntMan.GetEntity(target);
|
||||
|
||||
if (!CEntMan.TryGetComponent<ClientUserInterfaceComponent>(clientTarget, out var ui))
|
||||
if (!CEntMan.TryGetComponent<UserInterfaceComponent>(CEntMan.GetEntity(target), out var ui))
|
||||
{
|
||||
if (shouldSucceed)
|
||||
Assert.Fail($"Entity {SEntMan.ToPrettyString(SEntMan.GetEntity(target.Value))} does not have a bui component");
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Storage;
|
||||
using Content.Shared.Storage.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.UnitTesting;
|
||||
@@ -29,7 +30,7 @@ namespace Content.IntegrationTests.Tests
|
||||
{
|
||||
foreach (var proto in protoManager.EnumeratePrototypes<EntityPrototype>())
|
||||
{
|
||||
if (!proto.TryGetComponent<ServerStorageComponent>("Storage", out var storage) ||
|
||||
if (!proto.TryGetComponent<StorageComponent>("Storage", out var storage) ||
|
||||
storage.Whitelist != null ||
|
||||
!proto.TryGetComponent<ItemComponent>("Item", out var item)) continue;
|
||||
|
||||
@@ -84,7 +85,7 @@ namespace Content.IntegrationTests.Tests
|
||||
int capacity;
|
||||
var isEntStorage = false;
|
||||
|
||||
if (proto.TryGetComponent<ServerStorageComponent>("Storage", out var storage))
|
||||
if (proto.TryGetComponent<StorageComponent>("Storage", out var storage))
|
||||
{
|
||||
capacity = storage.StorageCapacityMax;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ using Content.Shared.VendingMachines;
|
||||
using Content.Shared.Wires;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Prototypes;
|
||||
using Content.Shared.Storage.Components;
|
||||
|
||||
namespace Content.IntegrationTests.Tests
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user