dragon minor refactor and stuff (#18149)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-07-25 00:32:12 +00:00
committed by GitHub
parent 0f163beb3c
commit 88eaf7a772
8 changed files with 305 additions and 297 deletions

View File

@@ -0,0 +1,18 @@
using Content.Server.GameTicking.Rules.Components;
using Content.Server.StationEvents.Components;
namespace Content.Server.StationEvents.Events;
public sealed class RandomSpawnRule : StationEventSystem<RandomSpawnRuleComponent>
{
protected override void Started(EntityUid uid, RandomSpawnRuleComponent comp, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
base.Started(uid, comp, gameRule, args);
if (TryFindRandomTile(out _, out _, out _, out var coords))
{
Sawmill.Info($"Spawning {comp.Prototype} at {coords}");
Spawn(comp.Prototype, coords);
}
}
}