add sound file playing to the Lua API

This commit is contained in:
Matthias Mailänder
2015-05-03 22:17:48 +02:00
parent 24444d4af3
commit 06f92c5b94

View File

@@ -45,6 +45,12 @@ namespace OpenRA.Mods.Common.Scripting
Sound.PlayNotification(world.Map.Rules, player, "Sounds", notification, player != null ? player.Country.Race : null);
}
[Desc("Play a sound file")]
public void PlaySound(string file)
{
Sound.Play(file);
}
MusicInfo previousMusic;
Action onComplete;
[Desc("Play track defined in music.yaml or keep it empty for a random song.")]