Add ITargetablePositions seperating it from ITargetable

This commit is contained in:
atlimit8
2015-07-13 15:22:39 -05:00
parent f5c3575c5a
commit 23d0424437
34 changed files with 124 additions and 165 deletions

View File

@@ -130,9 +130,15 @@ namespace OpenRA.Traits
if (!targetable.Any()) if (!targetable.Any())
return new[] { actor.CenterPosition }; return new[] { actor.CenterPosition };
var targeted = this.actor; var targetablePositions = actor.TraitOrDefault<ITargetablePositions>();
var positions = targetable.SelectMany(t => t.TargetablePositions(targeted)).Distinct(); if (targetablePositions != null)
return positions.Any() ? positions : new[] { targeted.CenterPosition }; {
var positions = targetablePositions.TargetablePositions(actor);
if (positions.Any())
return positions;
}
return new[] { actor.CenterPosition };
case TargetType.FrozenActor: case TargetType.FrozenActor:
return new[] { frozen.CenterPosition }; return new[] { frozen.CenterPosition };
case TargetType.Terrain: case TargetType.Terrain:

View File

@@ -317,11 +317,15 @@ namespace OpenRA.Traits
{ {
// Check IsTraitEnabled or !IsTraitDisabled first // Check IsTraitEnabled or !IsTraitDisabled first
string[] TargetTypes { get; } string[] TargetTypes { get; }
IEnumerable<WPos> TargetablePositions(Actor self);
bool TargetableBy(Actor self, Actor byActor); bool TargetableBy(Actor self, Actor byActor);
bool RequiresForceFire { get; } bool RequiresForceFire { get; }
} }
public interface ITargetablePositions
{
IEnumerable<WPos> TargetablePositions(Actor self);
}
public interface INotifyStanceChanged public interface INotifyStanceChanged
{ {
void StanceChanged(Actor self, Player a, Player b, void StanceChanged(Actor self, Player a, Player b,

View File

@@ -293,7 +293,6 @@
<Compile Include="Traits\Buildings\RepairableBuilding.cs" /> <Compile Include="Traits\Buildings\RepairableBuilding.cs" />
<Compile Include="Traits\Buildings\RepairsUnits.cs" /> <Compile Include="Traits\Buildings\RepairsUnits.cs" />
<Compile Include="Traits\Buildings\Reservable.cs" /> <Compile Include="Traits\Buildings\Reservable.cs" />
<Compile Include="Traits\Buildings\TargetableBuilding.cs" />
<Compile Include="Traits\Burns.cs" /> <Compile Include="Traits\Burns.cs" />
<Compile Include="Traits\C4Demolition.cs" /> <Compile Include="Traits\C4Demolition.cs" />
<Compile Include="Traits\VeteranProductionIconOverlay.cs" /> <Compile Include="Traits\VeteranProductionIconOverlay.cs" />
@@ -476,7 +475,7 @@
<Compile Include="Traits\SupportPowers\SupportPower.cs" /> <Compile Include="Traits\SupportPowers\SupportPower.cs" />
<Compile Include="Traits\SupportPowers\SupportPowerManager.cs" /> <Compile Include="Traits\SupportPowers\SupportPowerManager.cs" />
<Compile Include="Traits\SupportPowers\SpawnActorPower.cs" /> <Compile Include="Traits\SupportPowers\SpawnActorPower.cs" />
<Compile Include="Traits\TargetableUnit.cs" /> <Compile Include="Traits\Targetable.cs" />
<Compile Include="Traits\ThrowsParticle.cs" /> <Compile Include="Traits\ThrowsParticle.cs" />
<Compile Include="Traits\Tooltip.cs" /> <Compile Include="Traits\Tooltip.cs" />
<Compile Include="Traits\TransformOnCapture.cs" /> <Compile Include="Traits\TransformOnCapture.cs" />

View File

@@ -13,13 +13,13 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
public class TargetableAircraftInfo : TargetableUnitInfo public class TargetableAircraftInfo : TargetableInfo
{ {
public readonly string[] GroundedTargetTypes = { }; public readonly string[] GroundedTargetTypes = { };
public override object Create(ActorInitializer init) { return new TargetableAircraft(init.Self, this); } public override object Create(ActorInitializer init) { return new TargetableAircraft(init.Self, this); }
} }
public class TargetableAircraft : TargetableUnit public class TargetableAircraft : Targetable
{ {
readonly TargetableAircraftInfo info; readonly TargetableAircraftInfo info;
readonly Actor self; readonly Actor self;

View File

@@ -116,7 +116,7 @@ namespace OpenRA.Mods.Common.Traits
bool IOccupySpaceInfo.SharesCell { get { return false; } } 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 readonly BuildingInfo Info;
public bool BuildComplete { get; private set; } public bool BuildComplete { get; private set; }
@@ -157,6 +157,11 @@ namespace OpenRA.Mods.Common.Traits
Pair<CPos, SubCell>[] occupiedCells; Pair<CPos, SubCell>[] occupiedCells;
public IEnumerable<Pair<CPos, SubCell>> OccupiedCells() { return occupiedCells; } public IEnumerable<Pair<CPos, SubCell>> OccupiedCells() { return occupiedCells; }
public IEnumerable<WPos> TargetablePositions(Actor self)
{
return OccupiedCells().Select(c => self.World.Map.CenterOfCell(c.First));
}
public void Created(Actor self) public void Created(Actor self)
{ {
if (SkipMakeAnimation || !self.HasTrait<WithMakeAnimation>()) if (SkipMakeAnimation || !self.HasTrait<WithMakeAnimation>())

View File

@@ -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<BuildingInfo>
{
[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<Building>();
}
public string[] TargetTypes { get { return info.TargetTypes; } }
public bool TargetableBy(Actor self, Actor byActor) { return true; }
public IEnumerable<WPos> TargetablePositions(Actor self)
{
return building.OccupiedCells().Select(c => self.World.Map.CenterOfCell(c.First));
}
public bool RequiresForceFire { get { return info.RequiresForceFire; } }
}
}

View File

@@ -14,7 +14,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Actor can be targeted.")] [Desc("Actor can be targeted.")]
public class TargetableUnitInfo : UpgradableTraitInfo, ITargetableInfo public class TargetableInfo : UpgradableTraitInfo, ITargetableInfo
{ {
[Desc("Target type. Used for filtering (in)valid targets.")] [Desc("Target type. Used for filtering (in)valid targets.")]
public readonly string[] TargetTypes = { }; public readonly string[] TargetTypes = { };
@@ -22,15 +22,15 @@ namespace OpenRA.Mods.Common.Traits
public bool RequiresForceFire = false; 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<TargetableUnitInfo>, ITargetable public class Targetable : UpgradableTrait<TargetableInfo>, ITargetable
{ {
protected static readonly string[] None = new string[] { }; protected static readonly string[] None = new string[] { };
protected Cloak cloak; protected Cloak cloak;
public TargetableUnit(Actor self, TargetableUnitInfo info) public Targetable(Actor self, TargetableInfo info)
: base(info) : base(info)
{ {
cloak = self.TraitOrDefault<Cloak>(); cloak = self.TraitOrDefault<Cloak>();
@@ -48,11 +48,6 @@ namespace OpenRA.Mods.Common.Traits
public virtual string[] TargetTypes { get { return Info.TargetTypes; } } public virtual string[] TargetTypes { get { return Info.TargetTypes; } }
public virtual IEnumerable<WPos> TargetablePositions(Actor self)
{
yield return self.CenterPosition;
}
public bool RequiresForceFire { get { return Info.RequiresForceFire; } } public bool RequiresForceFire { get { return Info.RequiresForceFire; } }
} }
} }

View File

@@ -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); UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -13,14 +13,14 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA.Traits namespace OpenRA.Mods.RA.Traits
{ {
public class TargetableSubmarineInfo : TargetableUnitInfo, Requires<CloakInfo> public class TargetableSubmarineInfo : TargetableInfo, Requires<CloakInfo>
{ {
public readonly string[] CloakedTargetTypes = { }; public readonly string[] CloakedTargetTypes = { };
public override object Create(ActorInitializer init) { return new TargetableSubmarine(init.Self, this); } public override object Create(ActorInitializer init) { return new TargetableSubmarine(init.Self, this); }
} }
public class TargetableSubmarine : TargetableUnit public class TargetableSubmarine : Targetable
{ {
readonly TargetableSubmarineInfo info; readonly TargetableSubmarineInfo info;

View File

@@ -511,7 +511,7 @@ Rules:
Buildable: Buildable:
Prerequisites: ~disabled Prerequisites: ~disabled
A10: A10:
TargetableUnit: Targetable:
Sequences: Sequences:

View File

@@ -374,7 +374,7 @@ BRIDGEHUT:
CustomSelectionSize: CustomSelectionSize:
CustomBounds: 48,48 CustomBounds: 48,48
BridgeHut: BridgeHut:
TargetableBuilding: Targetable:
TargetTypes: BridgeHut, C4 TargetTypes: BridgeHut, C4
C1: C1:

View File

@@ -64,7 +64,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 24,24 Bounds: 24,24
TargetableUnit: Targetable:
TargetTypes: Ground, Vehicle TargetTypes: Ground, Vehicle
Repairable: Repairable:
Passenger: Passenger:
@@ -172,7 +172,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 12,17,0,-6 Bounds: 12,17,0,-6
TargetableUnit: Targetable:
TargetTypes: Ground, Infantry TargetTypes: Ground, Infantry
RenderSprites: RenderSprites:
QuantizeFacingsFromSequence: QuantizeFacingsFromSequence:
@@ -302,7 +302,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 24,24 Bounds: 24,24
TargetableUnit: Targetable:
TargetTypes: Ground TargetTypes: Ground
HiddenUnderFog: HiddenUnderFog:
QuantizeFacingsFromSequence: QuantizeFacingsFromSequence:
@@ -346,7 +346,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 24,24 Bounds: 24,24
TargetableUnit: Targetable:
TargetTypes: Ground TargetTypes: Ground
AutoTarget: AutoTarget:
ScanRadius: 5 ScanRadius: 5
@@ -405,7 +405,7 @@
Water: 100 Water: 100
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
TargetableUnit: Targetable:
TargetTypes: Ground, Water TargetTypes: Ground, Water
HiddenUnderFog: HiddenUnderFog:
ActorLostNotification: ActorLostNotification:
@@ -421,7 +421,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Priority: 3 Priority: 3
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, Structure TargetTypes: Ground, C4, Structure
Armor: Armor:
Type: Wood Type: Wood
@@ -520,7 +520,7 @@
Tooltip: Tooltip:
Name: Field Name: Field
-WithBuildingExplosion: -WithBuildingExplosion:
-TargetableBuilding: -Targetable:
-Demolishable: -Demolishable:
RenderSprites: RenderSprites:
Palette: terrain Palette: terrain
@@ -553,7 +553,7 @@
BuildSounds: hvydoor1.aud BuildSounds: hvydoor1.aud
Adjacent: 7 Adjacent: 7
TerrainTypes: Clear,Road TerrainTypes: Clear,Road
TargetableBuilding: Targetable:
TargetTypes: Ground, Wall TargetTypes: Ground, Wall
Crushable: Crushable:
CrushClasses: wall CrushClasses: wall
@@ -662,7 +662,7 @@
AllowedTerrain: Clear, Rough, Road, Tiberium, BlueTiberium, Beach AllowedTerrain: Clear, Rough, Road, Tiberium, BlueTiberium, Beach
Burns: Burns:
Interval: 2 Interval: 2
TargetableUnit: Targetable:
RequiresForceFire: yes RequiresForceFire: yes
TargetTypes: Ground, Husk TargetTypes: Ground, Husk
Capturable: Capturable:
@@ -692,7 +692,7 @@
AlwaysVisible: AlwaysVisible:
Tooltip: Tooltip:
Name: Bridge Name: Bridge
TargetableBuilding: Targetable:
RequiresForceFire: yes RequiresForceFire: yes
TargetTypes: Ground, Water TargetTypes: Ground, Water
Health: Health:

View File

@@ -528,7 +528,7 @@ STNK:
AttackFrontal: AttackFrontal:
AutoTarget: AutoTarget:
InitialStance: HoldFire InitialStance: HoldFire
TargetableUnit: Targetable:
SpawnActorOnDeath: SpawnActorOnDeath:
Actor: STNK.Husk Actor: STNK.Husk
-MustBeDestroyed: -MustBeDestroyed:

View File

@@ -34,7 +34,7 @@ sandworm:
Sand: 100 Sand: 100
Dune: 100 Dune: 100
Spice: 100 Spice: 100
TargetableUnit: Targetable:
TargetTypes: Ground TargetTypes: Ground
WithFacingSpriteBody: WithFacingSpriteBody:
WithAttackOverlay: WithAttackOverlay:

View File

@@ -65,7 +65,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 32,32 Bounds: 32,32
TargetableUnit: Targetable:
TargetTypes: Ground, Vehicle, C4 TargetTypes: Ground, Vehicle, C4
Passenger: Passenger:
CargoType: Vehicle CargoType: Vehicle
@@ -130,7 +130,7 @@
AllowedTerrain: Sand, Rock, Transition, Concrete, Spice, SpiceBlobs, Dune AllowedTerrain: Sand, Rock, Transition, Concrete, Spice, SpiceBlobs, Dune
Burns: Burns:
Interval: 4 Interval: 4
TargetableUnit: Targetable:
TargetTypes: Ground, Vehicle TargetTypes: Ground, Vehicle
RequiresForceFire: yes RequiresForceFire: yes
Capturable: Capturable:
@@ -188,7 +188,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 12,18,0,-6 Bounds: 12,18,0,-6
TargetableUnit: Targetable:
TargetTypes: Ground, Infantry TargetTypes: Ground, Infantry
UpgradeTypes: parachute UpgradeTypes: parachute
UpgradeMaxEnabledLevel: 0 UpgradeMaxEnabledLevel: 0
@@ -260,7 +260,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Priority: 2 Priority: 2
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, Structure TargetTypes: Ground, C4, Structure
Building: Building:
Dimensions: 1,1 Dimensions: 1,1

View File

@@ -509,7 +509,7 @@ wall:
NodeTypes: wall, turret NodeTypes: wall, turret
LineBuildNode: LineBuildNode:
Types: wall Types: wall
TargetableBuilding: Targetable:
TargetTypes: Ground, Wall TargetTypes: Ground, Wall
RenderSprites: RenderSprites:
WithWallSpriteBody: WithWallSpriteBody:

View File

@@ -1382,21 +1382,15 @@ Rules:
-ExternalCaptures: -ExternalCaptures:
Captures: Captures:
CaptureTypes: building CaptureTypes: building
Cloak@JAIL: Targetable:
UpgradeTypes: jail UpgradeTypes: jail
UpgradeMinEnabledLevel: 1 UpgradeMaxEnabledLevel: 0
InitialDelay: 0
CloakDelay: 0
Palette:
RenderSprites: RenderSprites:
Image: E6 Image: E6
MEDI: MEDI:
Cloak@JAIL: Targetable:
UpgradeTypes: jail UpgradeTypes: jail
UpgradeMinEnabledLevel: 1 UpgradeMaxEnabledLevel: 0
InitialDelay: 0
CloakDelay: 0
Palette:
E7.noautotarget: E7.noautotarget:
Inherits: E7 Inherits: E7
AutoTarget: AutoTarget:

View File

@@ -1278,21 +1278,15 @@ Rules:
Captures: Captures:
CaptureTypes: building CaptureTypes: building
WithInfantryBody: WithInfantryBody:
Cloak@JAIL: Targetable:
UpgradeTypes: jail UpgradeTypes: jail
UpgradeMinEnabledLevel: 1 UpgradeMaxEnabledLevel: 0
InitialDelay: 0
CloakDelay: 0
Palette:
RenderSprites: RenderSprites:
Image: E6 Image: E6
MEDI: MEDI:
Cloak@JAIL: Targetable:
UpgradeTypes: jail UpgradeTypes: jail
UpgradeMinEnabledLevel: 1 UpgradeMaxEnabledLevel: 0
InitialDelay: 0
CloakDelay: 0
Palette:
E7.noautotarget: E7.noautotarget:
Inherits: E7 Inherits: E7
AutoTarget: AutoTarget:
@@ -1385,7 +1379,7 @@ Rules:
-Selectable: -Selectable:
-Demolishable: -Demolishable:
-Huntable: -Huntable:
-TargetableUnit: -Targetable:
-Armament: -Armament:
-WithMuzzleFlash: -WithMuzzleFlash:
Cargo: Cargo:

View File

@@ -1651,7 +1651,7 @@ Rules:
Prerequisites: ~disabled Prerequisites: ~disabled
LST: LST:
-Selectable: -Selectable:
TargetableUnit: Targetable:
TargetTypes: Ground, Water TargetTypes: Ground, Water
Tooltip: Tooltip:
GenericVisibility: Enemy GenericVisibility: Enemy
@@ -1696,13 +1696,13 @@ Rules:
ShowOwnerRow: false ShowOwnerRow: false
WEAP: WEAP:
-InfiltrateForSupportPower: -InfiltrateForSupportPower:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure, Mission Objectives TargetTypes: Ground, C4, DetonateAttack, Structure, Mission Objectives
MISS: MISS:
Tooltip: Tooltip:
Name: Prison Name: Prison
ShowOwnerRow: False ShowOwnerRow: False
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure, Mission Objectives TargetTypes: Ground, C4, DetonateAttack, Structure, Mission Objectives
E7.noautotarget: E7.noautotarget:
Inherits: E7 Inherits: E7

View File

@@ -644,7 +644,7 @@ Rules:
DamageMultiplier@INVULNERABLE: DamageMultiplier@INVULNERABLE:
Modifier: 0 Modifier: 0
-Selectable: -Selectable:
-TargetableBuilding: -Targetable:
Player: Player:
StrategicVictoryConditions: StrategicVictoryConditions:
TicksToHold: 3000 TicksToHold: 3000

View File

@@ -2241,7 +2241,7 @@ Rules:
RenderSprites: RenderSprites:
Image: DOME Image: DOME
-InfiltrateForExploration: -InfiltrateForExploration:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, MissionObjective TargetTypes: Ground, C4, DetonateAttack, MissionObjective
SPY: SPY:
Infiltrates: Infiltrates:

View File

@@ -1282,7 +1282,7 @@ Rules:
Power: Power:
Amount: 0 Amount: 0
-Selectable: -Selectable:
-TargetableBuilding: -Targetable:
-GivesBuildableArea: -GivesBuildableArea:
-Huntable: -Huntable:
RenderSprites: RenderSprites:

View File

@@ -242,7 +242,7 @@ V19.Husk:
Sequence: fire-loop Sequence: fire-loop
-Health: -Health:
-Selectable: -Selectable:
-TargetableBuilding: -Targetable:
-Demolishable: -Demolishable:
BARL: BARL:
@@ -259,7 +259,7 @@ BARL:
AutoTargetIgnore: AutoTargetIgnore:
Armor: Armor:
Type: None Type: None
TargetableBuilding: Targetable:
TargetTypes: Ground, DemoTruck TargetTypes: Ground, DemoTruck
-ShakeOnDeath: -ShakeOnDeath:
-SoundOnDamageTransition: -SoundOnDamageTransition:
@@ -279,7 +279,7 @@ BRL3:
AutoTargetIgnore: AutoTargetIgnore:
Armor: Armor:
Type: None Type: None
TargetableBuilding: Targetable:
TargetTypes: Ground, DemoTruck TargetTypes: Ground, DemoTruck
-ShakeOnDeath: -ShakeOnDeath:
-SoundOnDamageTransition: -SoundOnDamageTransition:
@@ -497,7 +497,7 @@ BRIDGEHUT:
CustomSelectionSize: CustomSelectionSize:
CustomBounds: 48,48 CustomBounds: 48,48
BridgeHut: BridgeHut:
TargetableBuilding: Targetable:
TargetTypes: BridgeHut, C4 TargetTypes: BridgeHut, C4
BRIDGEHUT.small: BRIDGEHUT.small:
@@ -508,7 +508,7 @@ BRIDGEHUT.small:
CustomSelectionSize: CustomSelectionSize:
CustomBounds: 24,24 CustomBounds: 24,24
BridgeHut: BridgeHut:
TargetableBuilding: Targetable:
TargetTypes: BridgeHut, C4 TargetTypes: BridgeHut, C4
V20: V20:

View File

@@ -77,7 +77,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 24, 24 Bounds: 24, 24
TargetableUnit: Targetable:
TargetTypes: Ground, Repair, Vehicle TargetTypes: Ground, Repair, Vehicle
UpgradeTypes: parachute UpgradeTypes: parachute
UpgradeMaxEnabledLevel: 0 UpgradeMaxEnabledLevel: 0
@@ -149,7 +149,7 @@
Ore: 70 Ore: 70
Gems: 70 Gems: 70
Beach: 70 Beach: 70
TargetableUnit: Targetable:
TargetTypes: Ground, C4, Repair, Tank TargetTypes: Ground, C4, Repair, Tank
ProximityCaptor: ProximityCaptor:
Types: Tank Types: Tank
@@ -181,7 +181,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 12,18,0,-8 Bounds: 12,18,0,-8
TargetableUnit: Targetable:
TargetTypes: Ground, Infantry, Disguise TargetTypes: Ground, Infantry, Disguise
UpgradeTypes: parachute UpgradeTypes: parachute
UpgradeMaxEnabledLevel: 0 UpgradeMaxEnabledLevel: 0
@@ -299,7 +299,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Bounds: 24,24 Bounds: 24,24
TargetableUnit: Targetable:
TargetTypes: Ground, Water, Repair TargetTypes: Ground, Water, Repair
HiddenUnderFog: HiddenUnderFog:
AttackMove: AttackMove:
@@ -385,7 +385,7 @@
SelectionDecorations: SelectionDecorations:
Selectable: Selectable:
Priority: 3 Priority: 3
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure TargetTypes: Ground, C4, DetonateAttack, Structure
Building: Building:
Dimensions: 1,1 Dimensions: 1,1
@@ -433,7 +433,7 @@
^Defense: ^Defense:
Inherits: ^Building Inherits: ^Building
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure, Defense TargetTypes: Ground, C4, DetonateAttack, Structure, Defense
MustBeDestroyed: MustBeDestroyed:
RequiredForShortGame: false RequiredForShortGame: false
@@ -462,7 +462,7 @@
NodeTypes: wall NodeTypes: wall
LineBuildNode: LineBuildNode:
Types: wall Types: wall
TargetableBuilding: Targetable:
TargetTypes: Ground, DetonateAttack, Wall TargetTypes: Ground, DetonateAttack, Wall
RenderSprites: RenderSprites:
Palette: effect Palette: effect
@@ -518,7 +518,7 @@
AutoTargetIgnore: AutoTargetIgnore:
Armor: Armor:
Type: Light Type: Light
TargetableBuilding: Targetable:
TargetTypes: Ground, DetonateAttack TargetTypes: Ground, DetonateAttack
^CivBuilding: ^CivBuilding:
@@ -533,7 +533,7 @@
-Selectable: -Selectable:
Tooltip: Tooltip:
Name: Field Name: Field
-TargetableBuilding: -Targetable:
-Demolishable: -Demolishable:
ProximityCaptor: ProximityCaptor:
Types: CivilianField Types: CivilianField
@@ -598,7 +598,7 @@
TransformOnCapture: TransformOnCapture:
ForceHealthPercentage: 25 ForceHealthPercentage: 25
DisabledOverlay: DisabledOverlay:
TargetableUnit: Targetable:
TargetTypes: Ground, Husk TargetTypes: Ground, Husk
RequiresForceFire: true RequiresForceFire: true
Chronoshiftable: Chronoshiftable:
@@ -625,7 +625,7 @@
AlwaysVisible: AlwaysVisible:
Tooltip: Tooltip:
Name: Bridge Name: Bridge
TargetableBuilding: Targetable:
TargetTypes: Ground, Water TargetTypes: Ground, Water
RequiresForceFire: true RequiresForceFire: true
Building: Building:

View File

@@ -57,7 +57,7 @@ SYRF:
GenericName: Shipyard GenericName: Shipyard
GenericVisibility: Enemy GenericVisibility: Enemy
GenericStancePrefix: False GenericStancePrefix: False
TargetableBuilding: Targetable:
TargetTypes: Ground, Water TargetTypes: Ground, Water
Building: Building:
Footprint: xxx xxx xxx Footprint: xxx xxx xxx
@@ -73,7 +73,7 @@ SYRF:
SPEF: SPEF:
Inherits: ^FakeBuilding Inherits: ^FakeBuilding
TargetableBuilding: Targetable:
TargetTypes: Ground, Water TargetTypes: Ground, Water
Buildable: Buildable:
BuildPaletteOrder: 910 BuildPaletteOrder: 910

View File

@@ -32,7 +32,7 @@ DOG:
Voice: Attack Voice: Attack
AttackMove: AttackMove:
Voice: Move Voice: Move
TargetableUnit: Targetable:
TargetTypes: Ground, Infantry TargetTypes: Ground, Infantry
WithInfantryBody: WithInfantryBody:
AttackSequence: shoot AttackSequence: shoot
@@ -587,7 +587,7 @@ Ant:
AttackSequence: bite AttackSequence: bite
Armament: Armament:
Weapon: mandible Weapon: mandible
TargetableUnit: Targetable:
TargetTypes: Ground, Infantry TargetTypes: Ground, Infantry
WithDeathAnimation: WithDeathAnimation:
UseDeathTypeSuffix: false UseDeathTypeSuffix: false

View File

@@ -22,7 +22,7 @@ MINP:
Name: Mine Name: Mine
ProximityCaptor: ProximityCaptor:
Types: Mine Types: Mine
TargetableUnit: Targetable:
TargetTypes: Ground TargetTypes: Ground
BodyOrientation: BodyOrientation:
QuantizedFacings: 1 QuantizedFacings: 1
@@ -53,7 +53,7 @@ MINV:
Name: Mine Name: Mine
ProximityCaptor: ProximityCaptor:
Types: Mine Types: Mine
TargetableUnit: Targetable:
TargetTypes: Ground TargetTypes: Ground
BodyOrientation: BodyOrientation:
QuantizedFacings: 1 QuantizedFacings: 1
@@ -431,5 +431,5 @@ CTFLAG:
DamageMultiplier@INVULNERABLE: DamageMultiplier@INVULNERABLE:
Modifier: 0 Modifier: 0
-Selectable: -Selectable:
-TargetableBuilding: -Targetable:

View File

@@ -19,7 +19,7 @@ SS:
Speed: 71 Speed: 71
RevealsShroud: RevealsShroud:
Range: 6c0 Range: 6c0
-TargetableUnit: -Targetable:
TargetableSubmarine: TargetableSubmarine:
TargetTypes: Ground, Water, Repair TargetTypes: Ground, Water, Repair
CloakedTargetTypes: Underwater, Repair CloakedTargetTypes: Underwater, Repair
@@ -68,7 +68,7 @@ MSUB:
Speed: 42 Speed: 42
RevealsShroud: RevealsShroud:
Range: 6c0 Range: 6c0
-TargetableUnit: -Targetable:
TargetableSubmarine: TargetableSubmarine:
TargetTypes: Ground, Water, Repair TargetTypes: Ground, Water, Repair
CloakedTargetTypes: Underwater, Repair CloakedTargetTypes: Underwater, Repair

View File

@@ -100,7 +100,7 @@ SPEN:
Queue: Building Queue: Building
BuildPaletteOrder: 50 BuildPaletteOrder: 50
Prerequisites: anypower, ~structures.soviet, ~techlevel.low Prerequisites: anypower, ~structures.soviet, ~techlevel.low
TargetableBuilding: Targetable:
TargetTypes: Ground, Water, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, Water, C4, DetonateAttack, SpyInfiltrate
Building: Building:
Footprint: xxx xxx xxx Footprint: xxx xxx xxx
@@ -181,7 +181,7 @@ SYRD:
Tooltip: Tooltip:
Name: Shipyard Name: Shipyard
Description: Produces and repairs ships\nand transports. Description: Produces and repairs ships\nand transports.
TargetableBuilding: Targetable:
TargetTypes: Ground, Water, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, Water, C4, DetonateAttack, SpyInfiltrate
Building: Building:
Footprint: xxx xxx xxx Footprint: xxx xxx xxx
@@ -476,7 +476,7 @@ DOME:
Building: Building:
Footprint: xx xx Footprint: xx xx
Dimensions: 2,2 Dimensions: 2,2
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate
RequiresPower: RequiresPower:
CanPowerDown: CanPowerDown:
@@ -823,7 +823,7 @@ WEAP:
Power: Power:
Amount: -30 Amount: -30
ProvidesPrerequisite@buildingname: ProvidesPrerequisite@buildingname:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate
InfiltrateForSupportPower: InfiltrateForSupportPower:
Proxy: vehicles.upgraded Proxy: vehicles.upgraded
@@ -920,7 +920,7 @@ PROC:
Bounds: 72,50,0,12 Bounds: 72,50,0,12
SelectionDecorations: SelectionDecorations:
VisualBounds: 72,70,0,-2 VisualBounds: 72,70,0,-2
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate
Health: Health:
HP: 900 HP: 900
@@ -1050,7 +1050,7 @@ HPAD:
RequiresPrerequisites: structures.germany RequiresPrerequisites: structures.germany
Prerequisite: aircraft.germany Prerequisite: aircraft.germany
ProvidesPrerequisite@buildingname: ProvidesPrerequisite@buildingname:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate
InfiltrateForSupportPower: InfiltrateForSupportPower:
Proxy: aircraft.upgraded Proxy: aircraft.upgraded
@@ -1159,7 +1159,7 @@ AFLD:
Power: Power:
Amount: -20 Amount: -20
ProvidesPrerequisite@buildingname: ProvidesPrerequisite@buildingname:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate
InfiltrateForSupportPower: InfiltrateForSupportPower:
Proxy: aircraft.upgraded Proxy: aircraft.upgraded
@@ -1191,7 +1191,7 @@ POWR:
Amount: 100 Amount: 100
InfiltrateForPowerOutage: InfiltrateForPowerOutage:
AffectedByPowerOutage: AffectedByPowerOutage:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate
ScalePowerWithHealth: ScalePowerWithHealth:
DisabledOverlay: DisabledOverlay:
@@ -1232,7 +1232,7 @@ APWR:
Amount: 200 Amount: 200
InfiltrateForPowerOutage: InfiltrateForPowerOutage:
AffectedByPowerOutage: AffectedByPowerOutage:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate
ScalePowerWithHealth: ScalePowerWithHealth:
DisabledOverlay: DisabledOverlay:
@@ -1332,7 +1332,7 @@ BARR:
ProvidesPrerequisite@buildingname: ProvidesPrerequisite@buildingname:
InfiltrateForSupportPower: InfiltrateForSupportPower:
Proxy: barracks.upgraded Proxy: barracks.upgraded
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate
KENN: KENN:
@@ -1439,7 +1439,7 @@ TENT:
ProvidesPrerequisite@buildingname: ProvidesPrerequisite@buildingname:
InfiltrateForSupportPower: InfiltrateForSupportPower:
Proxy: barracks.upgraded Proxy: barracks.upgraded
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, Structure, SpyInfiltrate
FIX: FIX:

View File

@@ -699,7 +699,7 @@ QTNK:
VisualBounds: 44,38,0,-4 VisualBounds: 44,38,0,-4
MadTank: MadTank:
-EjectOnDeath: -EjectOnDeath:
TargetableUnit: Targetable:
TargetTypes: Ground, MADTank, Repair TargetTypes: Ground, MADTank, Repair
STNK: STNK:

View File

@@ -225,7 +225,7 @@ DOGGIE:
Speed: 113 Speed: 113
Voiced: Voiced:
VoiceSet: Fiend VoiceSet: Fiend
TargetableUnit: Targetable:
TargetTypes: Ground TargetTypes: Ground
Armament: Armament:
Weapon: FiendShard Weapon: FiendShard

View File

@@ -71,7 +71,7 @@
Palette: pips Palette: pips
Selectable: Selectable:
Priority: 3 Priority: 3
TargetableBuilding: Targetable:
TargetTypes: Ground, Building, C4 TargetTypes: Ground, Building, C4
Building: Building:
Dimensions: 1,1 Dimensions: 1,1
@@ -187,7 +187,7 @@
NodeTypes: wall NodeTypes: wall
LineBuildNode: LineBuildNode:
Types: wall Types: wall
TargetableBuilding: Targetable:
TargetTypes: Ground, Wall, C4 TargetTypes: Ground, Wall, C4
RenderSprites: RenderSprites:
AutoSelectionSize: AutoSelectionSize:
@@ -252,7 +252,7 @@
Bounds: 14,23,-1,-9 Bounds: 14,23,-1,-9
Voiced: Voiced:
VoiceSet: Infantry VoiceSet: Infantry
TargetableUnit: Targetable:
TargetTypes: Ground, Infantry TargetTypes: Ground, Infantry
QuantizeFacingsFromSequence: QuantizeFacingsFromSequence:
Sequence: stand Sequence: stand
@@ -378,7 +378,7 @@
Palette: pips Palette: pips
Voiced: Voiced:
VoiceSet: Vehicle VoiceSet: Vehicle
TargetableUnit: Targetable:
TargetTypes: Ground, Vehicle, Repair TargetTypes: Ground, Vehicle, Repair
Repairable: Repairable:
RepairBuildings: gadept RepairBuildings: gadept
@@ -520,7 +520,7 @@
Palette: pips Palette: pips
Selectable: Selectable:
Bounds: 26,26,0,-3 Bounds: 26,26,0,-3
TargetableUnit: Targetable:
TargetTypes: Ground TargetTypes: Ground
AttackMove: AttackMove:
HiddenUnderFog: HiddenUnderFog:
@@ -651,7 +651,7 @@
SelectionDecorations: SelectionDecorations:
Palette: pips Palette: pips
Selectable: Selectable:
TargetableBuilding: Targetable:
TargetTypes: Ground, Repair TargetTypes: Ground, Repair
Guardable: Guardable:
HiddenUnderFog: HiddenUnderFog:
@@ -681,7 +681,7 @@
Palette: pips Palette: pips
Voiced: Voiced:
VoiceSet: Vehicle VoiceSet: Vehicle
TargetableUnit: Targetable:
TargetTypes: Ground, Vehicle TargetTypes: Ground, Vehicle
Passenger: Passenger:
CargoType: Infantry CargoType: Infantry

View File

@@ -30,7 +30,7 @@ GAPOWR:
Amount: 100 Amount: 100
InfiltrateForPowerOutage: InfiltrateForPowerOutage:
AffectedByPowerOutage: AffectedByPowerOutage:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate
ScalePowerWithHealth: ScalePowerWithHealth:
DisabledOverlay: DisabledOverlay:
@@ -288,7 +288,7 @@ GARADR:
WithIdleOverlay@DISH: WithIdleOverlay@DISH:
Sequence: idle-dish Sequence: idle-dish
PauseOnLowPower: yes PauseOnLowPower: yes
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, SpyInfiltrate TargetTypes: Ground, C4, SpyInfiltrate
Power: Power:
Amount: -50 Amount: -50

View File

@@ -28,7 +28,7 @@ NAPOWR:
Amount: 100 Amount: 100
InfiltrateForPowerOutage: InfiltrateForPowerOutage:
AffectedByPowerOutage: AffectedByPowerOutage:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate
ScalePowerWithHealth: ScalePowerWithHealth:
DisabledOverlay: DisabledOverlay:
@@ -65,7 +65,7 @@ NAAPWR:
Amount: 200 Amount: 200
InfiltrateForPowerOutage: InfiltrateForPowerOutage:
AffectedByPowerOutage: AffectedByPowerOutage:
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate TargetTypes: Ground, C4, DetonateAttack, SpyInfiltrate
ScalePowerWithHealth: ScalePowerWithHealth:
DisabledOverlay: DisabledOverlay:
@@ -243,7 +243,7 @@ NARADR:
WithIdleOverlay@DISH: WithIdleOverlay@DISH:
Sequence: idle-dish Sequence: idle-dish
PauseOnLowPower: yes PauseOnLowPower: yes
TargetableBuilding: Targetable:
TargetTypes: Ground, C4, SpyInfiltrate TargetTypes: Ground, C4, SpyInfiltrate
Power: Power:
Amount: -50 Amount: -50