|
@@ -5779,7 +5779,7 @@ namespace CM3D2.MultipleMaids.Plugin
|
|
|
sortList.Sort((x, y) =>
|
|
|
{
|
|
|
int res = x.priority.CompareTo(y.priority);
|
|
|
- if (res == 0) res = x.name.CompareTo(y.name);
|
|
|
+ if (res == 0) res = string.Compare(x.name, y.name);
|
|
|
return res;
|
|
|
});
|
|
|
}
|
|
@@ -5798,13 +5798,22 @@ namespace CM3D2.MultipleMaids.Plugin
|
|
|
Texture2D texture2D;
|
|
|
if (string.IsNullOrEmpty(item.icon) || !GameUty.FileSystem.IsExistentFile(item.icon))
|
|
|
{
|
|
|
+ Util.Logger.Log(Util.LogLevel.Warning, $"Could not find icon '{item.icon}' for menu '{item.menu}'");
|
|
|
return true;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, item.icon, false).data;
|
|
|
- texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
|
|
|
- texture2D.LoadImage(data);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, item.icon, false).data;
|
|
|
+ texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
|
|
|
+ texture2D.LoadImage(data);
|
|
|
+ }
|
|
|
+ catch
|
|
|
+ {
|
|
|
+ Util.Logger.Log(Util.LogLevel.Warning, $"Failed to load '{item.icon}' for menu '{item.menu}'");
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
item.tex = texture2D;
|
|
|
}
|