diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-07-22 21:55:20 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-07-22 21:55:20 +0100 |
| commit | c97b5bddf841573e92c67fd2d325ca44825351f0 (patch) | |
| tree | b9e2c5f7861799b7b5f209046f97052493565734 /TimeHACK.Engine | |
| parent | cf4609d054ee554d7503c42322f9129f7423c4e4 (diff) | |
| parent | 7b12feef44adfcafd46d651adcd3e8fe11cb8523 (diff) | |
| download | histacom2-c97b5bddf841573e92c67fd2d325ca44825351f0.tar.gz histacom2-c97b5bddf841573e92c67fd2d325ca44825351f0.tar.bz2 histacom2-c97b5bddf841573e92c67fd2d325ca44825351f0.zip | |
Merge remote-tracking branch 'refs/remotes/TimeHACKDevs/master'
Diffstat (limited to 'TimeHACK.Engine')
| -rw-r--r-- | TimeHACK.Engine/SaveSystem.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index 2a372e3..81aa322 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 @@ -256,6 +264,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) |
