aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/SaveSystem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'TimeHACK.Engine/SaveSystem.cs')
-rw-r--r--TimeHACK.Engine/SaveSystem.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs
index cd8bb2f..41bb9d0 100644
--- a/TimeHACK.Engine/SaveSystem.cs
+++ b/TimeHACK.Engine/SaveSystem.cs
@@ -27,6 +27,14 @@ namespace TimeHACK.Engine
}
}
+ public static string DataDirectory
+ {
+ get
+ {
+ return Path.Combine(GameDirectory, "Data");
+ }
+ }
+
public static string AllProfilesDirectory
{
get
@@ -221,6 +229,17 @@ namespace TimeHACK.Engine
File.WriteAllText(Path.Combine(ProfileDirectory, ProfileFile), json);
}
+ public static byte[] GetAchievements()
+ {
+ byte[] byt = new byte[] { 0, 0 };
+ if (DevMode) File.WriteAllBytes(Path.Combine(DataDirectory, "achieved.thack"), byt);
+
+ if (File.Exists(Path.Combine(DataDirectory, "achieved.thack"))) byt = File.ReadAllBytes(Path.Combine(DataDirectory, "achieved.thack"));
+ else File.WriteAllBytes(Path.Combine(DataDirectory, "achieved.thack"), byt);
+
+ return byt;
+ }
+
public static void SetTheme()
{
switch (CurrentSave.ThemeName)