Add support for C&C Covert Ops music (fixes half of #824).

This commit is contained in:
Paul Chote
2011-06-25 14:43:45 +12:00
parent 24a649d491
commit b64c5e001e
2 changed files with 35 additions and 5 deletions

View File

@@ -21,9 +21,11 @@ namespace OpenRA.GameRules
public MusicInfo( string key, MiniYaml value )
{
Filename = key+".aud";
Title = value.Value;
var nd = value.NodesDict;
var ext = nd.ContainsKey("Extension") ? nd["Extension"].Value : "aud";
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key)+"."+ext;
if (!FileSystem.Exists(Filename))
return;