diff --git a/Resources/CHANGELOG.txt b/Resources/CHANGELOG.txt index 22f5da4..ed31527 100644 --- a/Resources/CHANGELOG.txt +++ b/Resources/CHANGELOG.txt @@ -3,9 +3,11 @@ Version 1.5.4 _____________________________________________________________________________ - - In the Apparel dialog, changing values for an apparel item that a pawn is - - already weating in the now updates the apparel immediately without needing - to click the "Update" button + - In the Apparel dialog, changing a value for an apparel item that a pawn is + already wearing now updates the apparel immediately without needing to + click the "Update" button + - Added color swatches for Favorite Color and Ideo to the Apparel dialog + - Added a Rotate View button to the Apparel dialog - Pawn compatibility is displayed in the Other Relationships dialog - Bug fixes: - The Ideo panel is now hidden for pawns that should not have an ideo diff --git a/Source/DialogApparel.cs b/Source/DialogApparel.cs index 5985bdb..3234902 100644 --- a/Source/DialogApparel.cs +++ b/Source/DialogApparel.cs @@ -87,11 +87,13 @@ public DialogApparel() { foreach (var layer in DefDatabase.AllDefs) { ApparelLayerFloatMenuOptions.Add(new FloatMenuOption(layer.LabelCap, () => { SelectedLayer = layer; }, MenuOptionPriority.Default, null, null, 0, null, null)); } - - foreach (var m in Find.FactionManager.OfPlayer.def.apparelStuffFilter.AllowedThingDefs) { - PreferredMaterials.AddLast(m); + if (Find.FactionManager.OfPlayer.def.apparelStuffFilter?.AllowedThingDefs != null) { + foreach (var m in Find.FactionManager.OfPlayer.def.apparelStuffFilter?.AllowedThingDefs) { + PreferredMaterials.AddLast(m); + } } - foreach (var m in new ThingDef[] { DefDatabase.GetNamedSilentFail("Synthread"), + foreach (var m in new ThingDef[] { + DefDatabase.GetNamedSilentFail("Synthread"), DefDatabase.GetNamedSilentFail("Steel"), DefDatabase.GetNamedSilentFail("Plasteel"), DefDatabase.GetNamedSilentFail("WoodLog"),