diff options
| author | lempamo <[email protected]> | 2017-08-06 19:10:09 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-08-06 19:10:09 -0400 |
| commit | cb0ebed2918341ce02978bc32ab6e284ae5f000a (patch) | |
| tree | d022a85257544740fa5d946d4e92f3d268c9db87 /TimeHACK.Engine | |
| parent | 39283c570ea4a4dd1f87f2de18075f4f705fc08d (diff) | |
| download | histacom2-cb0ebed2918341ce02978bc32ab6e284ae5f000a.tar.gz histacom2-cb0ebed2918341ce02978bc32ab6e284ae5f000a.tar.bz2 histacom2-cb0ebed2918341ce02978bc32ab6e284ae5f000a.zip | |
you can actually see the achievement box
Diffstat (limited to 'TimeHACK.Engine')
| -rw-r--r-- | TimeHACK.Engine/SaveSystem.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index 6ebdf12..5700687 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -588,7 +588,7 @@ namespace TimeHACK.Engine public static byte[] GetAchievements() { - byte[] byt = new byte[] { 0, 0 }; + byte[] byt = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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")); @@ -599,6 +599,8 @@ namespace TimeHACK.Engine public static void SaveAchievement(int achievementID) { + if (!File.Exists(Path.Combine(DataDirectory, "achieved.thack"))) File.WriteAllBytes(Path.Combine(DataDirectory, "achieved.thack"), new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }); + byte[] byt = File.ReadAllBytes(Path.Combine(DataDirectory, "achieved.thack")); byt[achievementID] = 1; File.WriteAllBytes(Path.Combine(DataDirectory, "achieved.thack"), byt); |
