* Fix namespaces and optimize imports * Cleanup fixes * Merge conflict fixes * Merge conflict fixes * Merge conflict fixes
35 lines
985 B
C#
35 lines
985 B
C#
using Robust.Server.Interfaces.GameObjects;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Interfaces.GameObjects;
|
|
using Robust.Shared.IoC;
|
|
|
|
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)
|
|
{
|
|
storage.Insert(_entityManager.SpawnEntity(prototype, Owner.Transform.GridPosition));
|
|
}
|
|
|
|
Spawn("Brutepack");
|
|
Spawn("Brutepack");
|
|
Spawn("Brutepack");
|
|
Spawn("Ointment");
|
|
Spawn("Ointment");
|
|
Spawn("Ointment");
|
|
}
|
|
}
|
|
}
|