2019-11-23 21:39:12 +01:00
|
|
|
|
using Robust.Server.Interfaces.GameObjects;
|
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
using Robust.Shared.Interfaces.GameObjects;
|
|
|
|
|
|
using Robust.Shared.Interfaces.Random;
|
|
|
|
|
|
using Robust.Shared.IoC;
|
2020-01-24 16:10:48 -08:00
|
|
|
|
using Robust.Shared.Map;
|
2019-11-23 21:39:12 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.GameObjects.Components.Items.Storage.Fill
|
|
|
|
|
|
{
|
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
|
internal sealed class MedkitFillComponent : Component, IMapInit
|
|
|
|
|
|
{
|
|
|
|
|
|
public override string Name => "MedkitFill";
|
|
|
|
|
|
|
|
|
|
|
|
#pragma warning disable 649
|
|
|
|
|
|
[Dependency] private readonly IEntityManager _entityManager;
|
|
|
|
|
|
#pragma warning restore 649
|
|
|
|
|
|
|
|
|
|
|
|
void IMapInit.MapInit()
|
|
|
|
|
|
{
|
|
|
|
|
|
var storage = Owner.GetComponent<IStorageComponent>();
|
|
|
|
|
|
|
|
|
|
|
|
void Spawn(string prototype)
|
|
|
|
|
|
{
|
2020-01-24 16:10:48 -08:00
|
|
|
|
storage.Insert(_entityManager.SpawnEntity(prototype, Owner.Transform.GridPosition));
|
2019-11-23 21:39:12 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Spawn("Brutepack");
|
|
|
|
|
|
Spawn("Brutepack");
|
|
|
|
|
|
Spawn("Brutepack");
|
|
|
|
|
|
Spawn("Ointment");
|
|
|
|
|
|
Spawn("Ointment");
|
|
|
|
|
|
Spawn("Ointment");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|