using Content.Server.GameTicking.Rules.VariationPass.Components;
using Content.Server.Power.Components;
using Content.Server.Wires;
using Content.Shared.Whitelist;
using Robust.Shared.Random;
namespace Content.Server.GameTicking.Rules.VariationPass;
///
/// Handles unpowering stuff around the station.
/// This system identifies target devices and adds to them.
/// The actual wire cutting is handled by .
///
public sealed class UnpowerAllVariationPassSystem : VariationPassSystem
{
protected override void ApplyVariation(Entity ent, ref StationVariationPassEvent args)
{
var query = AllEntityQuery();
while (query.MoveNext(out var uid, out _, out var transform))
{
// Ignore if not part of the station
if (!IsMemberOfStation((uid, transform), ref args))
continue;
EnsureComp(uid);
}
}
}