diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-07-05 21:29:37 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-07-05 21:29:37 +0100 |
| commit | 35f7ca92da983723ccdb2aeadc9917ea1370a19b (patch) | |
| tree | a7be87335f709954ce3b7b1525f9a80931d8e05c /TimeHACK.Engine/SaveSystem.cs | |
| parent | e78e3c864d9e61b460a5c42d92651d78ed22a78e (diff) | |
| parent | 525f7fce5a4c96fafba64271b8163a934b208992 (diff) | |
| download | histacom2-35f7ca92da983723ccdb2aeadc9917ea1370a19b.tar.gz histacom2-35f7ca92da983723ccdb2aeadc9917ea1370a19b.tar.bz2 histacom2-35f7ca92da983723ccdb2aeadc9917ea1370a19b.zip | |
Merge remote-tracking branch 'refs/remotes/TimeHACKDevs/master'
Diffstat (limited to 'TimeHACK.Engine/SaveSystem.cs')
| -rw-r--r-- | TimeHACK.Engine/SaveSystem.cs | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/TimeHACK.Engine/SaveSystem.cs b/TimeHACK.Engine/SaveSystem.cs index 7a6eed0..7110995 100644 --- a/TimeHACK.Engine/SaveSystem.cs +++ b/TimeHACK.Engine/SaveSystem.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; +using System.Diagnostics; namespace TimeHACK.Engine { @@ -12,10 +13,12 @@ namespace TimeHACK.Engine { public static Save CurrentSave { get; set; } public static FileSystemFolderInfo filesystemflinfo { get; set; } - public static Boolean DevMode = false; + public static bool DevMode = false; public static FileAssociation IconChanger = new FileAssociation(); + public static Theme currentTheme { get; set; } + public static string GameDirectory { get @@ -113,12 +116,30 @@ namespace TimeHACK.Engine public static void NewGame() { - //TODO: User must set a username....somehow var save = new Save(); save.ExperiencedStories = new List<string>(); - save.CurrentOS = "95"; + if (DevMode == true) + { + if (ProfileName == "98") + { + save.CurrentOS = "98"; + save.ThemeName = "default98"; + } + else + { + save.CurrentOS = "95"; + save.ThemeName = "default95"; + currentTheme = new Default95Theme(); + } + } + else + { + save.CurrentOS = "95"; + save.ThemeName = "default95"; + currentTheme = new Default95Theme(); + } CurrentSave = save; CheckFiles(); @@ -158,16 +179,16 @@ namespace TimeHACK.Engine SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Help"), true, "Help", true); SaveDirectoryInfo(Path.Combine(ProfileWindowsDirectory, "Temp"), true, "Temp", true); - CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "Calc.exe"), "Calculator"); + CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "calc.exe"), "Calculator"); CreateWindowsFile(Path.Combine(ProfileWindowsDirectory, "explorer.exe"), "windowsexplorer"); } - public static void CreateWindowsFile(String filepath, String contents) + public static void CreateWindowsFile(string filepath, string contents) { File.WriteAllText(filepath, contents); } - public static void SaveDirectoryInfo(String directory, Boolean isProtected, String label, Boolean allowback) + public static void SaveDirectoryInfo(string directory, bool isProtected, string label, bool allowback) { if (!Directory.Exists(directory)) Directory.CreateDirectory(directory); @@ -208,12 +229,14 @@ namespace TimeHACK.Engine public string CurrentOS { get; set; } // public Dictionary<string, bool> InstalledPrograms { get; set; } InstallProgram is no longer needed... we have that data in the FileSystem public List<string> ExperiencedStories { get; set; } + public bool FTime95 { get; set; } + public string ThemeName { get; set; } } public class FileSystemFolderInfo { - public Boolean Isprotected { get; set; } - public String label { get; set; } - public Boolean allowback { get; set; } + public bool Isprotected { get; set; } + public string label { get; set; } + public bool allowback { get; set; } } } |
