Medkits are now a container plus filled version (#457)
This commit is contained in:
committed by
Pieter-Jan Briers
parent
0cf34d2d26
commit
4198b6dc4e
@@ -0,0 +1,35 @@
|
||||
using Robust.Server.Interfaces.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Random;
|
||||
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));
|
||||
}
|
||||
|
||||
Spawn("Brutepack");
|
||||
Spawn("Brutepack");
|
||||
Spawn("Brutepack");
|
||||
Spawn("Ointment");
|
||||
Spawn("Ointment");
|
||||
Spawn("Ointment");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user