Files
tbd-station-14/Content.Server/GameObjects/Components/Items/Storage/Fill/CustodialClosetFill.cs
DrSmugleaf de9dfefd61 Replace resolve dependency with attribute in components (#1995)
* Replace resolve dependency with attribute in components

* Add changes that went missing in translation
2020-09-02 01:30:03 +02:00

32 lines
914 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>();
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");
}
}
}