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

@@ -236,7 +236,6 @@ namespace Content.Client.Entry
"MorgueEntityStorage",
"MorgueTray",
"CrematoriumEntityStorage",
"RandomArcade",
"RandomSpriteState",
"DebugEquip",
"InnateActions",

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();
}
}
}

View File

@@ -71,6 +71,7 @@ namespace Content.Server.GameTicking.Commands
shell.ExecuteCommand("aghost");
shell.ExecuteCommand($"tp 0 0 {mapId}");
shell.RemoteExecuteCommand("showmarkers");
var newGrid = mapManager.GetAllGrids().OrderByDescending(g => (int) g.Index).First();
var pauseManager = IoCManager.Resolve<IPauseManager>();

View File

@@ -3,8 +3,12 @@
name: random arcade spawner
parent: MarkerBase
components:
- type: RandomArcade
- type: Sprite
layers:
- state: red
- texture: Structures/Machines/arcade.rsi/arcade.png
- type: RandomSpawner
prototypes:
- BlockGameArcade
- SpaceVillainArcade
chance: 1

View File

@@ -0,0 +1,29 @@
- type: entity
id: RandomInstruments
name: random instruments spawner
parent: MarkerBase
components:
- type: Sprite
layers:
- state: red
- texture: Objects/Fun/Instruments/h_synthesizer.rsi/icon.png
- type: RandomSpawner
prototypes:
- AcousticGuitarInstrument
- ViolinInstrument
- TrumpetInstrument
- ElectricGuitarInstrument
- AccordionInstrument
- HarmonicaInstrument
- TromboneInstrument
- SaxophoneInstrument
- BanjoInstrument
- GlockenspielInstrument
- XylophoneInstrument
- BikeHornInstrument
- RecorderInstrument
chance: 0.95
rarePrototypes:
- SynthesizerInstrument
- GunpetInstrument
rareChance: 0.05

View File

@@ -0,0 +1,20 @@
- type: entity
id: RandomSoap
name: random soap spawner
parent: MarkerBase
components:
- type: Sprite
layers:
- state: red
- texture: Objects/Specific/Janitorial/soap.rsi/soap.png
- type: RandomSpawner
prototypes:
- Soap
- SoapHomemade
- SoapNT
- SoapDeluxe
chance: 0.95
rarePrototypes:
- SoapSyndie
- SoapOmega
rareChance: 0.05