Upgrade rule for Health.Shape to HitShape.Type

This commit is contained in:
reaperrr
2017-05-21 14:12:34 +02:00
parent 43b55ae333
commit 7f81de2f8a
15 changed files with 119 additions and 44 deletions

View File

@@ -679,6 +679,28 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
// Added HitShape trait
if (engineVersion < 20170531)
{
var hitShapeNode = new MiniYamlNode("HitShape", "");
// Moved and renamed Health.Shape to HitShape.Type
var health = node.Value.Nodes.FirstOrDefault(n => n.Key == "Health");
if (health != null)
{
var shape = health.Value.Nodes.FirstOrDefault(n => n.Key == "Shape");
if (shape != null)
{
RenameNodeKey(shape, "Type");
hitShapeNode.Value.Nodes.Add(shape);
node.Value.Nodes.Add(hitShapeNode);
health.Value.Nodes.Remove(shape);
}
else
node.Value.Nodes.Add(hitShapeNode);
}
}
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}

View File

@@ -173,6 +173,7 @@
VoiceSet: VehicleVoice
BodyOrientation:
UseClassicFacingFudge: True
HitShape:
^Tank:
Inherits: ^Vehicle
@@ -234,14 +235,13 @@
VoiceSet: VehicleVoice
BodyOrientation:
UseClassicFacingFudge: True
HitShape:
^Infantry:
Inherits@1: ^ExistsInWorld
Inherits@3: ^SpriteActor
Huntable:
Health:
Shape: Circle
Radius: 128
Armor:
Type: None
RevealsShroud:
@@ -334,6 +334,9 @@
DeathTypes: TiberiumDeath
Voiced:
VoiceSet: GenericVoice
HitShape:
Type: Circle
Radius: 128
^Soldier:
Inherits: ^Infantry
@@ -391,8 +394,6 @@
Huntable:
Health:
HP: 1000
Shape: Circle
Radius: 128
Armor:
Type: Wood
Buildable:
@@ -441,6 +442,9 @@
DeathSounds:
Voiced:
VoiceSet: DinoVoice
HitShape:
Type: Circle
Radius: 128
^Viceroid:
Inherits@1: ^ExistsInWorld
@@ -448,8 +452,6 @@
Huntable:
Health:
HP: 300
Shape: Circle
Radius: 427
Armor:
Type: Wood
RevealsShroud:
@@ -500,6 +502,9 @@
Terrain: Tiberium, BlueTiberium
Voiced:
VoiceSet: DinoVoice
HitShape:
Type: Circle
Radius: 427
^Plane:
Inherits@1: ^ExistsInWorld
@@ -548,6 +553,7 @@
GenericName: Ship
Voiced:
VoiceSet: VehicleVoice
HitShape:
^Building:
Inherits@1: ^ExistsInWorld
@@ -710,7 +716,8 @@
ScriptTriggers:
Health:
HP: 100
Shape: Rectangle
HitShape:
Type: Rectangle
TopLeft: -512, -512
BottomRight: 512, 512
@@ -752,6 +759,7 @@
AutoTargetIgnore:
HiddenUnderShroud:
ScriptTriggers:
HitShape:
^TreeHusk:
Inherits@1: ^SpriteActor
@@ -812,6 +820,7 @@
Type: CenterPosition
AutoTargetIgnore:
WithFacingSpriteBody:
HitShape:
^Husk:
Inherits: ^CommonHuskDefaults
@@ -869,6 +878,7 @@
DamagedSounds: xplos.aud
DestroyedSounds: xplobig4.aud
ScriptTriggers:
HitShape:
^Crate:
Inherits@1: ^SpriteActor

View File

@@ -90,6 +90,7 @@ CAMERA.small:
OccupiesSpace: false
Health:
HP: 1000
HitShape:
RevealsShroud:
Range: 6c0
Type: CenterPosition

View File

@@ -20,10 +20,11 @@ spicebloom.spawnpoint:
Actor: spicebloom
Health:
HP: 9999
Shape: Circle
Radius: 1
Immobile:
OccupiesSpace: false
HitShape:
Type: Circle
Radius: 1
spicebloom:
HiddenUnderShroud:
@@ -48,8 +49,6 @@ spicebloom:
Immobile:
Health:
HP: 1
Shape: Circle
Radius: 512
Targetable:
TargetTypes: Ground
RequiresForceFire: true
@@ -57,6 +56,9 @@ spicebloom:
Type: none
SpawnActorOnDeath:
Actor: spicebloom.spawnpoint
HitShape:
Type: Circle
Radius: 512
sandworm:
Inherits@1: ^SpriteActor
@@ -64,7 +66,9 @@ sandworm:
Name: Sandworm
Health:
HP: 9990
Radius: 256
HitShape:
Type: Circle
Radius: 256
Armor:
Type: heavy
Mobile:

View File

@@ -173,6 +173,7 @@
RevealOnDeath:
Duration: 100
Radius: 2c512
HitShape:
^Tank:
Inherits: ^Vehicle
@@ -192,6 +193,7 @@
AutoTargetIgnore:
ScriptTriggers:
WithFacingSpriteBody:
HitShape:
^VehicleHusk:
Inherits: ^Husk
@@ -229,6 +231,7 @@
Tooltip:
Name: Destroyed Tower
ScriptTriggers:
HitShape:
^Infantry:
Inherits@1: ^ExistsInWorld
@@ -236,8 +239,6 @@
Inherits@3: ^SpriteActor
Huntable:
Health:
Shape: Circle
Radius: 96
Armor:
Type: none
RevealsShroud:
@@ -303,6 +304,9 @@
RevealOnFire:
RevealOnDeath:
Duration: 100
HitShape:
Type: Circle
Radius: 96
^Plane:
Inherits@1: ^ExistsInWorld
@@ -318,6 +322,7 @@
DrawLineToTarget:
WithFacingSpriteBody:
WithShadow:
HitShape:
^Building:
Inherits@1: ^ExistsInWorld

View File

@@ -633,9 +633,6 @@ wall:
TerrainTypes: Rock, Concrete
Health:
HP: 2000
Shape: Rectangle
TopLeft: -512, -512
BottomRight: 512, 512
Armor:
Type: wall
RevealsShroud:
@@ -663,6 +660,10 @@ wall:
Weapons: Debris2, Debris3
Pieces: 1, 1
Range: 1c512, 2c768
HitShape:
Type: Rectangle
TopLeft: -512, -512
BottomRight: 512, 512
medium_gun_turret:
Inherits: ^Defense

View File

@@ -97,6 +97,7 @@ MNLYR:
Image: MNLY
Chronoshiftable:
ReturnToOrigin: false
HitShape:
FTUR:
Health:
@@ -164,6 +165,7 @@ MINVV:
Explodes:
Weapon: CrateNuke
EmptyWeapon: CrateNuke
HitShape:
T17:
Health:

View File

@@ -209,6 +209,7 @@
RequiresCondition: parachute
BodyOrientation:
UseClassicFacingFudge: True
HitShape:
^Tank:
Inherits: ^Vehicle
@@ -237,8 +238,6 @@
DrawLineToTarget:
Health:
HP: 25
Shape: Circle
Radius: 128
Armor:
Type: None
RevealsShroud:
@@ -324,6 +323,9 @@
OpeningSequence: open
Offset: 0,0,427
RequiresCondition: parachute
HitShape:
Type: Circle
Radius: 128
^Soldier:
Inherits: ^Infantry
@@ -412,6 +414,7 @@
Voiced:
VoiceSet: VehicleVoice
WithFacingSpriteBody:
HitShape:
^NeutralPlane:
Inherits@1: ^ExistsInWorld
@@ -463,6 +466,7 @@
MustBeDestroyed:
Voiced:
VoiceSet: GenericVoice
HitShape:
^Plane:
Inherits: ^NeutralPlane
@@ -592,7 +596,8 @@
FrozenUnderFogUpdatedByGps:
Health:
HP: 100
Shape: Rectangle
HitShape:
Type: Rectangle
TopLeft: -512, -512
BottomRight: 512, 512
@@ -618,6 +623,7 @@
OpeningSound: cashturn.aud
ClosingSound: cashturn.aud
TerrainTypes: Clear, Road
HitShape:
^TechBuilding:
Inherits: ^BasicBuilding
@@ -630,6 +636,7 @@
Name: Civilian Building
GenericVisibility: None
FrozenUnderFog:
HitShape:
^FakeBuilding:
Inherits: ^Building
@@ -649,6 +656,7 @@
ZOffset: 256
-EmitInfantryOnSell:
-MustBeDestroyed:
HitShape:
^InfiltratableFake:
Targetable:
@@ -678,6 +686,7 @@
Type: Light
Targetable:
TargetTypes: Ground, DetonateAttack
HitShape:
^CivBuilding:
Inherits: ^TechBuilding
@@ -748,6 +757,7 @@
ScriptTriggers:
EditorTilesetFilter:
ExcludeTilesets: INTERIOR
HitShape:
^TreeHusk:
Inherits@1: ^SpriteActor
@@ -773,6 +783,7 @@
AutoTargetIgnore:
ScriptTriggers:
WithFacingSpriteBody:
HitShape:
^Husk:
Inherits: ^BasicHusk
@@ -842,6 +853,7 @@
Type: Concrete
AutoTargetIgnore:
ScriptTriggers:
HitShape:
^Rock:
Inherits@1: ^SpriteActor
@@ -926,6 +938,7 @@
TargetTypes: Ground
Immobile:
OccupiesSpace: true
HitShape:
^DisabledOverlay:
WithColoredOverlay@IDISABLE:

View File

@@ -651,8 +651,6 @@ Ant:
VisualBounds: 30,30,0,-2
Health:
HP: 750
Shape: Circle
Radius: 469
Mobile:
Speed: 99
TurnSpeed: 12
@@ -671,3 +669,6 @@ Ant:
UseDeathTypeSuffix: false
Voiced:
VoiceSet: AntVoice
HitShape:
Type: Circle
Radius: 469

View File

@@ -365,3 +365,4 @@ HUNTER:
SelectionDecorations:
Palette: pips
ActorLostNotification:
HitShape:

View File

@@ -40,6 +40,7 @@ CABHUT:
HP: 500
Armor:
Type: Concrete
HitShape:
LOBRDG_A:
Inherits: ^LowBridge

View File

@@ -6,8 +6,6 @@ DOGGIE:
Name: Tiberian Fiend
Health:
HP: 250
Shape: Circle
Radius: 213
Selectable:
Bounds: 24,24
Valued:
@@ -35,6 +33,9 @@ DOGGIE:
DeathSequence: die-
DeathTypes:
FireDeath: burning
HitShape:
Type: Circle
Radius: 213
VISC_SML:
Inherits: ^Visceroid
@@ -85,9 +86,6 @@ JFISH:
Name: Tiberium Floater
Health:
HP: 500
Shape: Circle
Radius: 363
VerticalTopOffset: 768
RevealsShroud:
Range: 5c0
Mobile:
@@ -119,3 +117,7 @@ JFISH:
SoundFiles: floatmov.aud, flotmov2.aud, flotmov3.aud, flotmov4.aud
Delay: 150, 450
Interval: 300, 800
HitShape:
Type: Circle
Radius: 363
VerticalTopOffset: 768

View File

@@ -283,7 +283,8 @@
ScriptTriggers:
ConditionManager:
Health:
Shape: Rectangle
HitShape:
Type: Rectangle
LocalYaw: 128
TopLeft: -512, -512
BottomRight: 512, 512
@@ -306,8 +307,6 @@
DrawLineToTarget:
Health:
HP: 50
Shape: Circle
Radius: 128
Armor:
Type: None
Valued:
@@ -382,6 +381,9 @@
RevealOnFire:
EntersTunnels:
Voice: Move
HitShape:
Type: Circle
Radius: 128
^RegularInfantryDeath:
WithDeathAnimation@normal:
@@ -568,6 +570,7 @@
RevealOnFire:
EntersTunnels:
Voice: Move
HitShape:
^Tank:
Inherits: ^Vehicle
@@ -641,6 +644,7 @@
RenderVoxels:
WithVoxelBody:
RevealOnFire:
HitShape:
^Helicopter:
Inherits: ^Aircraft
@@ -673,6 +677,7 @@
Spins: true
Moves: true
Velocity: 86
HitShape:
^Visceroid:
Inherits@1: ^ExistsInWorld
@@ -681,9 +686,6 @@
Huntable:
DrawLineToTarget:
Health:
Shape: Circle
Radius: 256
VerticalTopOffset: 512
Armor:
Type: Light
Mobile:
@@ -715,6 +717,10 @@
RevealOnFire:
EntersTunnels:
Voice: Move
HitShape:
Type: Circle
Radius: 256
VerticalTopOffset: 512
^BlossomTree:
Inherits@1: ^SpriteActor
@@ -854,6 +860,7 @@
Weapons: SmallDebris
Pieces: 3, 7
Range: 2c0, 5c0
HitShape:
^TerrainOverlay:
AlwaysVisible:
@@ -898,11 +905,6 @@
Cost: 250
Health:
HP: 350
Shape: Rectangle
LocalYaw: 128
TopLeft: -512, -512
BottomRight: 512, 512
VerticalTopOffset: 768
Armor:
Type: Heavy
LineBuildNode:
@@ -924,13 +926,16 @@
BlocksProjectilesHeight: 768
Buildable:
Description: Automated barrier that opens for allied units.
HitShape:
Type: Rectangle
LocalYaw: 128
TopLeft: -512, -512
BottomRight: 512, 512
VerticalTopOffset: 768
^Gate_A:
Inherits: ^Gate
Health:
Shape: Rectangle
TopLeft: -512, -1536
BottomRight: 512, 1536
Gate:
Dimensions: 3,1
Footprint: xxx
@@ -938,13 +943,14 @@
WallConnections: -1,0, 3,0
LineBuildNode:
Connections: -1,0, 1,0
HitShape:
Type: Rectangle
TopLeft: -512, -1536
BottomRight: 512, 1536
^Gate_B:
Inherits: ^Gate
Health:
Shape: Rectangle
TopLeft: -1536, -512
BottomRight: 1536, 512
Gate:
Dimensions: 1,3
Footprint: x x x
@@ -952,6 +958,10 @@
WallConnections: 0,-1, 0,3
LineBuildNode:
Connections: 0,-1, 0,1
HitShape:
Type: Rectangle
TopLeft: -1536, -512
BottomRight: 1536, 512
^HealsOnTiberium:
DamagedByTerrain:

View File

@@ -168,6 +168,7 @@ JUMPJET.Husk:
WithSpriteBody:
Sequence: die-falling
Health:
HitShape:
ConditionManager:
GrantConditionOnTerrain:
TerrainTypes: Water

View File

@@ -97,3 +97,4 @@ FLAMEGUY:
WithDeathAnimation:
FallbackSequence: die
UseDeathTypeSuffix: false
HitShape: