InfDeath -> DeathType renaming.

This commit is contained in:
reaperrr
2014-08-30 01:47:20 +02:00
parent c1ca55b303
commit 3725ce4f7b
17 changed files with 228 additions and 228 deletions

View File

@@ -22,8 +22,8 @@ namespace OpenRA.Mods.RA
[Desc("Multiply volume with this factor.")]
public readonly float VolumeMultiplier = 1f;
[Desc("InfDeaths that this should be used for. If empty, this will be used as the default sound.")]
public readonly string[] InfDeaths = { };
[Desc("DeathTypes that this should be used for. If empty, this will be used as the default sound.")]
public readonly string[] DeathTypes = { };
public object Create(ActorInitializer init) { return new DeathSounds(this); }
}
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA
var cp = self.CenterPosition;
if (info.InfDeaths.Contains(e.Warhead.InfDeath) || (!info.InfDeaths.Any() && !self.Info.Traits.WithInterface<DeathSoundsInfo>().Any(dsi => dsi.InfDeaths.Contains(e.Warhead.InfDeath))))
if (info.DeathTypes.Contains(e.Warhead.DeathType) || (!info.DeathTypes.Any() && !self.Info.Traits.WithInterface<DeathSoundsInfo>().Any(dsi => dsi.DeathTypes.Contains(e.Warhead.DeathType))))
Sound.PlayVoiceLocal(info.DeathSound, self, self.Owner.Country.Race, cp, info.VolumeMultiplier);
}
}

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.RA
public readonly string EmptyWeapon = "UnitExplode";
public readonly int Chance = 100;
public readonly string[] InfDeath = null;
public readonly string[] DeathType = null;
public object Create(ActorInitializer init) { return new Explodes(this); }
}
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA
if (self.World.SharedRandom.Next(100) > explodesInfo.Chance)
return;
if (explodesInfo.InfDeath != null && e.Warhead != null && !explodesInfo.InfDeath.Contains(e.Warhead.InfDeath))
if (explodesInfo.DeathType != null && e.Warhead != null && !explodesInfo.DeathType.Contains(e.Warhead.DeathType))
return;
var weaponName = ChooseWeaponForExplosion(self);

View File

@@ -160,7 +160,7 @@ namespace OpenRA.Mods.RA.Render
if (info.SpawnsCorpse)
{
SpawnCorpse(self, info.DeathAnimationPrefix + (e.Warhead.InfDeath));
SpawnCorpse(self, info.DeathAnimationPrefix + (e.Warhead.DeathType));
}
}