Files
tbd-station-14/Content.Server/GameObjects/Components/Items/Storage/Fill/CustodialClosetFill.cs
DrSmugleaf 4a8ed41e3a Fix namespaces and optimize imports (#1651)
* Fix namespaces and optimize imports

* Cleanup fixes

* Merge conflict fixes

* Merge conflict fixes

* Merge conflict fixes
2020-08-13 14:40:27 +02:00

33 lines
976 B
C#

using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.Random;
using Robust.Shared.IoC;
namespace Content.Server.GameObjects.Components.Items.Storage.Fill
{
[RegisterComponent]
internal sealed class CustodialClosetFillComponent : Component, IMapInit
{
public override string Name => "CustodialClosetFill";
void IMapInit.MapInit()
{
var storage = Owner.GetComponent<IStorageComponent>();
var random = IoCManager.Resolve<IRobustRandom>();
void Spawn(string prototype)
{
storage.Insert(Owner.EntityManager.SpawnEntity(prototype, Owner.Transform.GridPosition));
}
Spawn("MopItem");
Spawn("MopBucket");
Spawn("WetFloorSign");
Spawn("WetFloorSign");
Spawn("WetFloorSign");
Spawn("TrashBag");
Spawn("TrashBag");
}
}
}