rename for consistency
This commit is contained in:
@@ -16,7 +16,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class AnnounceOnBuildInfo : ITraitInfo
|
||||
{
|
||||
[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); }
|
||||
}
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public void BuildingComplete(Actor self)
|
||||
{
|
||||
self.PlayVoice(info.BuildVoice);
|
||||
self.PlayVoice(info.Voice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly int Interval = 5;
|
||||
|
||||
[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); }
|
||||
}
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (e.DamageState == DamageState.Dead && damaged != e.Attacker)
|
||||
{
|
||||
if (self.World.WorldTick - lastAnnounce > info.Interval * 25)
|
||||
self.PlayVoice(info.KillVoice);
|
||||
self.PlayVoice(info.Voice);
|
||||
|
||||
lastAnnounce = self.World.WorldTick;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class DeathSoundsInfo : ITraitInfo
|
||||
{
|
||||
[Desc("Death notification voice.")]
|
||||
public readonly string DeathSound = "Die";
|
||||
[VoiceReference] public readonly string Voice = "Die";
|
||||
|
||||
[Desc("Multiply volume with this factor.")]
|
||||
public readonly float VolumeMultiplier = 1f;
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return;
|
||||
|
||||
if (info.DeathTypes.Intersect(e.Warhead.DamageTypes).Any())
|
||||
self.PlayVoiceLocal(info.DeathSound, info.VolumeMultiplier);
|
||||
self.PlayVoiceLocal(info.Voice, info.VolumeMultiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1175,6 +1175,21 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,10 +236,10 @@
|
||||
DeathSounds@NORMAL:
|
||||
DeathTypes: DefaultDeath, BulletDeath, SmallExplosionDeath, ExplosionDeath
|
||||
DeathSounds@BURNED:
|
||||
DeathSound: Burned
|
||||
Voice: Burned
|
||||
DeathTypes: FireDeath
|
||||
DeathSounds@POISONED:
|
||||
DeathSound: Poisoned
|
||||
Voice: Poisoned
|
||||
DeathTypes: TiberiumDeath
|
||||
UpgradeManager:
|
||||
MustBeDestroyed:
|
||||
|
||||
@@ -229,10 +229,10 @@
|
||||
DeathSounds@NORMAL:
|
||||
DeathTypes: DefaultDeath, BulletDeath, SmallExplosionDeath, ExplosionDeath
|
||||
DeathSounds@BURNED:
|
||||
DeathSound: Burned
|
||||
Voice: Burned
|
||||
DeathTypes: FireDeath
|
||||
DeathSounds@ZAPPED:
|
||||
DeathSound: Zapped
|
||||
Voice: Zapped
|
||||
DeathTypes: ElectricityDeath
|
||||
Parachutable:
|
||||
ParachuteOffset: 0,0,427
|
||||
|
||||
@@ -270,10 +270,10 @@
|
||||
DeathSounds@NORMAL:
|
||||
DeathTypes: BulletDeath, SmallExplosionDeath, ExplosionDeath
|
||||
DeathSounds@BURNED:
|
||||
DeathSound: Burned
|
||||
Voice: Burned
|
||||
DeathTypes: FireDeath
|
||||
DeathSounds@ZAPPED:
|
||||
DeathSound: Zapped
|
||||
Voice: Zapped
|
||||
DeathTypes: EnergyDeath
|
||||
UpgradeManager:
|
||||
Cloak@CLOAKGENERATOR:
|
||||
|
||||
Reference in New Issue
Block a user