...
 
Commits (4)
......@@ -415,20 +415,27 @@ namespace Glitterworld_Prime
// Enumerate list of ThingCategoryDef and add to menu options.
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(
$"ThingCategoryDef {def.defName} has no label!, Not able to filter by this, skipping. Please report to Mod Author.");
Utilities.CaptureError(e);
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));
......
......@@ -40,5 +40,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.2")]
[assembly: AssemblyFileVersion("1.0.2.2")]
[assembly: AssemblyVersion("1.0.2.3")]
[assembly: AssemblyFileVersion("1.0.2.3")]
......@@ -46,8 +46,6 @@ namespace Glitterworld_Prime
internal static void CaptureError(Exception exception)
{
LogWriter.WriteMessage("Not forcing stacktrace");
var e = new SentryEvent(exception);
// Get User ID / Type
......