aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-07-22 15:35:30 -0400
committerlempamo <[email protected]>2017-07-22 15:35:30 -0400
commit7b12feef44adfcafd46d651adcd3e8fe11cb8523 (patch)
treec291216b6e30a94100189567b70372caa9c3e17a /TimeHACK.Engine
parent845d40b0b9cd3ed2d14016a7d3cb5ce5a521a369 (diff)
downloadhistacom2-7b12feef44adfcafd46d651adcd3e8fe11cb8523.tar.gz
histacom2-7b12feef44adfcafd46d651adcd3e8fe11cb8523.tar.bz2
histacom2-7b12feef44adfcafd46d651adcd3e8fe11cb8523.zip
more achievement things
Diffstat (limited to 'TimeHACK.Engine')
-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)