Engineering lockers. (#210)

* Import Eris engineering locker sprites.

* Allow customizing ClientStorageComponent open/close states better.

* EntityStorage does not blow up if Storage is also defined in prototype.

* Engineering styled lockers.
This commit is contained in:
Pieter-Jan Briers
2019-04-26 23:44:26 +02:00
committed by GitHub
parent fe0414eda7
commit 6e5680b3c2
10 changed files with 135 additions and 6 deletions

View File

@@ -25,8 +25,13 @@ namespace Content.Server.GameObjects.Components
{
base.Initialize();
Contents = ContainerManagerComponent.Ensure<Container>($"{typeof(EntityStorageComponent).FullName}{Owner.Uid.ToString()}", Owner);
StorageComponent = Owner.AddComponent<ServerStorageComponent>();
StorageComponent.Initialize();
if (!Owner.TryGetComponent(out StorageComponent))
{
StorageComponent = Owner.AddComponent<ServerStorageComponent>();
// TODO: This is a terrible hack.
// Components should not need to be manually initialized in Initialize().
StorageComponent.Initialize();
}
entityQuery = new IntersectingEntityQuery(Owner);
}