Skip to content

Commit

Permalink
fix up the way mod name is handled to make it less easy to mess up in…
Browse files Browse the repository at this point in the history
… the future, with the end result that the log file is named properly
  • Loading branch information
janxious committed Jun 8, 2018
1 parent f1e3e3e commit f0595e2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion InternalHeaters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void Init(string directory, string settingsJSON)
Logger.Error(ex);
ModSettings = new Settings();
}
var harmony = HarmonyInstance.Create("com.joelmeador.ShopSeller");
var harmony = HarmonyInstance.Create($"com.joelmeador.{Settings.ModName}");
harmony.PatchAll(Assembly.GetExecutingAssembly());
}
}
Expand Down
2 changes: 1 addition & 1 deletion Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace InternalHeaters
{
public class Logger
{
private static string LogFilePath => $"{ModDirectory}/ShopSeller.log";
private static string LogFilePath => $"{ModDirectory}/{Settings.ModName}.log";

public static void Error(Exception ex)
{
Expand Down
2 changes: 2 additions & 0 deletions Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{
public class Settings
{
public const string ModName = "InternalHeaters";

public bool debug = false;
}
}
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Name": "InternalHeaters",
"Enabled": true,

"Version": "0.0.1",
"Version": "0.0.2",

"Author": "janxious",
"Website": "https://github.com/janxious/InternalHeaters",
Expand Down

0 comments on commit f0595e2

Please sign in to comment.