diff options
| author | Michael <[email protected]> | 2017-05-13 10:22:51 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-13 10:22:51 -0400 |
| commit | c0f0e99f9d2a092209e710107c1f061fc8a2eaca (patch) | |
| tree | 98169cbdfdc13966719671178ba982dbad5808e3 /ShiftOS_TheReturn/Commands.cs | |
| parent | 94e1603b8574b45b809d3c66b6b90e7734a99d1e (diff) | |
| download | shiftos_thereturn-c0f0e99f9d2a092209e710107c1f061fc8a2eaca.tar.gz shiftos_thereturn-c0f0e99f9d2a092209e710107c1f061fc8a2eaca.tar.bz2 shiftos_thereturn-c0f0e99f9d2a092209e710107c1f061fc8a2eaca.zip | |
Dithering, audio volume, and fix shutdown bug
Diffstat (limited to 'ShiftOS_TheReturn/Commands.cs')
| -rw-r--r-- | ShiftOS_TheReturn/Commands.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs index 5b7674a..6e59311 100644 --- a/ShiftOS_TheReturn/Commands.cs +++ b/ShiftOS_TheReturn/Commands.cs @@ -378,6 +378,40 @@ namespace ShiftOS.Engine [Namespace("sos")] public static class ShiftOSCommands { + [Command("setsfxvolume", description = "Set the volume of various sound effects to a value between 1 and 100.")] + [RequiresArgument("value")] + public static bool SetSfxVolume(Dictionary<string, object> args) + { + int value = int.Parse(args["value"].ToString()); + if (value >= 0 && value <= 100) + { + SaveSystem.CurrentSave.SfxVolume = value; + SaveSystem.SaveGame(); + } + else + { + Console.WriteLine("Volume must be between 0 and 100!"); + } + return true; + } + + [Command("setmusicvolume", description ="Set the music volume to a value between 1 and 100.")] + [RequiresArgument("value")] + public static bool SetMusicVolume(Dictionary<string, object> args) + { + int value = int.Parse(args["value"].ToString()); + if(value >= 0 && value <= 100) + { + SaveSystem.CurrentSave.MusicVolume = value; + SaveSystem.SaveGame(); + } + else + { + Console.WriteLine("Volume must be between 0 and 100!"); + } + return true; + } + [RemoteLock] [Command("shutdown")] public static bool Shutdown() |
