Cleaned up IVoiced-related code.

Added Volume control and descriptions to Voiced.

Streamline voice checks in WorldUtils and DeathSounds.
This commit is contained in:
reaperrr
2015-05-14 17:48:35 +02:00
parent 251d3e6864
commit 5f68516070
8 changed files with 57 additions and 73 deletions

View File

@@ -207,7 +207,7 @@ namespace OpenRA.Mods.Common.Traits
if (order.OrderString != "Unload" || IsEmpty(self))
return null;
return self.TraitsImplementing<IVoiced>().FirstOrDefault().HasVoice(self, "Unload") ? "Unload" : "Move";
return self.TraitsImplementing<IVoiced>().Any(x => x.HasVoice(self, "Unload")) ? "Unload" : "Move";
}
public bool MoveDisabled(Actor self) { return reserves.Any(); }