aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/SaveSystem.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-28 16:05:51 -0400
committerMichael <[email protected]>2017-05-28 16:05:57 -0400
commite85832a5a4caefe854f3f27b7e60663e2bf26624 (patch)
tree1683b73aba6bedae20aea932d9387d78bdf0938c /ShiftOS_TheReturn/SaveSystem.cs
parentc7ba7d733c756d196f98dd4533289a1ef4db715f (diff)
downloadshiftos_thereturn-e85832a5a4caefe854f3f27b7e60663e2bf26624.tar.gz
shiftos_thereturn-e85832a5a4caefe854f3f27b7e60663e2bf26624.tar.bz2
shiftos_thereturn-e85832a5a4caefe854f3f27b7e60663e2bf26624.zip
fix double login issue and oobe bugs
Diffstat (limited to 'ShiftOS_TheReturn/SaveSystem.cs')
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index 55f5cd5..c8996d4 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+// #define NOSAVE
//#define ONLINEMODE
@@ -213,15 +214,14 @@ namespace ShiftOS.Engine
savehandshake = (msg) =>
{
+ ServerManager.MessageReceived -= savehandshake;
if (msg.Name == "mud_savefile")
{
CurrentSave = JsonConvert.DeserializeObject<Save>(msg.Contents);
- ServerManager.MessageReceived -= savehandshake;
}
else if (msg.Name == "mud_login_denied")
{
oobe.PromptForLogin();
- ServerManager.MessageReceived -= savehandshake;
}
};
ServerManager.MessageReceived += savehandshake;
@@ -554,6 +554,7 @@ namespace ShiftOS.Engine
/// </summary>
public static void SaveGame()
{
+#if !NOSAVE
if(!Shiftorium.Silent)
Console.WriteLine("");
if(!Shiftorium.Silent)
@@ -566,6 +567,7 @@ namespace ShiftOS.Engine
if (!Shiftorium.Silent)
Console.WriteLine(" ...{DONE}.");
System.IO.File.WriteAllText(Paths.SaveFile, Utils.ExportMount(0));
+#endif
}
/// <summary>