Clean and add spawners (#5520)

This commit is contained in:
AJCM-git
2021-11-25 18:36:57 -04:00
committed by GitHub
parent 4b76ca6822
commit 2ea7c55e93
6 changed files with 55 additions and 31 deletions

View File

@@ -1,29 +0,0 @@
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Random;
namespace Content.Server.Arcade.Components
{
[RegisterComponent]
public class RandomArcadeGameComponent : Component, IMapInit
{
public override string Name => "RandomArcade";
public void MapInit()
{
var arcades = new[]
{
"BlockGameArcade",
"SpaceVillainArcade"
};
var entityManager = IoCManager.Resolve<IEntityManager>();
entityManager.SpawnEntity(
IoCManager.Resolve<IRobustRandom>().Pick(arcades),
Owner.Transform.Coordinates);
Owner.Delete();
}
}
}