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\WithHarvestOverlay.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\WithRangeCircle.cs" />
<Compile Include="Traits\Render\WithRankDecoration.cs" />

View File

@@ -17,22 +17,22 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[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")]
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, AnimationWithOffset> anims = new Dictionary<Barrel, AnimationWithOffset>();
readonly Func<int> getFacing;
readonly Armament[] armaments;
public WithMuzzleFlash(Actor self, WithMuzzleFlashInfo info)
public WithMuzzleOverlay(Actor self, WithMuzzleOverlayInfo info)
: base(info)
{
var render = self.Trait<RenderSprites>();

View File

@@ -2138,6 +2138,16 @@ namespace OpenRA.Mods.Common.UtilityCommands
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);
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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