aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/Commands.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-01-29 12:11:31 -0500
committerMichael <[email protected]>2017-01-29 12:11:31 -0500
commit11f838ea2340b50a7899cf9fb2569b0826aef001 (patch)
treecd4834c0e38748716bae77e916989f1cc7fa55e2 /ShiftOS_TheReturn/Commands.cs
parentabfd774638d509a0d5fe5a61fe69b890fa3e0fc6 (diff)
downloadshiftos_thereturn-11f838ea2340b50a7899cf9fb2569b0826aef001.tar.gz
shiftos_thereturn-11f838ea2340b50a7899cf9fb2569b0826aef001.tar.bz2
shiftos_thereturn-11f838ea2340b50a7899cf9fb2569b0826aef001.zip
Add audio.setvol command for setting track volume
Diffstat (limited to 'ShiftOS_TheReturn/Commands.cs')
-rw-r--r--ShiftOS_TheReturn/Commands.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs
index 64cb72a..bfcdb7e 100644
--- a/ShiftOS_TheReturn/Commands.cs
+++ b/ShiftOS_TheReturn/Commands.cs
@@ -44,6 +44,20 @@ using ShiftOS.Objects.ShiftFS;
namespace ShiftOS.Engine
{
+ [Namespace("audio")]
+ public static class AudioCommands
+ {
+ [Command("setvol", description = "Set the volume of the system audio to anywhere between 0 and 100.")]
+ [RequiresArgument("value")]
+ public static bool SetVolume(Dictionary<string,object> args)
+ {
+ int val = Convert.ToInt32(args["value"].ToString());
+ float volume = (val / 100F);
+ AudioManager.SetVolume(volume);
+ return true;
+ }
+ }
+
[RequiresUpgrade("mud_fundamentals")]
[Namespace("mud")]
public static class MUDCommands