Rename UseOccupiedCellsOffsets to UseTargetableCellsOffsets

With the introduction of the new 'u' BlockingUntargetable cell type, the old property name became inaccurate.
This commit is contained in:
reaperrr
2017-07-05 02:12:52 +02:00
committed by abcdefg30
parent 77ef3a0ed2
commit d95d7e0b0f
11 changed files with 55 additions and 47 deletions

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly WVec[] TargetableOffsets = { WVec.Zero };
[Desc("Create a targetable position at the center of each occupied cell. Stacks with TargetableOffsets.")]
public readonly bool UseOccupiedCellsOffsets = false;
public readonly bool UseTargetableCellsOffsets = false;
[FieldLoader.LoadUsing("LoadShape")]
public readonly IHitShape Type;
@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.Traits
if (IsTraitDisabled)
yield break;
if (Info.UseOccupiedCellsOffsets && targetableCells != null)
if (Info.UseTargetableCellsOffsets && targetableCells != null)
foreach (var c in targetableCells.TargetableCells())
yield return self.World.Map.CenterOfCell(c.First);

View File

@@ -821,6 +821,14 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
// We now differentiate between "occupied and provides offset" and "occupied but provides no offset",
// so the old property name was no longer correct.
if (engineVersion < 20170705)
{
if (node.Key == "UseOccupiedCellsOffsets")
node.Key = "UseTargetableCellsOffsets";
}
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}

View File

@@ -1,7 +1,7 @@
V20:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -840,-512,0, 0,0,0, -840,512,0
Type: Rectangle
TopLeft: -1024, -512
@@ -29,7 +29,7 @@ V20.Husk:
V21:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 840,-512,0, 420,0,0, 840,512,0
Type: Rectangle
TopLeft: -1024, -1024
@@ -101,7 +101,7 @@ V23.Husk:
V24:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -630,-512,0, 0,0,0, -630,256,0, 420,-512,0
Type: Rectangle
TopLeft: -1024, -683
@@ -129,7 +129,7 @@ V24.Husk:
V25:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,-128,0, 420,512,0
Type: Rectangle
TopLeft: -683, -683
@@ -368,7 +368,7 @@ V36.Husk:
V37:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 0,1024,0
Type: Rectangle
TopLeft: -512, -597

View File

@@ -1,7 +1,7 @@
V01:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -490,-384,0, 0,0,0, 0,470,0
Type: Rectangle
TopLeft: -768, -597
@@ -29,7 +29,7 @@ V01.Husk:
V02:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -490,-512,0, 0,0,0, 0,512,0
Type: Rectangle
TopLeft: -1024, -512
@@ -57,7 +57,7 @@ V02.Husk:
V03:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -490,-512,0, 0,0,0, 421,512,0, -210,512,0
Type: Rectangle
TopLeft: -1024, -597
@@ -85,7 +85,7 @@ V03.Husk:
V04:
Inherits: ^CivBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, -421,-256,0, -421,256,0
Type: Rectangle
TopLeft: -683, -432

View File

@@ -16,28 +16,28 @@
^1x1Shape:
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -512, -512
BottomRight: 512, 512
^2x1Shape:
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -1024, -512
BottomRight: 1024, 512
^2x2Shape:
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -1024, -1024
BottomRight: 1024, 1024
^3x2Shape:
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -1536, -1024
BottomRight: 1536, 1024

View File

@@ -246,7 +246,7 @@ SILO:
PYLE:
Inherits: ^BaseBuilding
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 840,-256,0, 840,512,0, 210,-512,0, -71,512,0
Type: Rectangle
TopLeft: -1024, -1024
@@ -296,7 +296,7 @@ HAND:
Inherits: ^BaseBuilding
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 630,-512,0, 355,512,0, -281,-512,0, -630,512,0
Valued:
Cost: 500
@@ -443,7 +443,7 @@ HPAD:
Inherits: ^BaseBuilding
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 768,-512,0, 768,512,0, -281,-512,0, -630,512,0
Valued:
Cost: 1000
@@ -668,7 +668,7 @@ TMPL:
Inherits@IDISABLE: ^DisabledOverlay
Inherits@shape: ^3x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 0,-896,0, 0,896,0, 840,0,0, -706,0,0, -706,-768,0, -706,640,0
Valued:
Cost: 2000

View File

@@ -369,7 +369,7 @@
Targetable:
TargetTypes: Ground, C4, Structure
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -512, -512
BottomRight: 512, 512

View File

@@ -122,7 +122,7 @@ V01:
EditorTilesetFilter:
ExcludeTilesets: DESERT, INTERIOR
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -490,-384,0, 0,0,0, 0,470,0
Type: Rectangle
TopLeft: -768, -597
@@ -136,7 +136,7 @@ V02:
EditorTilesetFilter:
ExcludeTilesets: DESERT, INTERIOR
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -490,-512,0, 0,0,0, 0,512,0
Type: Rectangle
TopLeft: -1024, -512
@@ -150,7 +150,7 @@ V03:
EditorTilesetFilter:
ExcludeTilesets: DESERT, INTERIOR
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -490,-512,0, 0,0,0, 421,512,0, -210,512,0
Type: Rectangle
TopLeft: -1024, -597
@@ -164,7 +164,7 @@ V04:
EditorTilesetFilter:
ExcludeTilesets: DESERT, INTERIOR
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, -421,-256,0, -421,256,0
Type: Rectangle
TopLeft: -683, -432
@@ -344,7 +344,7 @@ MISS:
Inherits: ^TechBuilding
Inherits@shape: ^3x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 840,0,0, 840,-1024,0, 420,768,0, -840,0,0, -840,-1024,0, -840,1024,0
Selectable:
Priority: 0
@@ -392,7 +392,7 @@ OILB:
Inherits: ^TechBuilding
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 630,-300,0, 420,512,0, -420,-512,0, -630,300,0
Selectable:
Priority: 0
@@ -582,7 +582,7 @@ V20:
Footprint: xx xx
Dimensions: 2,2
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -840,-512,0, 0,0,0, -840,512,0
Type: Rectangle
TopLeft: -1024, -512
@@ -594,7 +594,7 @@ V21:
Footprint: xx xx
Dimensions: 2,2
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 840,-512,0, 420,0,0, 840,512,0
Type: Rectangle
TopLeft: -1024, -1024
@@ -621,7 +621,7 @@ V24:
Footprint: xx xx
Dimensions: 2,2
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: -630,-512,0, 0,0,0, -630,256,0, 420,-512,0
Type: Rectangle
TopLeft: -1024, -683
@@ -637,7 +637,7 @@ V25:
RevealsShroud:
Range: 10c0
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,-128,0, 420,512,0
Type: Rectangle
TopLeft: -683, -683
@@ -702,7 +702,7 @@ V37:
Footprint: __xx_ ___xx
Dimensions: 5,2
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 0,1024,0
Type: Rectangle
TopLeft: -512, -597
@@ -721,7 +721,7 @@ RUSHOUSE:
Footprint: x x
Dimensions: 1,2
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
ASIANHUT:
Inherits: ^CivBuilding
@@ -738,7 +738,7 @@ SNOWHUT:
RenderSprites:
Scale: 0.7
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
LHUS:
Inherits: ^CivBuilding

View File

@@ -15,28 +15,28 @@
^1x1Shape:
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -512, -512
BottomRight: 512, 512
^2x1Shape:
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -1024, -512
BottomRight: 1024, 512
^2x2Shape:
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -1024, -1024
BottomRight: 1024, 1024
^3x2Shape:
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -1536, -1024
BottomRight: 1536, 1024

View File

@@ -3,7 +3,7 @@ FPWR:
Inherits@infiltrate: ^InfiltratableFake
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 640,-384,0, 640,512,0, -710,-512,0, -710,512,0
Buildable:
BuildPaletteOrder: 870
@@ -150,7 +150,7 @@ DOMF:
Inherits@infiltrate: ^InfiltratableFake
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 630,-384,0, 630,384,0, -700,-512,0, -700,512,0
Tooltip:
Name: Fake Radar Dome

View File

@@ -543,7 +543,7 @@ DOME:
Inherits@IDISABLE: ^DisabledOverlay
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 630,-384,0, 630,384,0, -700,-512,0, -700,512,0
Buildable:
Queue: Building
@@ -1163,7 +1163,7 @@ HPAD:
Inherits: ^Building
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 768,-512,0, 768,512,0, -281,-512,0, -630,512,0
Buildable:
Queue: Building
@@ -1250,7 +1250,7 @@ AFLD:
Inherits: ^Building
Inherits@shape: ^3x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 420,0,0, 420,-1024,0, 420,1024,0, -777,0,0, -777,-1024,0, -777,1024,0
Buildable:
Queue: Building
@@ -1385,7 +1385,7 @@ POWR:
Inherits@POWER_OUTAGE: ^DisabledByPowerOutage
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 640,-384,0, 640,512,0, -710,-512,0, -710,512,0
Buildable:
Queue: Building
@@ -1495,7 +1495,7 @@ BARR:
Inherits: ^Building
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 490,-470,0, 355,512,0, -355,-512,0, -630,512,0
Buildable:
Queue: Building
@@ -1623,7 +1623,7 @@ TENT:
Inherits: ^Building
Inherits@shape: ^2x2Shape
HitShape:
UseOccupiedCellsOffsets: false
UseTargetableCellsOffsets: false
TargetableOffsets: 0,0,0, 630,-512,0, 355,512,0, -281,-512,0, -630,512,0
Buildable:
Queue: Building
@@ -1841,7 +1841,7 @@ BRIK:
VGATE:
Inherits: ^Gate
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -512, -1536
BottomRight: 512, 1536
@@ -1858,7 +1858,7 @@ VGATE:
HGATE:
Inherits: ^Gate
HitShape:
UseOccupiedCellsOffsets: true
UseTargetableCellsOffsets: true
Type: Rectangle
TopLeft: -1536, -512
BottomRight: 1536, 512