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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user