aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-02-07 11:22:29 -0500
committerGitHub <[email protected]>2017-02-07 11:22:29 -0500
commit8e553e14e40bebd71ef41675d276df47fbf6d665 (patch)
treec2ec14c7b4bba357356b7d8a3358eb84a0e714fe
parent82de84638ab857512181d5ed4ad0b5010bca1213 (diff)
parent22e567ca3fac3878d3c9b7a2207bd0821a34d7c1 (diff)
downloadshiftos_thereturn-8e553e14e40bebd71ef41675d276df47fbf6d665.tar.gz
shiftos_thereturn-8e553e14e40bebd71ef41675d276df47fbf6d665.tar.bz2
shiftos_thereturn-8e553e14e40bebd71ef41675d276df47fbf6d665.zip
Merge pull request #54 from aren-cllc/master
Added audio.mute and shiftorium upgrade for audio commands
-rw-r--r--ShiftOS_TheReturn/Commands.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs
index 2e70151..7df700f 100644
--- a/ShiftOS_TheReturn/Commands.cs
+++ b/ShiftOS_TheReturn/Commands.cs
@@ -112,6 +112,7 @@ namespace ShiftOS.Engine
{
[Command("setvol", description = "Set the volume of the system audio to anywhere between 0 and 100.")]
[RequiresArgument("value")]
+ [RequiresUpgrade("audio_volume")]
public static bool SetVolume(Dictionary<string,object> args)
{
int val = Convert.ToInt32(args["value"].ToString());
@@ -119,6 +120,13 @@ namespace ShiftOS.Engine
AudioManager.SetVolume(volume);
return true;
}
+ [RequiresUpgrade("audio_volume")]
+ [Command("mute", description = "Sets the volume of the system audio to 0")]
+ public static bool MuteAudio()
+ {
+ AudioManager.SetVolume(0);
+ return true;
+ }
}
[RequiresUpgrade("mud_fundamentals")]