aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Server/SaveManager.cs
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-02-15 21:30:58 +0000
committerMichael VanOverbeek <[email protected]>2017-02-15 21:31:03 +0000
commit91f97a65b2c6d1fad3a211a6739a49d9908f69a2 (patch)
treeae91161012ad62f8d35377369557bff14cd18718 /ShiftOS.Server/SaveManager.cs
parent9729d2ba5998351849b0fe7e755a3176de655bab (diff)
downloadshiftos_thereturn-91f97a65b2c6d1fad3a211a6739a49d9908f69a2.tar.gz
shiftos_thereturn-91f97a65b2c6d1fad3a211a6739a49d9908f69a2.tar.bz2
shiftos_thereturn-91f97a65b2c6d1fad3a211a6739a49d9908f69a2.zip
whoa mud refactoring
Diffstat (limited to 'ShiftOS.Server/SaveManager.cs')
-rw-r--r--ShiftOS.Server/SaveManager.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/ShiftOS.Server/SaveManager.cs b/ShiftOS.Server/SaveManager.cs
index 785bdec..fcca2bb 100644
--- a/ShiftOS.Server/SaveManager.cs
+++ b/ShiftOS.Server/SaveManager.cs
@@ -13,7 +13,7 @@ namespace ShiftOS.Server
{
public static class SaveManager
{
- [MudRequest("usr_getcp")]
+ [MudRequest("usr_getcp", typeof(Dictionary<string, object>))]
public static void GetCodepoints(string guid, object contents)
{
var args = contents as Dictionary<string, object>;
@@ -34,7 +34,7 @@ namespace ShiftOS.Server
}
- [MudRequest("mud_login")]
+ [MudRequest("mud_login", typeof(Dictionary<string, object>))]
public static void UserLogin(string guid, object contents)
{
var args = contents as Dictionary<string, object>;
@@ -78,7 +78,7 @@ namespace ShiftOS.Server
}
- [MudRequest("mud_checkuserexists")]
+ [MudRequest("mud_checkuserexists", typeof(Dictionary<string, object>))]
public static void CheckUserExists(string guid, object contents)
{
var args = contents as Dictionary<string, object>;
@@ -120,10 +120,10 @@ namespace ShiftOS.Server
}
- [MudRequest("mud_save")]
+ [MudRequest("mud_save", typeof(Save))]
public static void SaveGame(string guid, object contents)
{
- var sav = JsonConvert.DeserializeObject<Save>(JsonConvert.SerializeObject(contents));
+ var sav = contents as Save;
WriteEncFile("saves/" + sav.Username + ".save", JsonConvert.SerializeObject(sav, Formatting.Indented));
@@ -139,7 +139,7 @@ namespace ShiftOS.Server
catch { }
}
- [MudRequest("usr_givecp")]
+ [MudRequest("usr_givecp", typeof(Dictionary<string, object>))]
public static void GiveCodepoints(string guid, object contents)
{
var args = contents as Dictionary<string, object>;
@@ -171,7 +171,7 @@ namespace ShiftOS.Server
}
- [MudRequest("usr_takecp")]
+ [MudRequest("usr_takecp", typeof(Dictionary<string, object>))]
public static void TakeCodepoints(string guid, object contents)
{
var args = contents as Dictionary<string, object>;