Rename WithMuzzleFlash to WithMuzzleOverlay

This commit is contained in:
reaperrr
2015-09-20 00:31:13 +02:00
parent cdd4590ece
commit 5b5164211e
21 changed files with 62 additions and 52 deletions

View File

@@ -433,7 +433,7 @@
<Compile Include="Traits\Render\WithHarvestAnimation.cs" /> <Compile Include="Traits\Render\WithHarvestAnimation.cs" />
<Compile Include="Traits\Render\WithHarvestOverlay.cs" /> <Compile Include="Traits\Render\WithHarvestOverlay.cs" />
<Compile Include="Traits\Render\WithIdleOverlay.cs" /> <Compile Include="Traits\Render\WithIdleOverlay.cs" />
<Compile Include="Traits\Render\WithMuzzleFlash.cs" /> <Compile Include="Traits\Render\WithMuzzleOverlay.cs" />
<Compile Include="Traits\Render\WithParachute.cs" /> <Compile Include="Traits\Render\WithParachute.cs" />
<Compile Include="Traits\Render\WithRangeCircle.cs" /> <Compile Include="Traits\Render\WithRangeCircle.cs" />
<Compile Include="Traits\Render\WithRankDecoration.cs" /> <Compile Include="Traits\Render\WithRankDecoration.cs" />

View File

@@ -17,22 +17,22 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Renders the MuzzleSequence from the Armament trait.")] [Desc("Renders the MuzzleSequence from the Armament trait.")]
class WithMuzzleFlashInfo : UpgradableTraitInfo, Requires<RenderSpritesInfo>, Requires<AttackBaseInfo>, Requires<ArmamentInfo> class WithMuzzleOverlayInfo : UpgradableTraitInfo, Requires<RenderSpritesInfo>, Requires<AttackBaseInfo>, Requires<ArmamentInfo>
{ {
[Desc("Ignore the weapon position, and always draw relative to the center of the actor")] [Desc("Ignore the weapon position, and always draw relative to the center of the actor")]
public readonly bool IgnoreOffset = false; public readonly bool IgnoreOffset = false;
public override object Create(ActorInitializer init) { return new WithMuzzleFlash(init.Self, this); } public override object Create(ActorInitializer init) { return new WithMuzzleOverlay(init.Self, this); }
} }
class WithMuzzleFlash : UpgradableTrait<WithMuzzleFlashInfo>, INotifyAttack, IRender, ITick class WithMuzzleOverlay : UpgradableTrait<WithMuzzleOverlayInfo>, INotifyAttack, IRender, ITick
{ {
readonly Dictionary<Barrel, bool> visible = new Dictionary<Barrel, bool>(); readonly Dictionary<Barrel, bool> visible = new Dictionary<Barrel, bool>();
readonly Dictionary<Barrel, AnimationWithOffset> anims = new Dictionary<Barrel, AnimationWithOffset>(); readonly Dictionary<Barrel, AnimationWithOffset> anims = new Dictionary<Barrel, AnimationWithOffset>();
readonly Func<int> getFacing; readonly Func<int> getFacing;
readonly Armament[] armaments; readonly Armament[] armaments;
public WithMuzzleFlash(Actor self, WithMuzzleFlashInfo info) public WithMuzzleOverlay(Actor self, WithMuzzleOverlayInfo info)
: base(info) : base(info)
{ {
var render = self.Trait<RenderSprites>(); var render = self.Trait<RenderSprites>();

View File

@@ -2138,6 +2138,16 @@ namespace OpenRA.Mods.Common.UtilityCommands
node.Value.Value = node.Value.Value + "c0"; node.Value.Value = node.Value.Value + "c0";
} }
if (engineVersion < 20150920)
{
// Rename WithMuzzleFlash to WithMuzzleOverlay
if (depth == 1 && node.Key.StartsWith("WithMuzzleFlash"))
node.Key = node.Key.Replace("WithMuzzleFlash", "WithMuzzleOverlay");
if (depth == 1 && node.Key.StartsWith("-WithMuzzleFlash"))
node.Key = node.Key.Replace("-WithMuzzleFlash", "-WithMuzzleOverlay");
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -84,7 +84,7 @@ HELI:
SelfReloadTicks: 200 SelfReloadTicks: 200
WithRotor: WithRotor:
Offset: 0,0,85 Offset: 0,0,85
WithMuzzleFlash: WithMuzzleOverlay:
SpawnActorOnDeath: SpawnActorOnDeath:
Actor: HELI.Husk Actor: HELI.Husk
AutoTarget: AutoTarget:
@@ -205,7 +205,7 @@ A10:
Name: gun Name: gun
Weapon: Vulcan Weapon: Vulcan
LocalOffset: 1024,0,-85 LocalOffset: 1024,0,-85
WithMuzzleFlash: WithMuzzleOverlay:
Armament@BOMBS: Armament@BOMBS:
Name: bombs Name: bombs
Weapon: Napalm Weapon: Napalm

View File

@@ -377,7 +377,7 @@
BodyOrientation: BodyOrientation:
QuantizedFacings: 8 QuantizedFacings: 8
WithSpriteBody: WithSpriteBody:
WithMuzzleFlash: WithMuzzleOverlay:
SplitFacings: true SplitFacings: true
Guard: Guard:
Voice: Move Voice: Move

View File

@@ -92,7 +92,7 @@ E4:
MuzzleSequence: muzzle MuzzleSequence: muzzle
MuzzleSplitFacings: 8 MuzzleSplitFacings: 8
AttackFrontal: AttackFrontal:
WithMuzzleFlash: WithMuzzleOverlay:
SplitFacings: true SplitFacings: true
WithInfantryBody: WithInfantryBody:
AttackSequence: shoot AttackSequence: shoot
@@ -124,7 +124,7 @@ E5:
MuzzleSequence: muzzle MuzzleSequence: muzzle
MuzzleSplitFacings: 8 MuzzleSplitFacings: 8
AttackFrontal: AttackFrontal:
WithMuzzleFlash: WithMuzzleOverlay:
SplitFacings: true SplitFacings: true
-PoisonedByTiberium: -PoisonedByTiberium:
WithInfantryBody: WithInfantryBody:

View File

@@ -659,7 +659,7 @@ GUN:
LocalOffset: 512,0,112 LocalOffset: 512,0,112
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
-WithDeathAnimation: -WithDeathAnimation:
DetectCloaked: DetectCloaked:
Range: 3c0 Range: 3c0
@@ -700,7 +700,7 @@ SAM:
Weapon: SAMMissile Weapon: SAMMissile
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackPopupTurreted: AttackPopupTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
-RenderDetectionCircle: -RenderDetectionCircle:
Power: Power:
Amount: -20 Amount: -20
@@ -779,7 +779,7 @@ GTWR:
QuantizedFacings: 8 QuantizedFacings: 8
DetectCloaked: DetectCloaked:
Range: 3c0 Range: 3c0
WithMuzzleFlash: WithMuzzleOverlay:
Turreted: Turreted:
ROT: 255 ROT: 255
Power: Power:

View File

@@ -113,7 +113,7 @@ APC:
LocalOffset: 85,85,299, 85,-85,299 LocalOffset: 85,85,299, 85,-85,299
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
Cargo: Cargo:
@@ -148,7 +148,7 @@ ARTY:
LocalOffset: 624,0,208 LocalOffset: 624,0,208
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackFrontal: AttackFrontal:
WithMuzzleFlash: WithMuzzleOverlay:
AutoTarget: AutoTarget:
InitialStance: Defend InitialStance: Defend
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -185,7 +185,7 @@ FTNK:
MuzzleSplitFacings: 8 MuzzleSplitFacings: 8
AttackFrontal: AttackFrontal:
AutoTarget: AutoTarget:
WithMuzzleFlash: WithMuzzleOverlay:
SplitFacings: true SplitFacings: true
Explodes: Explodes:
Weapon: FlametankExplode Weapon: FlametankExplode
@@ -221,7 +221,7 @@ BGGY:
LocalOffset: 171,0,43 LocalOffset: 171,0,43
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -291,7 +291,7 @@ JEEP:
LocalOffset: 171,0,85 LocalOffset: 171,0,85
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -326,7 +326,7 @@ LTNK:
LocalOffset: 720,0,90 LocalOffset: 720,0,90
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -360,7 +360,7 @@ MTNK:
LocalOffset: 768,0,90 LocalOffset: 768,0,90
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -406,7 +406,7 @@ HTNK:
Recoil: 10 Recoil: 10
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
AutoTarget: AutoTarget:
SelfHealing: SelfHealing:
Ticks: 10 Ticks: 10

View File

@@ -549,7 +549,7 @@ medium_gun_turret:
Range: 8c0 Range: 8c0
BodyOrientation: BodyOrientation:
QuantizedFacings: 32 QuantizedFacings: 32
WithMuzzleFlash: WithMuzzleOverlay:
Turreted: Turreted:
ROT: 6 ROT: 6
InitialFacing: 128 InitialFacing: 128

View File

@@ -107,7 +107,7 @@ trike:
Speed: 128 Speed: 128
RevealsShroud: RevealsShroud:
Range: 7c0 Range: 7c0
WithMuzzleFlash: WithMuzzleOverlay:
Armament@damage: Armament@damage:
Weapon: HMG Weapon: HMG
LocalOffset: -416,0,0 LocalOffset: -416,0,0
@@ -187,7 +187,7 @@ siege_tank:
LocalOffset: 512,0,320 LocalOffset: 512,0,320
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackFrontal: AttackFrontal:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
Explodes: Explodes:
Weapon: UnitExplodeMed Weapon: UnitExplodeMed
@@ -297,7 +297,7 @@ devastator:
LocalOffset: 640,0,32 LocalOffset: 640,0,32
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackFrontal: AttackFrontal:
WithMuzzleFlash: WithMuzzleOverlay:
IgnoreOffset: true IgnoreOffset: true
AutoTarget: AutoTarget:
Explodes: Explodes:
@@ -330,7 +330,7 @@ raider:
Speed: 149 Speed: 149
RevealsShroud: RevealsShroud:
Range: 7c0 Range: 7c0
WithMuzzleFlash: WithMuzzleOverlay:
Armament@damage: Armament@damage:
Weapon: HMGo Weapon: HMGo
LocalOffset: 170,0,0 LocalOffset: 170,0,0
@@ -430,7 +430,7 @@ deviator:
LocalOffset: 256,0,0 LocalOffset: 256,0,0
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
Explodes: Explodes:

View File

@@ -1382,7 +1382,7 @@ Rules:
-Huntable: -Huntable:
-Targetable: -Targetable:
-Armament: -Armament:
-WithMuzzleFlash: -WithMuzzleOverlay:
Cargo: Cargo:
Types: ~disabled Types: ~disabled
RevealsShroud: RevealsShroud:

View File

@@ -236,8 +236,8 @@ Rules:
Name: secondary Name: secondary
Weapon: M60mg Weapon: M60mg
AttackFrontal: AttackFrontal:
WithMuzzleFlash@PRIMARY: WithMuzzleOverlay@PRIMARY:
WithMuzzleFlash@SECONDARY: WithMuzzleOverlay@SECONDARY:
Armament: secondary Armament: secondary
MustBeDestroyed: MustBeDestroyed:
RequiredForShortGame: true RequiredForShortGame: true

View File

@@ -2206,7 +2206,7 @@ Rules:
Recoil: 43 Recoil: 43
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
Explodes: Explodes:

View File

@@ -182,7 +182,7 @@ YAK:
ReturnOnIdle: ReturnOnIdle:
SelectionDecorations: SelectionDecorations:
VisualBounds: 30,28,0,2 VisualBounds: 30,28,0,2
WithMuzzleFlash: WithMuzzleOverlay:
Contrail: Contrail:
Offset: -853,0,0 Offset: -853,0,0
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -328,7 +328,7 @@ HIND:
ReloadTicks: 8 ReloadTicks: 8
SelectionDecorations: SelectionDecorations:
VisualBounds: 38,32,0,0 VisualBounds: 38,32,0,0
WithMuzzleFlash: WithMuzzleOverlay:
SpawnActorOnDeath: SpawnActorOnDeath:
Actor: HIND.Husk Actor: HIND.Husk
SmokeTrailWhenDamaged: SmokeTrailWhenDamaged:

View File

@@ -199,7 +199,7 @@ CA:
RecoilRecovery: 34 RecoilRecovery: 34
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
SelectionDecorations: SelectionDecorations:
VisualBounds: 44,44 VisualBounds: 44,44
WithTurret@PRIMARY: WithTurret@PRIMARY:
@@ -272,7 +272,7 @@ PT:
Weapon: DepthCharge Weapon: DepthCharge
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
SelectionDecorations: SelectionDecorations:
VisualBounds: 36,36 VisualBounds: 36,36
WithTurret: WithTurret:

View File

@@ -454,7 +454,7 @@ AGUN:
LocalOffset: 432,150,-30, 432,-150,-30 LocalOffset: 432,150,-30, 432,-150,-30
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
RenderRangeCircle: RenderRangeCircle:
RangeCircleType: aa RangeCircleType: aa
Power: Power:
@@ -616,7 +616,7 @@ GUN:
LocalOffset: 512,0,112 LocalOffset: 512,0,112
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
Power: Power:
Amount: -40 Amount: -40
DetectCloaked: DetectCloaked:
@@ -692,7 +692,7 @@ SAM:
Weapon: Nike Weapon: Nike
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
RenderRangeCircle: RenderRangeCircle:
RangeCircleType: aa RangeCircleType: aa
Power: Power:

View File

@@ -60,7 +60,7 @@ V2RL:
LocalOffset: 768,0,90 LocalOffset: 768,0,90
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -97,7 +97,7 @@ V2RL:
LocalOffset: 720,0,80 LocalOffset: 720,0,80
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -136,7 +136,7 @@ V2RL:
LocalOffset: 768,85,90, 768,-85,90 LocalOffset: 768,85,90, 768,-85,90
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -184,7 +184,7 @@ V2RL:
Recoil: 43 Recoil: 43
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SpawnActorOnDeath: SpawnActorOnDeath:
@@ -224,7 +224,7 @@ ARTY:
LocalOffset: 624,0,208 LocalOffset: 624,0,208
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackFrontal: AttackFrontal:
WithMuzzleFlash: WithMuzzleOverlay:
Explodes: Explodes:
Weapon: ArtilleryExplode Weapon: ArtilleryExplode
EmptyWeapon: UnitExplodeSmall EmptyWeapon: UnitExplodeSmall
@@ -343,7 +343,7 @@ JEEP:
Weapon: M60mg Weapon: M60mg
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
Cargo: Cargo:
@@ -378,7 +378,7 @@ APC:
LocalOffset: 0,0,171 LocalOffset: 0,0,171
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackFrontal: AttackFrontal:
WithMuzzleFlash: WithMuzzleOverlay:
AutoTarget: AutoTarget:
Cargo: Cargo:
Types: Infantry Types: Infantry
@@ -601,7 +601,7 @@ FTRK:
LocalOffset: 512,0,192 LocalOffset: 512,0,192
MuzzleSequence: muzzle MuzzleSequence: muzzle
AttackTurreted: AttackTurreted:
WithMuzzleFlash: WithMuzzleOverlay:
WithTurret: WithTurret:
AutoTarget: AutoTarget:
SelectionDecorations: SelectionDecorations:

View File

@@ -32,7 +32,7 @@
DamageCooldown: 200 DamageCooldown: 200
WithVoxelTurret: WithVoxelTurret:
WithVoxelBarrel: WithVoxelBarrel:
WithMuzzleFlash: WithMuzzleOverlay:
^TRUCK: ^TRUCK:
Inherits: ^CivilianVoxelVehicle Inherits: ^CivilianVoxelVehicle

View File

@@ -99,7 +99,7 @@ GACTWR:
UpgradeMinEnabledLevel: 1 UpgradeMinEnabledLevel: 1
Weapon: RedEye2 Weapon: RedEye2
LocalOffset: 512,0,512 LocalOffset: 512,0,512
WithMuzzleFlash: WithMuzzleOverlay:
UpgradeTypes: tower.vulcan UpgradeTypes: tower.vulcan
UpgradeMinEnabledLevel: 1 UpgradeMinEnabledLevel: 1
WithIdleOverlay@LIGHTS: WithIdleOverlay@LIGHTS:

View File

@@ -183,7 +183,7 @@ GATICK:
TransformSounds: place2.aud TransformSounds: place2.aud
NoTransformSounds: NoTransformSounds:
Voice: Move Voice: Move
WithMuzzleFlash: WithMuzzleOverlay:
GAARTY: GAARTY:
Inherits@1: ^DeployedVehicle Inherits@1: ^DeployedVehicle
@@ -218,7 +218,7 @@ GAARTY:
TransformSounds: place2.aud TransformSounds: place2.aud
NoTransformSounds: NoTransformSounds:
Voice: Move Voice: Move
WithMuzzleFlash: WithMuzzleOverlay:
NAMISL: NAMISL:
Inherits: ^Building Inherits: ^Building

View File

@@ -26,7 +26,7 @@ BGGY:
AttackFrontal: AttackFrontal:
Voice: Attack Voice: Attack
AutoTarget: AutoTarget:
WithMuzzleFlash: WithMuzzleOverlay:
BIKE: BIKE:
Inherits: ^VoxelVehicle Inherits: ^VoxelVehicle
@@ -97,7 +97,7 @@ TTNK:
UpgradeTypes: eliteweapon UpgradeTypes: eliteweapon
UpgradeMinEnabledLevel: 1 UpgradeMinEnabledLevel: 1
MuzzleSequence: muzzle MuzzleSequence: muzzle
WithMuzzleFlash: WithMuzzleOverlay:
RevealsShroud: RevealsShroud:
Range: 5c0 Range: 5c0
Transforms: Transforms: