diff --git a/OpenRA.Game/Traits/Target.cs b/OpenRA.Game/Traits/Target.cs index bd0aa47018..d8c8e3fff3 100644 --- a/OpenRA.Game/Traits/Target.cs +++ b/OpenRA.Game/Traits/Target.cs @@ -130,9 +130,15 @@ namespace OpenRA.Traits if (!targetable.Any()) return new[] { actor.CenterPosition }; - var targeted = this.actor; - var positions = targetable.SelectMany(t => t.TargetablePositions(targeted)).Distinct(); - return positions.Any() ? positions : new[] { targeted.CenterPosition }; + var targetablePositions = actor.TraitOrDefault(); + if (targetablePositions != null) + { + var positions = targetablePositions.TargetablePositions(actor); + if (positions.Any()) + return positions; + } + + return new[] { actor.CenterPosition }; case TargetType.FrozenActor: return new[] { frozen.CenterPosition }; case TargetType.Terrain: diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 0421dbc3ff..bef29acbf8 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -317,11 +317,15 @@ namespace OpenRA.Traits { // Check IsTraitEnabled or !IsTraitDisabled first string[] TargetTypes { get; } - IEnumerable TargetablePositions(Actor self); bool TargetableBy(Actor self, Actor byActor); bool RequiresForceFire { get; } } + public interface ITargetablePositions + { + IEnumerable TargetablePositions(Actor self); + } + public interface INotifyStanceChanged { void StanceChanged(Actor self, Player a, Player b, diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index aa9da4dc8c..e319012def 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -293,7 +293,6 @@ - @@ -476,7 +475,7 @@ - + diff --git a/OpenRA.Mods.Common/Traits/Air/TargetableAircraft.cs b/OpenRA.Mods.Common/Traits/Air/TargetableAircraft.cs index fbd60e8003..0bb6f759f6 100644 --- a/OpenRA.Mods.Common/Traits/Air/TargetableAircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/TargetableAircraft.cs @@ -13,13 +13,13 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { - public class TargetableAircraftInfo : TargetableUnitInfo + public class TargetableAircraftInfo : TargetableInfo { public readonly string[] GroundedTargetTypes = { }; public override object Create(ActorInitializer init) { return new TargetableAircraft(init.Self, this); } } - public class TargetableAircraft : TargetableUnit + public class TargetableAircraft : Targetable { readonly TargetableAircraftInfo info; readonly Actor self; diff --git a/OpenRA.Mods.Common/Traits/Buildings/Building.cs b/OpenRA.Mods.Common/Traits/Buildings/Building.cs index ab0cdca8f5..2275addc09 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/Building.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/Building.cs @@ -116,7 +116,7 @@ namespace OpenRA.Mods.Common.Traits bool IOccupySpaceInfo.SharesCell { get { return false; } } } - public class Building : IOccupySpace, INotifySold, INotifyTransform, ISync, INotifyCreated, INotifyAddedToWorld, INotifyRemovedFromWorld + public class Building : IOccupySpace, INotifySold, INotifyTransform, ISync, INotifyCreated, INotifyAddedToWorld, INotifyRemovedFromWorld, ITargetablePositions { public readonly BuildingInfo Info; public bool BuildComplete { get; private set; } @@ -157,6 +157,11 @@ namespace OpenRA.Mods.Common.Traits Pair[] occupiedCells; public IEnumerable> OccupiedCells() { return occupiedCells; } + public IEnumerable TargetablePositions(Actor self) + { + return OccupiedCells().Select(c => self.World.Map.CenterOfCell(c.First)); + } + public void Created(Actor self) { if (SkipMakeAnimation || !self.HasTrait()) diff --git a/OpenRA.Mods.Common/Traits/Buildings/TargetableBuilding.cs b/OpenRA.Mods.Common/Traits/Buildings/TargetableBuilding.cs deleted file mode 100644 index e81b8fafbc..0000000000 --- a/OpenRA.Mods.Common/Traits/Buildings/TargetableBuilding.cs +++ /dev/null @@ -1,49 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2015 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System.Collections.Generic; -using System.Linq; -using OpenRA.Traits; - -namespace OpenRA.Mods.Common.Traits -{ - public class TargetableBuildingInfo : ITraitInfo, ITargetableInfo, Requires - { - [FieldLoader.Require] - public readonly string[] TargetTypes = { }; - public string[] GetTargetTypes() { return TargetTypes; } - - public bool RequiresForceFire = false; - - public object Create(ActorInitializer init) { return new TargetableBuilding(init.Self, this); } - } - - public class TargetableBuilding : ITargetable - { - readonly TargetableBuildingInfo info; - readonly Building building; - - public TargetableBuilding(Actor self, TargetableBuildingInfo info) - { - this.info = info; - building = self.Trait(); - } - - public string[] TargetTypes { get { return info.TargetTypes; } } - public bool TargetableBy(Actor self, Actor byActor) { return true; } - - public IEnumerable TargetablePositions(Actor self) - { - return building.OccupiedCells().Select(c => self.World.Map.CenterOfCell(c.First)); - } - - public bool RequiresForceFire { get { return info.RequiresForceFire; } } - } -} diff --git a/OpenRA.Mods.Common/Traits/TargetableUnit.cs b/OpenRA.Mods.Common/Traits/Targetable.cs similarity index 78% rename from OpenRA.Mods.Common/Traits/TargetableUnit.cs rename to OpenRA.Mods.Common/Traits/Targetable.cs index aa6c25fc6a..c7323aa7c5 100644 --- a/OpenRA.Mods.Common/Traits/TargetableUnit.cs +++ b/OpenRA.Mods.Common/Traits/Targetable.cs @@ -14,7 +14,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { [Desc("Actor can be targeted.")] - public class TargetableUnitInfo : UpgradableTraitInfo, ITargetableInfo + public class TargetableInfo : UpgradableTraitInfo, ITargetableInfo { [Desc("Target type. Used for filtering (in)valid targets.")] public readonly string[] TargetTypes = { }; @@ -22,15 +22,15 @@ namespace OpenRA.Mods.Common.Traits public bool RequiresForceFire = false; - public override object Create(ActorInitializer init) { return new TargetableUnit(init.Self, this); } + public override object Create(ActorInitializer init) { return new Targetable(init.Self, this); } } - public class TargetableUnit : UpgradableTrait, ITargetable + public class Targetable : UpgradableTrait, ITargetable { protected static readonly string[] None = new string[] { }; protected Cloak cloak; - public TargetableUnit(Actor self, TargetableUnitInfo info) + public Targetable(Actor self, TargetableInfo info) : base(info) { cloak = self.TraitOrDefault(); @@ -48,11 +48,6 @@ namespace OpenRA.Mods.Common.Traits public virtual string[] TargetTypes { get { return Info.TargetTypes; } } - public virtual IEnumerable TargetablePositions(Actor self) - { - yield return self.CenterPosition; - } - public bool RequiresForceFire { get { return Info.RequiresForceFire; } } } } diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index ab12a839f0..3d7b71b5d4 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -1965,6 +1965,17 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + if (engineVersion < 20150902) + { + if (depth == 1) + { + if (node.Key == "TargetableUnit" || node.Key == "TargetableBuilding") + node.Key = "Targetable"; + else if (node.Key == "-TargetableUnit" || node.Key == "-TargetableBuilding") + node.Key = "-Targetable"; + } + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } } diff --git a/OpenRA.Mods.RA/Traits/TargetableSubmarine.cs b/OpenRA.Mods.RA/Traits/TargetableSubmarine.cs index c5aad54b27..941caaa9fa 100644 --- a/OpenRA.Mods.RA/Traits/TargetableSubmarine.cs +++ b/OpenRA.Mods.RA/Traits/TargetableSubmarine.cs @@ -13,14 +13,14 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA.Traits { - public class TargetableSubmarineInfo : TargetableUnitInfo, Requires + public class TargetableSubmarineInfo : TargetableInfo, Requires { public readonly string[] CloakedTargetTypes = { }; public override object Create(ActorInitializer init) { return new TargetableSubmarine(init.Self, this); } } - public class TargetableSubmarine : TargetableUnit + public class TargetableSubmarine : Targetable { readonly TargetableSubmarineInfo info; diff --git a/mods/cnc/maps/nod05/map.yaml b/mods/cnc/maps/nod05/map.yaml index 95351d7f8c..7c202a329f 100644 --- a/mods/cnc/maps/nod05/map.yaml +++ b/mods/cnc/maps/nod05/map.yaml @@ -511,7 +511,7 @@ Rules: Buildable: Prerequisites: ~disabled A10: - TargetableUnit: + Targetable: Sequences: diff --git a/mods/cnc/rules/civilian.yaml b/mods/cnc/rules/civilian.yaml index ce160cf1bd..73a453b466 100644 --- a/mods/cnc/rules/civilian.yaml +++ b/mods/cnc/rules/civilian.yaml @@ -374,7 +374,7 @@ BRIDGEHUT: CustomSelectionSize: CustomBounds: 48,48 BridgeHut: - TargetableBuilding: + Targetable: TargetTypes: BridgeHut, C4 C1: diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index f5ef357ec2..115d76afc8 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -64,7 +64,7 @@ SelectionDecorations: Selectable: Bounds: 24,24 - TargetableUnit: + Targetable: TargetTypes: Ground, Vehicle Repairable: Passenger: @@ -172,7 +172,7 @@ SelectionDecorations: Selectable: Bounds: 12,17,0,-6 - TargetableUnit: + Targetable: TargetTypes: Ground, Infantry RenderSprites: QuantizeFacingsFromSequence: @@ -302,7 +302,7 @@ SelectionDecorations: Selectable: Bounds: 24,24 - TargetableUnit: + Targetable: TargetTypes: Ground HiddenUnderFog: QuantizeFacingsFromSequence: @@ -346,7 +346,7 @@ SelectionDecorations: Selectable: Bounds: 24,24 - TargetableUnit: + Targetable: TargetTypes: Ground AutoTarget: ScanRadius: 5 @@ -405,7 +405,7 @@ Water: 100 SelectionDecorations: Selectable: - TargetableUnit: + Targetable: TargetTypes: Ground, Water HiddenUnderFog: ActorLostNotification: @@ -421,7 +421,7 @@ SelectionDecorations: Selectable: Priority: 3 - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, Structure Armor: Type: Wood @@ -520,7 +520,7 @@ Tooltip: Name: Field -WithBuildingExplosion: - -TargetableBuilding: + -Targetable: -Demolishable: RenderSprites: Palette: terrain @@ -553,7 +553,7 @@ BuildSounds: hvydoor1.aud Adjacent: 7 TerrainTypes: Clear,Road - TargetableBuilding: + Targetable: TargetTypes: Ground, Wall Crushable: CrushClasses: wall @@ -662,7 +662,7 @@ AllowedTerrain: Clear, Rough, Road, Tiberium, BlueTiberium, Beach Burns: Interval: 2 - TargetableUnit: + Targetable: RequiresForceFire: yes TargetTypes: Ground, Husk Capturable: @@ -692,7 +692,7 @@ AlwaysVisible: Tooltip: Name: Bridge - TargetableBuilding: + Targetable: RequiresForceFire: yes TargetTypes: Ground, Water Health: diff --git a/mods/cnc/rules/vehicles.yaml b/mods/cnc/rules/vehicles.yaml index 4591d5b62b..31c0657e6c 100644 --- a/mods/cnc/rules/vehicles.yaml +++ b/mods/cnc/rules/vehicles.yaml @@ -528,7 +528,7 @@ STNK: AttackFrontal: AutoTarget: InitialStance: HoldFire - TargetableUnit: + Targetable: SpawnActorOnDeath: Actor: STNK.Husk -MustBeDestroyed: diff --git a/mods/d2k/rules/arrakis.yaml b/mods/d2k/rules/arrakis.yaml index 2b442e5c74..8c68b70537 100644 --- a/mods/d2k/rules/arrakis.yaml +++ b/mods/d2k/rules/arrakis.yaml @@ -34,7 +34,7 @@ sandworm: Sand: 100 Dune: 100 Spice: 100 - TargetableUnit: + Targetable: TargetTypes: Ground WithFacingSpriteBody: WithAttackOverlay: diff --git a/mods/d2k/rules/defaults.yaml b/mods/d2k/rules/defaults.yaml index a00606d90d..d00a0e2d94 100644 --- a/mods/d2k/rules/defaults.yaml +++ b/mods/d2k/rules/defaults.yaml @@ -65,7 +65,7 @@ SelectionDecorations: Selectable: Bounds: 32,32 - TargetableUnit: + Targetable: TargetTypes: Ground, Vehicle, C4 Passenger: CargoType: Vehicle @@ -130,7 +130,7 @@ AllowedTerrain: Sand, Rock, Transition, Concrete, Spice, SpiceBlobs, Dune Burns: Interval: 4 - TargetableUnit: + Targetable: TargetTypes: Ground, Vehicle RequiresForceFire: yes Capturable: @@ -188,7 +188,7 @@ SelectionDecorations: Selectable: Bounds: 12,18,0,-6 - TargetableUnit: + Targetable: TargetTypes: Ground, Infantry UpgradeTypes: parachute UpgradeMaxEnabledLevel: 0 @@ -260,7 +260,7 @@ SelectionDecorations: Selectable: Priority: 2 - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, Structure Building: Dimensions: 1,1 diff --git a/mods/d2k/rules/structures.yaml b/mods/d2k/rules/structures.yaml index d1fe88a150..ee1901cdc0 100644 --- a/mods/d2k/rules/structures.yaml +++ b/mods/d2k/rules/structures.yaml @@ -509,7 +509,7 @@ wall: NodeTypes: wall, turret LineBuildNode: Types: wall - TargetableBuilding: + Targetable: TargetTypes: Ground, Wall RenderSprites: WithWallSpriteBody: diff --git a/mods/ra/maps/allies-03a/map.yaml b/mods/ra/maps/allies-03a/map.yaml index 1db802e6ab..9e3dde8905 100644 --- a/mods/ra/maps/allies-03a/map.yaml +++ b/mods/ra/maps/allies-03a/map.yaml @@ -1382,21 +1382,15 @@ Rules: -ExternalCaptures: Captures: CaptureTypes: building - Cloak@JAIL: + Targetable: UpgradeTypes: jail - UpgradeMinEnabledLevel: 1 - InitialDelay: 0 - CloakDelay: 0 - Palette: + UpgradeMaxEnabledLevel: 0 RenderSprites: Image: E6 MEDI: - Cloak@JAIL: + Targetable: UpgradeTypes: jail - UpgradeMinEnabledLevel: 1 - InitialDelay: 0 - CloakDelay: 0 - Palette: + UpgradeMaxEnabledLevel: 0 E7.noautotarget: Inherits: E7 AutoTarget: diff --git a/mods/ra/maps/allies-03b/map.yaml b/mods/ra/maps/allies-03b/map.yaml index 04745b5ce6..079d37d80f 100644 --- a/mods/ra/maps/allies-03b/map.yaml +++ b/mods/ra/maps/allies-03b/map.yaml @@ -1278,21 +1278,15 @@ Rules: Captures: CaptureTypes: building WithInfantryBody: - Cloak@JAIL: + Targetable: UpgradeTypes: jail - UpgradeMinEnabledLevel: 1 - InitialDelay: 0 - CloakDelay: 0 - Palette: + UpgradeMaxEnabledLevel: 0 RenderSprites: Image: E6 MEDI: - Cloak@JAIL: + Targetable: UpgradeTypes: jail - UpgradeMinEnabledLevel: 1 - InitialDelay: 0 - CloakDelay: 0 - Palette: + UpgradeMaxEnabledLevel: 0 E7.noautotarget: Inherits: E7 AutoTarget: @@ -1385,7 +1379,7 @@ Rules: -Selectable: -Demolishable: -Huntable: - -TargetableUnit: + -Targetable: -Armament: -WithMuzzleFlash: Cargo: diff --git a/mods/ra/maps/allies-05a/map.yaml b/mods/ra/maps/allies-05a/map.yaml index 48e58ce393..9dd53ff6e1 100644 --- a/mods/ra/maps/allies-05a/map.yaml +++ b/mods/ra/maps/allies-05a/map.yaml @@ -1651,7 +1651,7 @@ Rules: Prerequisites: ~disabled LST: -Selectable: - TargetableUnit: + Targetable: TargetTypes: Ground, Water Tooltip: GenericVisibility: Enemy @@ -1696,13 +1696,13 @@ Rules: ShowOwnerRow: false WEAP: -InfiltrateForSupportPower: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure, Mission Objectives MISS: Tooltip: Name: Prison ShowOwnerRow: False - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure, Mission Objectives E7.noautotarget: Inherits: E7 diff --git a/mods/ra/maps/koth-hopes-anchor/map.yaml b/mods/ra/maps/koth-hopes-anchor/map.yaml index d413d0e478..50174a9578 100644 --- a/mods/ra/maps/koth-hopes-anchor/map.yaml +++ b/mods/ra/maps/koth-hopes-anchor/map.yaml @@ -644,7 +644,7 @@ Rules: DamageMultiplier@INVULNERABLE: Modifier: 0 -Selectable: - -TargetableBuilding: + -Targetable: Player: StrategicVictoryConditions: TicksToHold: 3000 diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index 011807840e..949cf039f8 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -2241,7 +2241,7 @@ Rules: RenderSprites: Image: DOME -InfiltrateForExploration: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, MissionObjective SPY: Infiltrates: diff --git a/mods/ra/maps/survival01/map.yaml b/mods/ra/maps/survival01/map.yaml index 9740347103..5cabc1f8bb 100644 --- a/mods/ra/maps/survival01/map.yaml +++ b/mods/ra/maps/survival01/map.yaml @@ -1282,7 +1282,7 @@ Rules: Power: Amount: 0 -Selectable: - -TargetableBuilding: + -Targetable: -GivesBuildableArea: -Huntable: RenderSprites: diff --git a/mods/ra/rules/civilian.yaml b/mods/ra/rules/civilian.yaml index d9b74437af..e49ce53d38 100644 --- a/mods/ra/rules/civilian.yaml +++ b/mods/ra/rules/civilian.yaml @@ -242,7 +242,7 @@ V19.Husk: Sequence: fire-loop -Health: -Selectable: - -TargetableBuilding: + -Targetable: -Demolishable: BARL: @@ -259,7 +259,7 @@ BARL: AutoTargetIgnore: Armor: Type: None - TargetableBuilding: + Targetable: TargetTypes: Ground, DemoTruck -ShakeOnDeath: -SoundOnDamageTransition: @@ -279,7 +279,7 @@ BRL3: AutoTargetIgnore: Armor: Type: None - TargetableBuilding: + Targetable: TargetTypes: Ground, DemoTruck -ShakeOnDeath: -SoundOnDamageTransition: @@ -497,7 +497,7 @@ BRIDGEHUT: CustomSelectionSize: CustomBounds: 48,48 BridgeHut: - TargetableBuilding: + Targetable: TargetTypes: BridgeHut, C4 BRIDGEHUT.small: @@ -508,7 +508,7 @@ BRIDGEHUT.small: CustomSelectionSize: CustomBounds: 24,24 BridgeHut: - TargetableBuilding: + Targetable: TargetTypes: BridgeHut, C4 V20: diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index 1d39ccdaea..83d2b684fe 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -77,7 +77,7 @@ SelectionDecorations: Selectable: Bounds: 24, 24 - TargetableUnit: + Targetable: TargetTypes: Ground, Repair, Vehicle UpgradeTypes: parachute UpgradeMaxEnabledLevel: 0 @@ -149,7 +149,7 @@ Ore: 70 Gems: 70 Beach: 70 - TargetableUnit: + Targetable: TargetTypes: Ground, C4, Repair, Tank ProximityCaptor: Types: Tank @@ -181,7 +181,7 @@ SelectionDecorations: Selectable: Bounds: 12,18,0,-8 - TargetableUnit: + Targetable: TargetTypes: Ground, Infantry, Disguise UpgradeTypes: parachute UpgradeMaxEnabledLevel: 0 @@ -299,7 +299,7 @@ SelectionDecorations: Selectable: Bounds: 24,24 - TargetableUnit: + Targetable: TargetTypes: Ground, Water, Repair HiddenUnderFog: AttackMove: @@ -385,7 +385,7 @@ SelectionDecorations: Selectable: Priority: 3 - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure Building: Dimensions: 1,1 @@ -433,7 +433,7 @@ ^Defense: Inherits: ^Building - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure, Defense MustBeDestroyed: RequiredForShortGame: false @@ -462,7 +462,7 @@ NodeTypes: wall LineBuildNode: Types: wall - TargetableBuilding: + Targetable: TargetTypes: Ground, DetonateAttack, Wall RenderSprites: Palette: effect @@ -518,7 +518,7 @@ AutoTargetIgnore: Armor: Type: Light - TargetableBuilding: + Targetable: TargetTypes: Ground, DetonateAttack ^CivBuilding: @@ -533,7 +533,7 @@ -Selectable: Tooltip: Name: Field - -TargetableBuilding: + -Targetable: -Demolishable: ProximityCaptor: Types: CivilianField @@ -598,7 +598,7 @@ TransformOnCapture: ForceHealthPercentage: 25 DisabledOverlay: - TargetableUnit: + Targetable: TargetTypes: Ground, Husk RequiresForceFire: true Chronoshiftable: @@ -625,7 +625,7 @@ AlwaysVisible: Tooltip: Name: Bridge - TargetableBuilding: + Targetable: TargetTypes: Ground, Water RequiresForceFire: true Building: diff --git a/mods/ra/rules/fakes.yaml b/mods/ra/rules/fakes.yaml index ee8d3226a6..03156e202c 100644 --- a/mods/ra/rules/fakes.yaml +++ b/mods/ra/rules/fakes.yaml @@ -57,7 +57,7 @@ SYRF: GenericName: Shipyard GenericVisibility: Enemy GenericStancePrefix: False - TargetableBuilding: + Targetable: TargetTypes: Ground, Water Building: Footprint: xxx xxx xxx @@ -73,7 +73,7 @@ SYRF: SPEF: Inherits: ^FakeBuilding - TargetableBuilding: + Targetable: TargetTypes: Ground, Water Buildable: BuildPaletteOrder: 910 diff --git a/mods/ra/rules/infantry.yaml b/mods/ra/rules/infantry.yaml index 3e146ea846..bb368b3588 100644 --- a/mods/ra/rules/infantry.yaml +++ b/mods/ra/rules/infantry.yaml @@ -32,7 +32,7 @@ DOG: Voice: Attack AttackMove: Voice: Move - TargetableUnit: + Targetable: TargetTypes: Ground, Infantry WithInfantryBody: AttackSequence: shoot @@ -587,7 +587,7 @@ Ant: AttackSequence: bite Armament: Weapon: mandible - TargetableUnit: + Targetable: TargetTypes: Ground, Infantry WithDeathAnimation: UseDeathTypeSuffix: false diff --git a/mods/ra/rules/misc.yaml b/mods/ra/rules/misc.yaml index ecf82012b5..29306efdf3 100644 --- a/mods/ra/rules/misc.yaml +++ b/mods/ra/rules/misc.yaml @@ -22,7 +22,7 @@ MINP: Name: Mine ProximityCaptor: Types: Mine - TargetableUnit: + Targetable: TargetTypes: Ground BodyOrientation: QuantizedFacings: 1 @@ -53,7 +53,7 @@ MINV: Name: Mine ProximityCaptor: Types: Mine - TargetableUnit: + Targetable: TargetTypes: Ground BodyOrientation: QuantizedFacings: 1 @@ -431,5 +431,5 @@ CTFLAG: DamageMultiplier@INVULNERABLE: Modifier: 0 -Selectable: - -TargetableBuilding: + -Targetable: diff --git a/mods/ra/rules/ships.yaml b/mods/ra/rules/ships.yaml index 88a30d1686..1ae7d98ce6 100644 --- a/mods/ra/rules/ships.yaml +++ b/mods/ra/rules/ships.yaml @@ -19,7 +19,7 @@ SS: Speed: 71 RevealsShroud: Range: 6c0 - -TargetableUnit: + -Targetable: TargetableSubmarine: TargetTypes: Ground, Water, Repair CloakedTargetTypes: Underwater, Repair @@ -68,7 +68,7 @@ MSUB: Speed: 42 RevealsShroud: Range: 6c0 - -TargetableUnit: + -Targetable: TargetableSubmarine: TargetTypes: Ground, Water, Repair CloakedTargetTypes: Underwater, Repair diff --git a/mods/ra/rules/structures.yaml b/mods/ra/rules/structures.yaml index 851f536b3c..27c6662fbd 100644 --- a/mods/ra/rules/structures.yaml +++ b/mods/ra/rules/structures.yaml @@ -100,7 +100,7 @@ SPEN: Queue: Building BuildPaletteOrder: 50 Prerequisites: anypower, ~structures.soviet, ~techlevel.low - TargetableBuilding: + Targetable: TargetTypes: Ground, Water, C4, DetonateAttack, SpyInfiltrate Building: Footprint: xxx xxx xxx @@ -181,7 +181,7 @@ SYRD: Tooltip: Name: Shipyard Description: Produces and repairs ships\nand transports. - TargetableBuilding: + Targetable: TargetTypes: Ground, Water, C4, DetonateAttack, SpyInfiltrate Building: Footprint: xxx xxx xxx @@ -476,7 +476,7 @@ DOME: Building: Footprint: xx xx Dimensions: 2,2 - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate RequiresPower: CanPowerDown: @@ -823,7 +823,7 @@ WEAP: Power: Amount: -30 ProvidesPrerequisite@buildingname: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate InfiltrateForSupportPower: Proxy: vehicles.upgraded @@ -920,7 +920,7 @@ PROC: Bounds: 72,50,0,12 SelectionDecorations: VisualBounds: 72,70,0,-2 - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate Health: HP: 900 @@ -1050,7 +1050,7 @@ HPAD: RequiresPrerequisites: structures.germany Prerequisite: aircraft.germany ProvidesPrerequisite@buildingname: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate InfiltrateForSupportPower: Proxy: aircraft.upgraded @@ -1159,7 +1159,7 @@ AFLD: Power: Amount: -20 ProvidesPrerequisite@buildingname: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate InfiltrateForSupportPower: Proxy: aircraft.upgraded @@ -1191,7 +1191,7 @@ POWR: Amount: 100 InfiltrateForPowerOutage: AffectedByPowerOutage: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate ScalePowerWithHealth: DisabledOverlay: @@ -1232,7 +1232,7 @@ APWR: Amount: 200 InfiltrateForPowerOutage: AffectedByPowerOutage: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate ScalePowerWithHealth: DisabledOverlay: @@ -1332,7 +1332,7 @@ BARR: ProvidesPrerequisite@buildingname: InfiltrateForSupportPower: Proxy: barracks.upgraded - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate KENN: @@ -1439,7 +1439,7 @@ TENT: ProvidesPrerequisite@buildingname: InfiltrateForSupportPower: Proxy: barracks.upgraded - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate FIX: diff --git a/mods/ra/rules/vehicles.yaml b/mods/ra/rules/vehicles.yaml index e5c7946ab8..5d28012b62 100644 --- a/mods/ra/rules/vehicles.yaml +++ b/mods/ra/rules/vehicles.yaml @@ -699,7 +699,7 @@ QTNK: VisualBounds: 44,38,0,-4 MadTank: -EjectOnDeath: - TargetableUnit: + Targetable: TargetTypes: Ground, MADTank, Repair STNK: diff --git a/mods/ts/rules/civilian-infantry.yaml b/mods/ts/rules/civilian-infantry.yaml index 3227e19cb5..6affd0532c 100644 --- a/mods/ts/rules/civilian-infantry.yaml +++ b/mods/ts/rules/civilian-infantry.yaml @@ -225,7 +225,7 @@ DOGGIE: Speed: 113 Voiced: VoiceSet: Fiend - TargetableUnit: + Targetable: TargetTypes: Ground Armament: Weapon: FiendShard diff --git a/mods/ts/rules/defaults.yaml b/mods/ts/rules/defaults.yaml index 7be22e3350..b7b3ce04a6 100644 --- a/mods/ts/rules/defaults.yaml +++ b/mods/ts/rules/defaults.yaml @@ -71,7 +71,7 @@ Palette: pips Selectable: Priority: 3 - TargetableBuilding: + Targetable: TargetTypes: Ground, Building, C4 Building: Dimensions: 1,1 @@ -187,7 +187,7 @@ NodeTypes: wall LineBuildNode: Types: wall - TargetableBuilding: + Targetable: TargetTypes: Ground, Wall, C4 RenderSprites: AutoSelectionSize: @@ -252,7 +252,7 @@ Bounds: 14,23,-1,-9 Voiced: VoiceSet: Infantry - TargetableUnit: + Targetable: TargetTypes: Ground, Infantry QuantizeFacingsFromSequence: Sequence: stand @@ -378,7 +378,7 @@ Palette: pips Voiced: VoiceSet: Vehicle - TargetableUnit: + Targetable: TargetTypes: Ground, Vehicle, Repair Repairable: RepairBuildings: gadept @@ -520,7 +520,7 @@ Palette: pips Selectable: Bounds: 26,26,0,-3 - TargetableUnit: + Targetable: TargetTypes: Ground AttackMove: HiddenUnderFog: @@ -651,7 +651,7 @@ SelectionDecorations: Palette: pips Selectable: - TargetableBuilding: + Targetable: TargetTypes: Ground, Repair Guardable: HiddenUnderFog: @@ -681,7 +681,7 @@ Palette: pips Voiced: VoiceSet: Vehicle - TargetableUnit: + Targetable: TargetTypes: Ground, Vehicle Passenger: CargoType: Infantry diff --git a/mods/ts/rules/gdi-structures.yaml b/mods/ts/rules/gdi-structures.yaml index 19c49c311a..259074a9e4 100644 --- a/mods/ts/rules/gdi-structures.yaml +++ b/mods/ts/rules/gdi-structures.yaml @@ -30,7 +30,7 @@ GAPOWR: Amount: 100 InfiltrateForPowerOutage: AffectedByPowerOutage: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate ScalePowerWithHealth: DisabledOverlay: @@ -288,7 +288,7 @@ GARADR: WithIdleOverlay@DISH: Sequence: idle-dish PauseOnLowPower: yes - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, SpyInfiltrate Power: Amount: -50 diff --git a/mods/ts/rules/nod-structures.yaml b/mods/ts/rules/nod-structures.yaml index bf0088f44c..7ed141a510 100644 --- a/mods/ts/rules/nod-structures.yaml +++ b/mods/ts/rules/nod-structures.yaml @@ -28,7 +28,7 @@ NAPOWR: Amount: 100 InfiltrateForPowerOutage: AffectedByPowerOutage: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate ScalePowerWithHealth: DisabledOverlay: @@ -65,7 +65,7 @@ NAAPWR: Amount: 200 InfiltrateForPowerOutage: AffectedByPowerOutage: - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate ScalePowerWithHealth: DisabledOverlay: @@ -243,7 +243,7 @@ NARADR: WithIdleOverlay@DISH: Sequence: idle-dish PauseOnLowPower: yes - TargetableBuilding: + Targetable: TargetTypes: Ground, C4, SpyInfiltrate Power: Amount: -50