rename for consistency

This commit is contained in:
Matthias Mailänder
2015-06-20 12:11:45 +02:00
parent 50e5e9df24
commit 0f8d22c9a6
7 changed files with 27 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Mods.Common.Traits
public class AnnounceOnBuildInfo : ITraitInfo public class AnnounceOnBuildInfo : ITraitInfo
{ {
[Desc("Voice to use when built/trained.")] [Desc("Voice to use when built/trained.")]
public readonly string BuildVoice = "Build"; [VoiceReference] public readonly string Voice = "Build";
public object Create(ActorInitializer init) { return new AnnounceOnBuild(init.Self, this); } public object Create(ActorInitializer init) { return new AnnounceOnBuild(init.Self, this); }
} }
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Traits
public void BuildingComplete(Actor self) public void BuildingComplete(Actor self)
{ {
self.PlayVoice(info.BuildVoice); self.PlayVoice(info.Voice);
} }
} }
} }

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly int Interval = 5; public readonly int Interval = 5;
[Desc("Voice to use when killing something.")] [Desc("Voice to use when killing something.")]
public readonly string KillVoice = "Kill"; [VoiceReference] public readonly string Voice = "Kill";
public object Create(ActorInitializer init) { return new AnnounceOnKill(init.Self, this); } public object Create(ActorInitializer init) { return new AnnounceOnKill(init.Self, this); }
} }
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits
if (e.DamageState == DamageState.Dead && damaged != e.Attacker) if (e.DamageState == DamageState.Dead && damaged != e.Attacker)
{ {
if (self.World.WorldTick - lastAnnounce > info.Interval * 25) if (self.World.WorldTick - lastAnnounce > info.Interval * 25)
self.PlayVoice(info.KillVoice); self.PlayVoice(info.Voice);
lastAnnounce = self.World.WorldTick; lastAnnounce = self.World.WorldTick;
} }

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
public class DeathSoundsInfo : ITraitInfo public class DeathSoundsInfo : ITraitInfo
{ {
[Desc("Death notification voice.")] [Desc("Death notification voice.")]
public readonly string DeathSound = "Die"; [VoiceReference] public readonly string Voice = "Die";
[Desc("Multiply volume with this factor.")] [Desc("Multiply volume with this factor.")]
public readonly float VolumeMultiplier = 1f; public readonly float VolumeMultiplier = 1f;
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits
return; return;
if (info.DeathTypes.Intersect(e.Warhead.DamageTypes).Any()) if (info.DeathTypes.Intersect(e.Warhead.DamageTypes).Any())
self.PlayVoiceLocal(info.DeathSound, info.VolumeMultiplier); self.PlayVoiceLocal(info.Voice, info.VolumeMultiplier);
} }
} }
} }

View File

@@ -1175,6 +1175,21 @@ namespace OpenRA.Mods.Common.UtilityCommands
Console.WriteLine("See RA and C&C bridge huts or crates for reference."); Console.WriteLine("See RA and C&C bridge huts or crates for reference.");
} }
if (engineVersion < 20150620)
{
if (depth == 2)
{
if (node.Key == "DeathSound")
node.Key = "Voice";
if (node.Key == "KillVoice")
node.Key = "Voice";
if (node.Key == "BuildVoice")
node.Key = "Voice";
}
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
} }
} }

View File

@@ -236,10 +236,10 @@
DeathSounds@NORMAL: DeathSounds@NORMAL:
DeathTypes: DefaultDeath, BulletDeath, SmallExplosionDeath, ExplosionDeath DeathTypes: DefaultDeath, BulletDeath, SmallExplosionDeath, ExplosionDeath
DeathSounds@BURNED: DeathSounds@BURNED:
DeathSound: Burned Voice: Burned
DeathTypes: FireDeath DeathTypes: FireDeath
DeathSounds@POISONED: DeathSounds@POISONED:
DeathSound: Poisoned Voice: Poisoned
DeathTypes: TiberiumDeath DeathTypes: TiberiumDeath
UpgradeManager: UpgradeManager:
MustBeDestroyed: MustBeDestroyed:

View File

@@ -229,10 +229,10 @@
DeathSounds@NORMAL: DeathSounds@NORMAL:
DeathTypes: DefaultDeath, BulletDeath, SmallExplosionDeath, ExplosionDeath DeathTypes: DefaultDeath, BulletDeath, SmallExplosionDeath, ExplosionDeath
DeathSounds@BURNED: DeathSounds@BURNED:
DeathSound: Burned Voice: Burned
DeathTypes: FireDeath DeathTypes: FireDeath
DeathSounds@ZAPPED: DeathSounds@ZAPPED:
DeathSound: Zapped Voice: Zapped
DeathTypes: ElectricityDeath DeathTypes: ElectricityDeath
Parachutable: Parachutable:
ParachuteOffset: 0,0,427 ParachuteOffset: 0,0,427

View File

@@ -270,10 +270,10 @@
DeathSounds@NORMAL: DeathSounds@NORMAL:
DeathTypes: BulletDeath, SmallExplosionDeath, ExplosionDeath DeathTypes: BulletDeath, SmallExplosionDeath, ExplosionDeath
DeathSounds@BURNED: DeathSounds@BURNED:
DeathSound: Burned Voice: Burned
DeathTypes: FireDeath DeathTypes: FireDeath
DeathSounds@ZAPPED: DeathSounds@ZAPPED:
DeathSound: Zapped Voice: Zapped
DeathTypes: EnergyDeath DeathTypes: EnergyDeath
UpgradeManager: UpgradeManager:
Cloak@CLOAKGENERATOR: Cloak@CLOAKGENERATOR: