diff --git a/Content.Server/_DV/CosmicCult/Components/CosmicEffigyConditionComponent.cs b/Content.Server/_DV/CosmicCult/Components/CosmicEffigyConditionComponent.cs index 430aae8bd6..78f9fc7722 100644 --- a/Content.Server/_DV/CosmicCult/Components/CosmicEffigyConditionComponent.cs +++ b/Content.Server/_DV/CosmicCult/Components/CosmicEffigyConditionComponent.cs @@ -1,3 +1,5 @@ +using Content.Shared.Whitelist; + namespace Content.Server.Objectives.Components; [RegisterComponent] @@ -5,4 +7,11 @@ public sealed partial class CosmicEffigyConditionComponent : Component { [DataField] public EntityUid? EffigyTarget; + + /// + /// Tags that should be used to exclude Warp Points + /// from the list of valid effigy targets + /// + [DataField] + public EntityWhitelist? Blacklist; } diff --git a/Content.Server/_DV/CosmicCult/CosmicCultObjectiveSystem.cs b/Content.Server/_DV/CosmicCult/CosmicCultObjectiveSystem.cs index 1f3c251538..53a3aaa77c 100644 --- a/Content.Server/_DV/CosmicCult/CosmicCultObjectiveSystem.cs +++ b/Content.Server/_DV/CosmicCult/CosmicCultObjectiveSystem.cs @@ -4,6 +4,7 @@ using Content.Shared.Ninja.Components; using Content.Shared.Objectives.Components; using Content.Shared.Roles; using Content.Shared.Warps; +using Content.Shared.Whitelist; using Robust.Shared.Random; namespace Content.Server.Objectives.Systems; @@ -14,6 +15,7 @@ public sealed class CosmicCultObjectiveSystem : EntitySystem [Dependency] private readonly NumberObjectiveSystem _number = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly SharedRoleSystem _roles = default!; + [Dependency] private readonly EntityWhitelistSystem _whitelist = default!; public override void Initialize() { @@ -35,10 +37,13 @@ public sealed class CosmicCultObjectiveSystem : EntitySystem var warps = new List(); var query = EntityQueryEnumerator(); + var effigyBlacklist = comp.Blacklist; + // TODO: Add a blacklist comp to this like ninja now has from upstream #40726 while (query.MoveNext(out var warpUid, out var warp)) { - if (warp.Location != null) + if (_whitelist.IsBlacklistFail(effigyBlacklist, warpUid) + && !string.IsNullOrWhiteSpace(warp?.Location)) { warps.Add(warpUid); } diff --git a/Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml b/Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml index 15f67245f1..68ba55ec7e 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml @@ -39,6 +39,9 @@ blacklist: tags: - GhostOnlyWarp + - type: Tag # DeltaV - Prevent the warp point from being chosen for bombing/effigy targets + tags: + - GhostOnlyWarp - type: entity id: ImmovableRodDespawn diff --git a/Resources/Prototypes/_DV/CosmicCult/Mobs/colossus.yml b/Resources/Prototypes/_DV/CosmicCult/Mobs/colossus.yml index dceeb634ef..e00bb5c855 100644 --- a/Resources/Prototypes/_DV/CosmicCult/Mobs/colossus.yml +++ b/Resources/Prototypes/_DV/CosmicCult/Mobs/colossus.yml @@ -85,6 +85,9 @@ - FlyingMobLayer - type: WarpPoint follow: true + blacklist: + tags: + - GhostOnlyWarp - type: Body requiredLegs: 0 - type: Emoting @@ -118,6 +121,7 @@ - CannotSuicide - DoorBumpOpener - Unimplantable + - GhostOnlyWarp # Prevents it from being warped to or being a warp location bombing target - type: Damageable damageContainer: InorganicMetaphysical damageModifierSet: EntropicColossus diff --git a/Resources/Prototypes/_DV/CosmicCult/Mobs/cosmicgod.yml b/Resources/Prototypes/_DV/CosmicCult/Mobs/cosmicgod.yml index b0bebf399e..0de6e87215 100644 --- a/Resources/Prototypes/_DV/CosmicCult/Mobs/cosmicgod.yml +++ b/Resources/Prototypes/_DV/CosmicCult/Mobs/cosmicgod.yml @@ -92,6 +92,9 @@ - type: CanMoveInAir - type: WarpPoint follow: true + blacklist: + tags: + - GhostOnlyWarp location: The Unknown - type: CosmicGod - type: CosmicCultExamine @@ -122,3 +125,6 @@ raffle: settings: short - type: GhostTakeoverAvailable + - type: Tag + tags: + - GhostOnlyWarp diff --git a/Resources/Prototypes/_DV/CosmicCult/Tileset/effigy.yml b/Resources/Prototypes/_DV/CosmicCult/Tileset/effigy.yml index 73f1677dfe..22f0154b77 100644 --- a/Resources/Prototypes/_DV/CosmicCult/Tileset/effigy.yml +++ b/Resources/Prototypes/_DV/CosmicCult/Tileset/effigy.yml @@ -112,3 +112,9 @@ - MobCosmicLodestarHostile - type: WarpPoint follow: true + blacklist: + tags: + - GhostOnlyWarp + - type: Tag + tags: + - GhostOnlyWarp diff --git a/Resources/Prototypes/_DV/CosmicCult/Tileset/monument.yml b/Resources/Prototypes/_DV/CosmicCult/Tileset/monument.yml index 832ce0ced0..58cc55d09b 100644 --- a/Resources/Prototypes/_DV/CosmicCult/Tileset/monument.yml +++ b/Resources/Prototypes/_DV/CosmicCult/Tileset/monument.yml @@ -99,12 +99,19 @@ - CosmicCult - type: WarpPoint location: The Monument + blacklist: + tags: + - GhostOnlyWarp - type: CosmicCultExamine cultistText: cosmic-examine-text-forthecult - type: CosmicCorrupting corruptionReduction: 0.01 enabled: false floodFillStarting: true + - type: Tag + tags: + - Structure # Parent has this tag + - GhostOnlyWarp ########### SPAWN-IN ANIMATION ############# diff --git a/Resources/Prototypes/_DV/CosmicCult/objectives.yml b/Resources/Prototypes/_DV/CosmicCult/objectives.yml index d22664cfea..97c7407299 100644 --- a/Resources/Prototypes/_DV/CosmicCult/objectives.yml +++ b/Resources/Prototypes/_DV/CosmicCult/objectives.yml @@ -108,3 +108,7 @@ sprite: _DV/CosmicCult/Icons/objectives.rsi state: effigy - type: CosmicEffigyCondition + blacklist: + tags: + - GhostOnlyWarp + - NinjaBombingTargetBlocker # Use the same blacklist as ninja