From a7f27a65eaf168453b11e0bd7c500c53a7a34ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 1 Nov 2014 20:14:05 +0100 Subject: [PATCH] add Media.StopMusic() --- OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs index a72afb854a..1f0d51cda9 100644 --- a/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs @@ -106,6 +106,12 @@ namespace OpenRA.Mods.Common.Scripting previousMusic = Sound.CurrentMusic; } + [Desc("Stop the current song.")] + public void StopMusic() + { + Sound.StopMusic(); + } + [Desc("Display a text message to the player.")] public void DisplayMessage(string text, string prefix = "Mission") // TODO: expose HSLColor to Lua and add as parameter {