using Content.Server.Ninja.Systems;
using Content.Server.Objectives.Systems;
+using Content.Shared.Whitelist;
namespace Content.Server.Objectives.Components;
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public EntityUid? Target;
+
+ /// <summary>
+ /// Tags that should be used to exclude Warp Points
+ /// from the list of valid bombing targets
+ /// </summary>
+ [DataField]
+ public EntityWhitelist? Blacklist;
}
using Content.Server.Objectives.Components;
using Content.Shared.Objectives.Components;
-using Content.Shared.Ninja.Components;
using Content.Shared.Roles;
using Content.Shared.Roles.Components;
using Content.Shared.Warps;
+using Content.Shared.Whitelist;
using Robust.Shared.Random;
namespace Content.Server.Objectives.Systems;
/// </summary>
public sealed class NinjaConditionsSystem : EntitySystem
{
+ [Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
[Dependency] private readonly NumberObjectiveSystem _number = default!;
[Dependency] private readonly IRobustRandom _random = default!;
// choose spider charge detonation point
var warps = new List<EntityUid>();
- var query = EntityQueryEnumerator<BombingTargetComponent, WarpPointComponent>();
- while (query.MoveNext(out var warpUid, out _, out var warp))
+ var allEnts = EntityQueryEnumerator<WarpPointComponent>();
+ var bombingBlacklist = comp.Blacklist;
+
+ while (allEnts.MoveNext(out var warpUid, out var warp))
{
- if (warp.Location != null)
+ if (_whitelist.IsBlacklistFail(bombingBlacklist, warpUid)
+ && !string.IsNullOrWhiteSpace(warp.Location))
{
warps.Add(warpUid);
}
components:
- type: NavMapBeacon
defaultText: station-beacon-solars
+ - type: Tag
+ tags:
+ - NinjaBombingTargetBlocker
- type: entity
parent: DefaultStationBeaconEngineering
components:
- type: NavMapBeacon
defaultText: station-beacon-arrivals
+ - type: Tag
+ tags:
+ - NinjaBombingTargetBlocker
- type: entity
parent: DefaultStationBeacon
components:
- type: NavMapBeacon
defaultText: station-beacon-cryosleep
+ - type: Tag
+ tags:
+ - NinjaBombingTargetBlocker
- type: entity
parent: DefaultStationBeacon