diff --git a/Source/CustomPawn.cs b/Source/CustomPawn.cs index 4646561..d30cb05 100644 --- a/Source/CustomPawn.cs +++ b/Source/CustomPawn.cs @@ -1226,6 +1226,22 @@ public Gender Gender { } } + public Color? FavoriteColor { + get { + if (ModsConfig.IdeologyActive) { + return Pawn.story.favoriteColor; + } + else { + return null; + } + } + set { + if (ModsConfig.IdeologyActive) { + Pawn.story.favoriteColor = value; + } + } + } + public Color SkinColor { get { return pawn.story.SkinColor; diff --git a/Source/PanelAppearance.cs b/Source/PanelAppearance.cs index a705ae2..23e2cbb 100644 --- a/Source/PanelAppearance.cs +++ b/Source/PanelAppearance.cs @@ -407,8 +407,14 @@ protected void DrawColorSelectorForApparelStuff(CustomPawn customPawn, float cur } public IEnumerable PrependFavoriteAndIdeologyColors(Color? color) { - if (currentPawn.Pawn.story.favoriteColor.HasValue) { - yield return currentPawn.Pawn.story.favoriteColor.Value; + if (currentPawn.FavoriteColor.HasValue) { + yield return currentPawn.FavoriteColor.Value; + } + if (ModsConfig.IdeologyActive) { + Color? ideoColor = currentPawn.Pawn?.ideo?.Ideo.ApparelColor; + if (ideoColor.HasValue) { + yield return ideoColor.Value; + } } if (color.HasValue) { yield return color.Value; @@ -416,8 +422,14 @@ public IEnumerable PrependFavoriteAndIdeologyColors(Color? color) { } public IEnumerable PrependFavoriteAndIdeologyColors(IEnumerable colors) { - if (currentPawn.Pawn.story.favoriteColor.HasValue) { - yield return currentPawn.Pawn.story.favoriteColor.Value; + if (currentPawn.FavoriteColor.HasValue) { + yield return currentPawn.FavoriteColor.Value; + } + if (ModsConfig.IdeologyActive) { + Color? ideoColor = currentPawn.Pawn?.ideo?.Ideo.ApparelColor; + if (ideoColor.HasValue) { + yield return ideoColor.Value; + } } if (colors != null) { foreach (var color in colors) {