Commit 21dd8a55 authored by Adam Leyshon's avatar Adam Leyshon
Browse files

Merge branch 'develop' into 'master'

Develop

See merge request GWP/Release!8
parents 8af1bd65 809cd3fd
...@@ -415,20 +415,27 @@ namespace Glitterworld_Prime ...@@ -415,20 +415,27 @@ namespace Glitterworld_Prime
// Enumerate list of ThingCategoryDef and add to menu options. // Enumerate list of ThingCategoryDef and add to menu options.
var allDefsListForReading = DefDatabase<ThingCategoryDef>.AllDefsListForReading; var allDefsListForReading = DefDatabase<ThingCategoryDef>.AllDefsListForReading;
for (var i = 0; i < allDefsListForReading.Count; i++) foreach (var def in allDefsListForReading)
{ {
var def = allDefsListForReading[i]; try
{
if (def.LabelCap.NullOrEmpty())
{
LogWriter.WriteMessage(
$"ThingCategoryDef {def.defName} has no label!, Not able to filter by this, skipping. Please report to Mod Author.");
continue;
}
if (def.LabelCap.NullOrEmpty()) // We'll never deal with corpses so don't show them.
if (def.LabelCap.ToLower().Contains("corpse")) continue;
list.Add(new FloatMenuOption(def.LabelCap, delegate { filterSetter(def); }));
}
catch (Exception e)
{ {
LogWriter.WriteMessage( Utilities.CaptureError(e);
$"ThingCategoryDef {def.defName} has no label!, Not able to filter by this, skipping. Please report to Mod Author.");
continue; continue;
} }
// We'll never deal with corpses so don't show them.
if (!def.LabelCap.ToLower().Contains("corpse"))
list.Add(new FloatMenuOption(def.LabelCap, delegate { filterSetter(def); }));
} }
Find.WindowStack.Add(new FloatMenu(list)); Find.WindowStack.Add(new FloatMenu(list));
......
...@@ -40,5 +40,5 @@ using System.Runtime.InteropServices; ...@@ -40,5 +40,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.2")] [assembly: AssemblyVersion("1.0.2.3")]
[assembly: AssemblyFileVersion("1.0.2.2")] [assembly: AssemblyFileVersion("1.0.2.3")]
...@@ -46,8 +46,6 @@ namespace Glitterworld_Prime ...@@ -46,8 +46,6 @@ namespace Glitterworld_Prime
internal static void CaptureError(Exception exception) internal static void CaptureError(Exception exception)
{ {
LogWriter.WriteMessage("Not forcing stacktrace");
var e = new SentryEvent(exception); var e = new SentryEvent(exception);
// Get User ID / Type // Get User ID / Type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment