diff options
-rw-r--r-- | Release/Mods/TrainerMod.dll | bin | 23040 -> 23040 bytes | |||
-rw-r--r-- | Release/SMAPI_0.32A.zip | bin | 0 -> 29936 bytes | |||
-rw-r--r-- | Release/StardewModdingAPI.exe | bin | 57856 -> 58368 bytes | |||
-rw-r--r-- | StardewModdingAPI/Program.cs | 26 | ||||
-rw-r--r-- | TrainerMod/bin/Debug/TrainerMod.dll | bin | 23040 -> 23040 bytes | |||
-rw-r--r-- | TrainerMod/obj/Debug/TrainerMod.dll | bin | 23040 -> 23040 bytes |
6 files changed, 20 insertions, 6 deletions
diff --git a/Release/Mods/TrainerMod.dll b/Release/Mods/TrainerMod.dll Binary files differindex 604ebd5d..790f0444 100644 --- a/Release/Mods/TrainerMod.dll +++ b/Release/Mods/TrainerMod.dll diff --git a/Release/SMAPI_0.32A.zip b/Release/SMAPI_0.32A.zip Binary files differnew file mode 100644 index 00000000..d07a52b4 --- /dev/null +++ b/Release/SMAPI_0.32A.zip diff --git a/Release/StardewModdingAPI.exe b/Release/StardewModdingAPI.exe Binary files differindex 12f38346..c6c9e3cc 100644 --- a/Release/StardewModdingAPI.exe +++ b/Release/StardewModdingAPI.exe diff --git a/StardewModdingAPI/Program.cs b/StardewModdingAPI/Program.cs index 01075370..4277bdce 100644 --- a/StardewModdingAPI/Program.cs +++ b/StardewModdingAPI/Program.cs @@ -49,8 +49,9 @@ namespace StardewModdingAPI public static Thread gameThread; public static Thread consoleInputThread; - public const string Version = "0.32 Alpha"; + public const string Version = "0.33 Alpha"; public const bool debug = false; + public static bool disableLogging { get; private set; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -101,7 +102,7 @@ namespace StardewModdingAPI try { - if (Directory.Exists(LogPath)) + if (!Directory.Exists(LogPath)) Directory.CreateDirectory(LogPath); } catch (Exception ex) @@ -113,7 +114,15 @@ namespace StardewModdingAPI Log(ExecutionPath, false); - LogStream = new StreamWriter(CurrentLog, false); + try + { + LogStream = new StreamWriter(CurrentLog, false); + } + catch (Exception ex) + { + disableLogging = true; + LogError("Could not initialize LogStream - Logging is disabled"); + } LogInfo("Initializing SDV Assembly..."); if (!File.Exists(ExecutionPath + "\\Stardew Valley.exe")) @@ -341,7 +350,8 @@ namespace StardewModdingAPI //System.Threading.Thread.Sleep(10); if (debug) { - SGame.CurrentLocation = SGame.ModLocations.First(x => x.name == newLocation.name); + Console.WriteLine(newLocation.name); + SGame.CurrentLocation = SGame.ModLocations.FirstOrDefault(x => x.name == newLocation.name); } //Game1.currentLocation = SGame.CurrentLocation; //LogInfo(((SGameLocation) newLocation).name); @@ -411,8 +421,12 @@ namespace StardewModdingAPI } string toLog = string.Format("[{0}] {1}", System.DateTime.Now.ToLongTimeString(), String.Format(o.ToString(), format)); Console.WriteLine(toLog); - LogStream.WriteLine(toLog); - LogStream.Flush(); + + if (!disableLogging) + { + LogStream.WriteLine(toLog); + LogStream.Flush(); + } } public static void LogColour(ConsoleColor c, object o, params object[] format) diff --git a/TrainerMod/bin/Debug/TrainerMod.dll b/TrainerMod/bin/Debug/TrainerMod.dll Binary files differindex 604ebd5d..790f0444 100644 --- a/TrainerMod/bin/Debug/TrainerMod.dll +++ b/TrainerMod/bin/Debug/TrainerMod.dll diff --git a/TrainerMod/obj/Debug/TrainerMod.dll b/TrainerMod/obj/Debug/TrainerMod.dll Binary files differindex 604ebd5d..790f0444 100644 --- a/TrainerMod/obj/Debug/TrainerMod.dll +++ b/TrainerMod/obj/Debug/TrainerMod.dll |