Emergency closets are now filled automatically.

Mostly.
This commit is contained in:
Pieter-Jan Briers
2020-05-22 17:49:07 +02:00
parent a8e2900052
commit 931c0a01ac
3 changed files with 68 additions and 6 deletions

View File

@@ -12,10 +12,6 @@ namespace Content.Server.GameObjects.Components.Items.Storage.Fill
{
public override string Name => "ToolLockerFill";
#pragma warning disable 649
[Dependency] private readonly IEntityManager _entityManager;
#pragma warning restore 649
void IMapInit.MapInit()
{
var storage = Owner.GetComponent<IStorageComponent>();
@@ -23,7 +19,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage.Fill
void Spawn(string prototype)
{
storage.Insert(_entityManager.SpawnEntity(prototype, Owner.Transform.GridPosition));
storage.Insert(Owner.EntityManager.SpawnEntity(prototype, Owner.Transform.GridPosition));
}
if (random.Prob(0.4f))