Rename WithRotor to WithSpriteRotorOverlay
This commit is contained in:
@@ -441,7 +441,7 @@
|
|||||||
<Compile Include="Traits\Render\WithRepairAnimation.cs" />
|
<Compile Include="Traits\Render\WithRepairAnimation.cs" />
|
||||||
<Compile Include="Traits\Render\WithRepairOverlay.cs" />
|
<Compile Include="Traits\Render\WithRepairOverlay.cs" />
|
||||||
<Compile Include="Traits\Render\WithResources.cs" />
|
<Compile Include="Traits\Render\WithResources.cs" />
|
||||||
<Compile Include="Traits\Render\WithRotor.cs" />
|
<Compile Include="Traits\Render\WithSpriteRotorOverlay.cs" />
|
||||||
<Compile Include="Traits\Render\WithShadow.cs" />
|
<Compile Include="Traits\Render\WithShadow.cs" />
|
||||||
<Compile Include="Traits\Render\WithSmoke.cs" />
|
<Compile Include="Traits\Render\WithSmoke.cs" />
|
||||||
<Compile Include="Traits\Render\WithSpriteBody.cs" />
|
<Compile Include="Traits\Render\WithSpriteBody.cs" />
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
[Desc("Displays a helicopter rotor overlay.")]
|
[Desc("Displays a helicopter rotor overlay.")]
|
||||||
public class WithRotorInfo : ITraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
|
public class WithSpriteRotorOverlayInfo : ITraitInfo, IRenderActorPreviewSpritesInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
|
||||||
{
|
{
|
||||||
[Desc("Sequence name to use when flying")]
|
[Desc("Sequence name to use when flying")]
|
||||||
[SequenceReference] public readonly string Sequence = "rotor";
|
[SequenceReference] public readonly string Sequence = "rotor";
|
||||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Position relative to body")]
|
[Desc("Position relative to body")]
|
||||||
public readonly WVec Offset = WVec.Zero;
|
public readonly WVec Offset = WVec.Zero;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new WithRotor(init.Self, this); }
|
public object Create(ActorInitializer init) { return new WithSpriteRotorOverlay(init.Self, this); }
|
||||||
|
|
||||||
public IEnumerable<IActorPreview> RenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p)
|
public IEnumerable<IActorPreview> RenderPreviewSprites(ActorPreviewInitializer init, RenderSpritesInfo rs, string image, int facings, PaletteReference p)
|
||||||
{
|
{
|
||||||
@@ -43,13 +43,13 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WithRotor : ITick
|
public class WithSpriteRotorOverlay : ITick
|
||||||
{
|
{
|
||||||
readonly WithRotorInfo info;
|
readonly WithSpriteRotorOverlayInfo info;
|
||||||
readonly Animation rotorAnim;
|
readonly Animation rotorAnim;
|
||||||
readonly IMove movement;
|
readonly IMove movement;
|
||||||
|
|
||||||
public WithRotor(Actor self, WithRotorInfo info)
|
public WithSpriteRotorOverlay(Actor self, WithSpriteRotorOverlayInfo info)
|
||||||
{
|
{
|
||||||
this.info = info;
|
this.info = info;
|
||||||
var rs = self.Trait<RenderSprites>();
|
var rs = self.Trait<RenderSprites>();
|
||||||
@@ -2189,6 +2189,15 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (engineVersion < 20151004)
|
||||||
|
{
|
||||||
|
if (depth == 1 && node.Key == "WithRotor")
|
||||||
|
node.Key = "WithSpriteRotorOverlay";
|
||||||
|
|
||||||
|
if (depth == 1 && node.Key == "-WithRotor")
|
||||||
|
node.Key = "-WithSpriteRotorOverlay";
|
||||||
|
}
|
||||||
|
|
||||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ TRAN:
|
|||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
Range: 10c0
|
Range: 10c0
|
||||||
Type: CenterPosition
|
Type: CenterPosition
|
||||||
WithRotor@PRIMARY:
|
WithSpriteRotorOverlay@PRIMARY:
|
||||||
Offset: -597,0,171
|
Offset: -597,0,171
|
||||||
Sequence: rotor2
|
Sequence: rotor2
|
||||||
GroundSequence: slow-rotor2
|
GroundSequence: slow-rotor2
|
||||||
WithRotor@SECONDARY:
|
WithSpriteRotorOverlay@SECONDARY:
|
||||||
Offset: 597,0,85
|
Offset: 597,0,85
|
||||||
Cargo:
|
Cargo:
|
||||||
Types: Infantry
|
Types: Infantry
|
||||||
@@ -80,7 +80,7 @@ HELI:
|
|||||||
SelfReloads: true
|
SelfReloads: true
|
||||||
ReloadCount: 10
|
ReloadCount: 10
|
||||||
SelfReloadTicks: 200
|
SelfReloadTicks: 200
|
||||||
WithRotor:
|
WithSpriteRotorOverlay:
|
||||||
Offset: 0,0,85
|
Offset: 0,0,85
|
||||||
WithMuzzleOverlay:
|
WithMuzzleOverlay:
|
||||||
SpawnActorOnDeath:
|
SpawnActorOnDeath:
|
||||||
@@ -224,9 +224,9 @@ TRAN.Husk:
|
|||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
Range: 8c0
|
Range: 8c0
|
||||||
Type: CenterPosition
|
Type: CenterPosition
|
||||||
WithRotor@PRIMARY:
|
WithSpriteRotorOverlay@PRIMARY:
|
||||||
Offset: -597,0,171
|
Offset: -597,0,171
|
||||||
WithRotor@SECONDARY:
|
WithSpriteRotorOverlay@SECONDARY:
|
||||||
Offset: 597,0,85
|
Offset: 597,0,85
|
||||||
RenderSprites:
|
RenderSprites:
|
||||||
Image: tran
|
Image: tran
|
||||||
@@ -241,7 +241,7 @@ HELI.Husk:
|
|||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
Range: 10c0
|
Range: 10c0
|
||||||
Type: CenterPosition
|
Type: CenterPosition
|
||||||
WithRotor:
|
WithSpriteRotorOverlay:
|
||||||
Offset: 0,0,85
|
Offset: 0,0,85
|
||||||
RenderSprites:
|
RenderSprites:
|
||||||
Image: heli
|
Image: heli
|
||||||
|
|||||||
@@ -221,11 +221,11 @@ TRAN:
|
|||||||
AltitudeVelocity: 0c100
|
AltitudeVelocity: 0c100
|
||||||
AirborneUpgrades: airborne
|
AirborneUpgrades: airborne
|
||||||
CanHover: True
|
CanHover: True
|
||||||
WithRotor@PRIMARY:
|
WithSpriteRotorOverlay@PRIMARY:
|
||||||
Offset: -597,0,341
|
Offset: -597,0,341
|
||||||
Sequence: rotor2
|
Sequence: rotor2
|
||||||
GroundSequence: slow-rotor2
|
GroundSequence: slow-rotor2
|
||||||
WithRotor@SECONDARY:
|
WithSpriteRotorOverlay@SECONDARY:
|
||||||
Offset: 597,0,213
|
Offset: 597,0,213
|
||||||
Cargo:
|
Cargo:
|
||||||
Types: Infantry
|
Types: Infantry
|
||||||
@@ -271,7 +271,7 @@ HELI:
|
|||||||
CanHover: True
|
CanHover: True
|
||||||
AutoTarget:
|
AutoTarget:
|
||||||
InitialStance: HoldFire
|
InitialStance: HoldFire
|
||||||
WithRotor:
|
WithSpriteRotorOverlay:
|
||||||
Offset: 0,0,85
|
Offset: 0,0,85
|
||||||
AmmoPool:
|
AmmoPool:
|
||||||
Ammo: 8
|
Ammo: 8
|
||||||
@@ -324,7 +324,7 @@ HIND:
|
|||||||
CanHover: True
|
CanHover: True
|
||||||
AutoTarget:
|
AutoTarget:
|
||||||
InitialStance: HoldFire
|
InitialStance: HoldFire
|
||||||
WithRotor:
|
WithSpriteRotorOverlay:
|
||||||
AmmoPool:
|
AmmoPool:
|
||||||
Ammo: 24
|
Ammo: 24
|
||||||
PipCount: 6
|
PipCount: 6
|
||||||
|
|||||||
@@ -90,9 +90,9 @@ TRAN.Husk:
|
|||||||
Speed: 149
|
Speed: 149
|
||||||
AirborneUpgrades: airborne
|
AirborneUpgrades: airborne
|
||||||
CanHover: True
|
CanHover: True
|
||||||
WithRotor@PRIMARY:
|
WithSpriteRotorOverlay@PRIMARY:
|
||||||
Offset: -597,0,341
|
Offset: -597,0,341
|
||||||
WithRotor@SECONDARY:
|
WithSpriteRotorOverlay@SECONDARY:
|
||||||
Offset: 597,0,213
|
Offset: 597,0,213
|
||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
Range: 12c0
|
Range: 12c0
|
||||||
@@ -184,7 +184,7 @@ HELI.Husk:
|
|||||||
Speed: 149
|
Speed: 149
|
||||||
AirborneUpgrades: airborne
|
AirborneUpgrades: airborne
|
||||||
CanHover: True
|
CanHover: True
|
||||||
WithRotor:
|
WithSpriteRotorOverlay:
|
||||||
Offset: 0,0,85
|
Offset: 0,0,85
|
||||||
SmokeTrailWhenDamaged:
|
SmokeTrailWhenDamaged:
|
||||||
Offset: -427,0,0
|
Offset: -427,0,0
|
||||||
@@ -204,7 +204,7 @@ HIND.Husk:
|
|||||||
Speed: 112
|
Speed: 112
|
||||||
AirborneUpgrades: airborne
|
AirborneUpgrades: airborne
|
||||||
CanHover: True
|
CanHover: True
|
||||||
WithRotor:
|
WithSpriteRotorOverlay:
|
||||||
SmokeTrailWhenDamaged:
|
SmokeTrailWhenDamaged:
|
||||||
Offset: -427,0,0
|
Offset: -427,0,0
|
||||||
MinDamage: Undamaged
|
MinDamage: Undamaged
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ APACHE:
|
|||||||
PipType: Ammo
|
PipType: Ammo
|
||||||
PipTypeEmpty: AmmoEmpty
|
PipTypeEmpty: AmmoEmpty
|
||||||
AutoTarget:
|
AutoTarget:
|
||||||
WithRotor:
|
WithSpriteRotorOverlay:
|
||||||
Offset: 85,0,384
|
Offset: 85,0,384
|
||||||
RenderSprites:
|
RenderSprites:
|
||||||
Hovers:
|
Hovers:
|
||||||
|
|||||||
Reference in New Issue
Block a user