Storage Component ECS (#7530)

Co-authored-by: fishfish458 <fishfish458>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Fishfish458
2022-04-28 06:11:15 -06:00
committed by GitHub
parent f403311641
commit 4c9e45a480
38 changed files with 892 additions and 1163 deletions

View File

@@ -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;
}
}
}