Storage Component ECS (#7530)
Co-authored-by: fishfish458 <fishfish458> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Content.Client.Storage;
|
||||
using Content.Shared.Interaction;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Client.Interactable
|
||||
{
|
||||
@@ -15,11 +14,12 @@ namespace Content.Client.Interactable
|
||||
if (!target.TryGetContainer(out var container))
|
||||
return false;
|
||||
|
||||
if (!EntityManager.TryGetComponent(container.Owner, out ClientStorageComponent storage))
|
||||
if (!TryComp(container.Owner, out ClientStorageComponent? storage))
|
||||
return false;
|
||||
|
||||
// we don't check if the user can access the storage entity itself. This should be handed by the UI system.
|
||||
return storage.UIOpen;
|
||||
// Need to return if UI is open or not
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user