Skip to content

Commit

Permalink
Version 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteMasterEric committed Mar 4, 2024
1 parent df9ccc3 commit 1423f3c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Art/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Coroner",
"version_number": "1.6.0",
"version_number": "1.6.1",
"website_url": "https://github.com/EliteMasterEric/Coroner",
"description": "Rework the Performance Report with new info, including cause of death.",
"dependencies": [
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 1.6.1
# Fixed
- Improved the clarity of the error messages for when people install the mod incorrectly (you won't get this error if you use R2Modman!).

# 1.6.0
## Added
- Added new custom messages for specific causes of death:
Expand Down
2 changes: 1 addition & 1 deletion Coroner/Coroner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Company>EliteMasterEric</Company>
<AssemblyName>Coroner</AssemblyName>
<GUID>com.elitemastereric.coroner</GUID>
<Version>1.6.0</Version>
<Version>1.6.1</Version>

<Title>Coroner</Title>
<Description>Rework the Performance Report with new info, including cause of death.</Description>
Expand Down
24 changes: 21 additions & 3 deletions Coroner/LanguageHandler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;

Expand Down Expand Up @@ -103,16 +104,33 @@ void ValidateLanguage(string languageCode) {
void LoadLanguageData(string languageCode) {
try
{
Plugin.Instance.PluginLogger.LogInfo($"Loading Coroner language data from config folder, at {Plugin.Instance.GetConfigPath()}");
// R2Modman is a weirdo.
// languageData = XDocument.Load($"./BepInEx/Lang/Coroner/Strings_{languageCode}.xml");
// languageData = XDocument.Load($"./BepInEx/plugins/{PluginInfo.PLUGIN_AUTHOR}-{PluginInfo.PLUGIN_NAME}/Strings_{languageCode}.xml");
// languageData = XDocument.Load($"{Plugin.AssemblyDirectory}/Strings_{languageCode}.xml");
Plugin.Instance.PluginLogger.LogInfo($"Loading Coroner language data from {Plugin.Instance.GetConfigPath()}");
languageData = XDocument.Load($"{Plugin.Instance.GetConfigPath()}/Strings_{languageCode}.xml");

if (!File.Exists(Plugin.Instance.GetConfigPath()))
{
Plugin.Instance.PluginLogger.LogError($"Config folder not found at: {Plugin.Instance.GetConfigPath()}");
var wrongConfigPath = $"{Plugin.AssemblyDirectory}/BepInEx/config/{PluginInfo.PLUGIN_AUTHOR}-{PluginInfo.PLUGIN_NAME}/Strings_{languageCode}.xml";
if (File.Exists(wrongConfigPath)) {
Plugin.Instance.PluginLogger.LogError($"IMPORTANT: You didn't install the mod correctly! Move the BepInEx/config folder to the right spot!");
} else {
Plugin.Instance.PluginLogger.LogError($"Try reinstalling the mod from scratch.");
}
}
else if (!File.Exists($"{Plugin.Instance.GetConfigPath()}/Strings_{languageCode}.xml")) {
Plugin.Instance.PluginLogger.LogError($"Localization File not found at: {Plugin.Instance.GetConfigPath()}");
}
else
{
languageData = XDocument.Load($"{Plugin.Instance.GetConfigPath()}/Strings_{languageCode}.xml");
}
}
catch(Exception ex)
{
Plugin.Instance.PluginLogger.LogError($"{PluginInfo.PLUGIN_NAME} Error loading language data: {ex.Message}");
Plugin.Instance.PluginLogger.LogError($"Error loading language data: {ex.Message}");
Plugin.Instance.PluginLogger.LogError(ex.StackTrace);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Coroner/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class PluginInfo
public const string PLUGIN_ID = "Coroner";
public const string PLUGIN_NAME = "Coroner";
public const string PLUGIN_AUTHOR = "EliteMasterEric";
public const string PLUGIN_VERSION = "1.6.0";
public const string PLUGIN_VERSION = "1.6.1";
public const string PLUGIN_GUID = "com.elitemastereric.coroner";
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/PirateLanguage/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"website_url": "https://github.com/EliteMasterEric/Coroner",
"description": "A modpack which adds a Pirate language to Coroner..",
"dependencies": [
"EliteMasterEric-Coroner-1.6.0"
"EliteMasterEric-Coroner-1.6.1"
]
}

0 comments on commit 1423f3c

Please sign in to comment.