Фикс метеоритов в тюрьме
This commit is contained in:
parent
a7a02e82a9
commit
78980349cd
4 changed files with 25 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Numerics;
|
||||
using Content.Server._Sunrise.Station;
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.GameTicking.Rules;
|
||||
using Content.Server.Station.Components;
|
||||
|
|
@ -36,8 +37,17 @@ public sealed class MeteorSwarmSystem : GameRuleSystem<MeteorSwarmComponent>
|
|||
|
||||
component.NextWaveTime += TimeSpan.FromSeconds(component.WaveCooldown.Next(RobustRandom));
|
||||
|
||||
var stations = _station.GetStations();
|
||||
|
||||
if (_station.GetStations().Count == 0)
|
||||
var validStations = new List<EntityUid>();
|
||||
|
||||
foreach (var entityUid in stations)
|
||||
{
|
||||
if (HasComp<StationMeteorSwarmTargetComponent>(entityUid))
|
||||
validStations.Add(entityUid);
|
||||
}
|
||||
|
||||
if (validStations.Count == 0)
|
||||
return;
|
||||
|
||||
var station = RobustRandom.Pick(_station.GetStations());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
namespace Content.Server._Sunrise.Station;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class StationMeteorSwarmTargetComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
- BaseStationGammaArmory
|
||||
- BaseStationAntagsTargets
|
||||
- BaseStationCryoTeleport
|
||||
- BaseStationMeteorSwarmTarget
|
||||
# Sunrise-End
|
||||
noSpawn: true
|
||||
components:
|
||||
|
|
|
|||
|
|
@ -116,3 +116,9 @@
|
|||
abstract: true
|
||||
components:
|
||||
- type: StationCryoTeleport
|
||||
|
||||
- type: entity
|
||||
id: BaseStationMeteorSwarmTarget
|
||||
abstract: true
|
||||
components:
|
||||
- type: StationMeteorSwarmTargetComponent
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue