Skip to content

Commit

Permalink
add sound file playing to the Lua API
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Jul 5, 2015
1 parent 24444d4 commit 06f92c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public void PlaySoundNotification(Player player, string notification)
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.")]
Expand Down

0 comments on commit 06f92c5

Please sign in to comment.