/// <summary> /// See if a <see cref="RanchDirector.Palette"/> is modded /// </summary> /// <param name="id"></param> /// <returns>True if given <see cref="RanchDirector.Palette"/> is from a mod</returns> public static bool IsModdedPalette(RanchDirector.Palette id) => moddedPalettes.ContainsKey(id);
public static void Prefix(RanchModel __instance, RanchDirector.PaletteType type, ref RanchDirector.Palette pal) { if (!((RanchDirector)__instance.participant).paletteDict.ContainsKey(pal)) { pal = ChromaRegistry.GetDefaultPaletteForType(type); } }
/// <summary> /// Check if a <see cref="RanchDirector.Palette"/> was registered by a mod /// </summary> /// <param name="palette"></param> /// <returns></returns> public static bool IsModdedPalette(this RanchDirector.Palette palette) { return(moddedPalettes.ContainsKey(palette)); }
public static void Prefix(RanchModel __instance, RanchDirector.PaletteType type, ref RanchDirector.Palette pal) { if (!Enum.IsDefined(typeof(RanchDirector.Palette), pal)) { pal = ChromaPackRegistry.GetDefaultPaletteForType(type); } }
internal static bool IsPaletteRegistered(RanchDirector.Palette palette) => PALETTE_ENTRIES.Count(p => p.palette == palette) > 0;