public static void IntergrationModOptionsMenu(Listing_StandardExpanding listing_Main) { string labelI = "AdeptusMechanicus.IntergrationOptions".Translate(); string tooltipI = "AdeptusMechanicus.IntergrationOptionsDesc".Translate(); if (Dev) { // Log.Message("showArmouryIntergrationOptions "+ showArmouryIntergrationOptions); // Log.Message("mod.patchesCount " + mod.PatchesCount); // Log.Message("AMAMod.lineheight " + AMAMod.lineheight); labelI = "AdeptusMechanicus.IntergrationOptions".Translate() + " Menu Length: " + mod.Length(showArmouryIntergrationOptions, mod.PatchesCount, AMAMod.lineheight, 0, 0) + " Total Length: " + Listing_ArmouryIntergrationLength + " " + showArmouryIntergrationOptions + " CurInc: " + Inc; } listing_Menu.maxOneColumn = true; // Armoury Mod Options /* * if (showArmouryIntergrationMenu) * { * if (listing_Main.ButtonText(labelI, ref showArmouryIntergrationOptions, Dev, ref Inc, tooltipI)) * { * Listing_StandardExpanding listing_ArmouryIntergration = listing_Main.BeginSection(listing_ArmouryIntergrationLength, false, 3); * // listing_ArmouryIntergration = listing_Main.BeginSection(MenuLengthIntergration, false, 0); * listing_ArmouryIntergration.Label("Changes to these settings require a restart to take effect." + (Dev ? " patchesCount: " + mod.patchesCount : "")); * Listing_StandardExpanding listing_General = listing_ArmouryIntergration.BeginSection(mod.Length(showArmouryIntergrationOptions, mod.patchesCount, AMAMod.lineheight, 0, 0), true); * listing_General.ColumnWidth *= 0.488f; * bool flag = false; * for (int i = 0; i < AMAMod.Patches.Count; i++) * { * var patch = AMAMod.Patches[i]; * var status = settings.PatchDisabled[patch]; * if (!flag && i + 1 > AMAMod.Patches.Count / 2) * { * listing_General.NewColumn(); * flag = true; * } * listing_General.CheckboxLabeled(patch.label, ref status, patch.tooltip); * * settings.PatchDisabled[patch] = status; * * } * listing_ArmouryIntergration.EndSection(listing_General); * listing_Main.EndSection(listing_ArmouryIntergration); * if (AdeptusIntergrationUtility.enabled_AlienRaces && Dev) * { * Listing_StandardExpanding listing_AlienRacesIntergration = listing_Main.BeginSection(120); * Listing_StandardExpanding listing_ImperialRacesIntergration = listing_AlienRacesIntergration.BeginSection(100); * * listing_AlienRacesIntergration.EndSection(listing_ImperialRacesIntergration); * * listing_Main.EndSection(listing_AlienRacesIntergration); * } * } * } */ }
public static void Prefix(ref AMAMod __instance, ref Listing_StandardExpanding listing_Main, Rect rect) { bool showRaces = settings.ShowAllowedRaceSettings || !Xenobiologis; bool setting = showRaces && settings.ShowOrk; float lineheight = (Text.LineHeight + listing_Main.verticalSpacing); float w = rect.width * 0.480f; int Options = 6; float RaceSettings = __instance.Length(setting, Options, lineheight, 48, showRaces ? 1 : 0); //(settings.ShowImperium ? (lineheight * 2) : (lineheight * 1)) + (settings.ShowImperium ? 10 : 0); float options = __instance.Length(setting, Options - 1, lineheight, 0, 0); if (!Xenobiologis) { if (!listing_Main.ButtonText("AdeptusMechanicus.Ork.ModName".Translate() + " Options", ref settings.ShowOrk)) { return; } } Listing_StandardExpanding listing_Race = listing_Main.BeginSection(RaceSettings, false, 3, 4, 0); listing_Race.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.ShowOrk".Translate() + " Settings", ref settings.ShowOrk, null, false, true, ArmouryMain.collapseTex, ArmouryMain.expandTex); if (setting) { Listing_StandardExpanding listing_General = listing_Race.BeginSection(__instance.Length(setting, 1, lineheight, 0, 0), true); listing_General.ColumnWidth *= 0.32f; listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowOrkTek".Translate() + (!DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Tek")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Faction".Translate()), ref settings.AllowOrkTek, null, !DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Tek")) || !settings.AllowOrkWeapons, DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Tek")) && settings.AllowOrkWeapons); listing_General.NewColumn(); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowOrkFeral".Translate() + (!DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Feral")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Faction".Translate()), ref settings.AllowOrkFeral, null, !DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Feral")) || !settings.AllowOrkWeapons, DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Feral")) && settings.AllowOrkWeapons); listing_General.NewColumn(); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowOrkRok".Translate(), ref settings.AllowOrkRok, null, !settings.AllowOrkTek || !settings.AllowOrkWeapons, settings.AllowOrkTek && settings.AllowOrkWeapons); listing_Race.EndSection(listing_General); Listing_StandardExpanding listing_FungalLabel = listing_Race.BeginSection(__instance.Length(setting, 1, lineheight, 0, 0), true); listing_FungalLabel.ColumnWidth *= 0.32f; listing_FungalLabel.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.FungusOptions".Translate(), ref settings.FungusSpawnChance, ref settings.FungusSpawnChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.FungusOptionsToolTip".Translate(), 0.75f, 0.25f); listing_FungalLabel.NewColumn(); listing_FungalLabel.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.CocoonOptions".Translate(), ref settings.CocoonSpawnChance, ref settings.CocoonSpawnChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.CocoonOptionsToolTip".Translate(), 0.75f, 0.25f); listing_FungalLabel.NewColumn(); if (listing_FungalLabel.ButtonTextLine("Defaults")) { settings.FungusSpawnChance = 0.025f; settings.FungusSpawnChanceBuffer = settings.FungusSpawnChance.ToString(); settings.FungusSquigChance = 1f; settings.FungusSquigChanceBuffer = settings.FungusSquigChance.ToString(); settings.FungusSnotChance = 0.85f; settings.FungusSnotChanceBuffer = settings.FungusSnotChance.ToString(); settings.FungusGrotChance = 0.1f; settings.FungusGrotChanceBuffer = settings.FungusGrotChance.ToString(); settings.FungusOrkChance = 0.05f; settings.FungusOrkChanceBuffer = settings.FungusOrkChance.ToString(); settings.CocoonSpawnChance = 0.25f; settings.CocoonSpawnChanceBuffer = settings.CocoonSpawnChance.ToString(); settings.CocoonSquigChance = 0.15f; settings.CocoonSquigChanceBuffer = settings.CocoonSquigChance.ToString(); settings.CocoonSnotChance = 0.2f; settings.CocoonSnotChanceBuffer = settings.CocoonSnotChance.ToString(); settings.CocoonGrotChance = 0.35f; settings.CocoonGrotChanceBuffer = settings.CocoonGrotChance.ToString(); settings.CocoonOrkChance = 0.3f; settings.CocoonOrkChanceBuffer = settings.CocoonOrkChance.ToString(); } listing_Race.EndSection(listing_FungalLabel); Listing_StandardExpanding listing_Fungus = listing_Race.BeginSection(__instance.Length(setting, 4, lineheight, 0, 0), true); listing_Fungus.ColumnWidth *= 0.32f; listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Squig".Translate(), ref settings.FungusSquigChance, ref settings.FungusSquigChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.SquigToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Snot".Translate(), ref settings.FungusSnotChance, ref settings.FungusSnotChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.SnotToolTip".Translate(), 0.75f, 0.25f); // listing_Fungus.NewColumn(); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Grot".Translate(), ref settings.FungusGrotChance, ref settings.FungusGrotChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.GrotToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Ork".Translate(), ref settings.FungusOrkChance, ref settings.FungusOrkChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.OrkToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.NewColumn(); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Squig".Translate(), ref settings.CocoonSquigChance, ref settings.CocoonSquigChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.SquigToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Snot".Translate(), ref settings.CocoonSnotChance, ref settings.CocoonSnotChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.SnotToolTip".Translate(), 0.75f, 0.25f); // listing_Fungus.NewColumn(); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Grot".Translate(), ref settings.CocoonGrotChance, ref settings.CocoonGrotChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.GrotToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Ork".Translate(), ref settings.CocoonOrkChance, ref settings.CocoonOrkChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.OrkToolTip".Translate(), 0.75f, 0.25f); listing_Race.EndSection(listing_Fungus); } listing_Main.EndSection(listing_Race); }
public static void OrkSettings_Prefix(ref AMAMod __instance, ref Listing_StandardExpanding listing_Main, ref float num2) { string label = "AdeptusMechanicus.Xenobiologis.ShowOrk".Translate() + " Settings"; string tooltip = string.Empty; if (Dev) { label += " Main Length: " + MainMenuLength + " SubLength: " + MenuLength + " Passed: " + num2 + " Inc: " + inc; } if (!Xenobiologis) { if (!listing_Main.ButtonText(label, ref settings.ShowOrk, Dev, ref inc)) { return; } } if (ShowRaces) { Listing_StandardExpanding listing_Race = listing_Main.BeginSection((num2 != 0 ? num2 : RaceSettings) + inc, false, 3, 4, 0); if (Xenobiologis) { listing_Race.CheckboxLabeled(label, ref settings.ShowOrk, Dev, ref inc, tooltip, false, true, ArmouryMain.collapseTex, ArmouryMain.expandTex); } if (settings.ShowOrk) { Listing_StandardExpanding listing_General = listing_Race.BeginSection(MenuLength, true); listing_General.ColumnWidth *= 0.32f; listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowOrkTek".Translate() + (!DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Tek")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Faction".Translate()), ref settings.AllowOrkTek, null, !DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Tek")) || !settings.AllowOrkWeapons, DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Tek")) && settings.AllowOrkWeapons); listing_General.CheckboxLabeled("AdeptusMechanicus.Ork.AllowOrkoidFightyness".Translate(), ref settings.OrkoidFightyness, "AdeptusMechanicus.Ork.AllowOrkoidFightynessToolTip".Translate(), !DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Tek")) || !settings.AllowOrkWeapons, DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Tek")) && settings.AllowOrkWeapons); listing_General.NewColumn(); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowOrkFeral".Translate() + (!DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Feral")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Faction".Translate()), ref settings.AllowOrkFeral, null, !DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Feral")) || !settings.AllowOrkWeapons, DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Ork_Feral")) && settings.AllowOrkWeapons); listing_General.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.FightynessStatisfied".Translate(), ref settings.OrkoidFightynessStatisfied, ref settings.OrkoidFightynessStatisfiedBuffer, 0, int.MaxValue, "AdeptusMechanicus.Ork.FightynessStatisfiedToolTip".Translate(), 0.75f, 0.25f); listing_General.NewColumn(); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowOrkRok".Translate(), ref settings.AllowOrkRok, null, !settings.AllowOrkTek || !settings.AllowOrkWeapons, settings.AllowOrkTek && settings.AllowOrkWeapons); listing_Race.EndSection(listing_General); MenuLength = Math.Max(listing_General.CurHeight, listing_General.MaxColumnHeightSeen);// listing_General.CurHeight > 0 ? listing_General.CurHeight : listing_General.MaxColumnHeightSeen; Listing_StandardExpanding listing_FungalLabel = listing_Race.BeginSection(__instance.Length(Setting, 1, lineheight, 0, 0), true); listing_FungalLabel.ColumnWidth *= 0.32f; listing_FungalLabel.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.FungusOptions".Translate(), ref settings.FungusSpawnChance, ref settings.FungusSpawnChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.FungusOptionsToolTip".Translate(), 0.75f, 0.25f); listing_FungalLabel.NewColumn(); listing_FungalLabel.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.CocoonOptions".Translate(), ref settings.CocoonSpawnChance, ref settings.CocoonSpawnChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.CocoonOptionsToolTip".Translate(), 0.75f, 0.25f); listing_FungalLabel.NewColumn(); if (listing_FungalLabel.ButtonTextLine("Defaults")) { ResetFungalSettings(); } listing_Race.EndSection(listing_FungalLabel); Listing_StandardExpanding listing_Fungus = listing_Race.BeginSection(__instance.Length(Setting, 4, lineheight, 0, 0), true); listing_Fungus.ColumnWidth *= 0.32f; listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Squig".Translate(), ref settings.FungusSquigChance, ref settings.FungusSquigChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.SquigToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Snot".Translate(), ref settings.FungusSnotChance, ref settings.FungusSnotChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.SnotToolTip".Translate(), 0.75f, 0.25f); // listing_Fungus.NewColumn(); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Grot".Translate(), ref settings.FungusGrotChance, ref settings.FungusGrotChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.GrotToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Ork".Translate(), ref settings.FungusOrkChance, ref settings.FungusOrkChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.OrkToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.NewColumn(); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Squig".Translate(), ref settings.CocoonSquigChance, ref settings.CocoonSquigChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.SquigToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Snot".Translate(), ref settings.CocoonSnotChance, ref settings.CocoonSnotChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.SnotToolTip".Translate(), 0.75f, 0.25f); // listing_Fungus.NewColumn(); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Grot".Translate(), ref settings.CocoonGrotChance, ref settings.CocoonGrotChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.GrotToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.Ork".Translate(), ref settings.CocoonOrkChance, ref settings.CocoonOrkChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.OrkToolTip".Translate(), 0.75f, 0.25f); listing_Fungus.NewColumn(); listing_Fungus.TextFieldNumericLabeled <float>("AdeptusMechanicus.Ork.FungalMeds".Translate(), ref settings.FungusMedChance, ref settings.FungusMedChanceBuffer, 0f, 1f, "AdeptusMechanicus.Ork.FungalMedsToolTip".Translate(), 0.75f, 0.25f); listing_Race.EndSection(listing_Fungus); } listing_Main.EndSection(listing_Race); MainMenuLength = listing_Race.CurHeight; num2 = MainMenuLength - inc; } }
public static void TauSettings_Prefix(ref AMAMod __instance, ref Listing_StandardExpanding listing_Main, Rect rect, Rect inRect, float num, float num2) { bool showRaces = settings.ShowAllowedRaceSettings || !Xenobiologis; bool setting = showRaces && settings.ShowTau; float lineheight = (Text.LineHeight + listing_Main.verticalSpacing); float w = rect.width * 0.480f; int Options = 3; float RaceSettings = __instance.Length(setting, Options, lineheight, 8, showRaces ? 1 : 0); //(settings.ShowImperium ? (lineheight * 2) : (lineheight * 1)) + (settings.ShowImperium ? 10 : 0); // if (!Xenobiologis) RaceSettings += 6f; float options = __instance.Length(setting, Options - 1, lineheight, 0, 0); if (!Xenobiologis) { if (!listing_Main.ButtonText("AdeptusMechanicus.Tau.ModName".Translate() + " Options" + (Prefs.DevMode && SteamUtility.SteamPersonaName.Contains("Ogliss") ? " Menu Length: " + RaceSettings : "") + (Prefs.DevMode && SteamUtility.SteamPersonaName.Contains("Ogliss") && setting ? " options length: " + options : ""), ref settings.ShowTau)) { return; } } Listing_StandardExpanding listing_Race = listing_Main.BeginSection(RaceSettings, false, 3, 4, 0); listing_Race.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.ShowTau".Translate() + " Settings" + (Prefs.DevMode && SteamUtility.SteamPersonaName.Contains("Ogliss") ? " Menu Length: " + RaceSettings : "") + (Prefs.DevMode && SteamUtility.SteamPersonaName.Contains("Ogliss") && setting ? " options length: " + options : ""), ref settings.ShowTau, null, false, true, ArmouryMain.collapseTex, ArmouryMain.expandTex); if (setting) { Listing_StandardExpanding listing_General = listing_Race.BeginSection(options, true); listing_General.ColumnWidth *= 0.32f; listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowTau".Translate() + (!DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Tau")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Faction".Translate()), ref settings.AllowTau, null, !DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Tau")) || !settings.AllowTauWeapons, DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Tau")) && settings.AllowTauWeapons); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowGueVesa".Translate() + (!DefDatabase <PawnKindDef> .AllDefs.Any(x => x.defName.Contains("OG_Guevesa")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Auxiliaries".Translate()), ref settings.AllowGueVesaAuxiliaries, null, !DefDatabase <PawnKindDef> .AllDefs.Any(x => x.defName.Contains("OG_Guevesa")) || !settings.AllowTauWeapons, DefDatabase <PawnKindDef> .AllDefs.Any(x => x.defName.Contains("OG_Guevesa")) && settings.AllowTauWeapons); listing_General.NewColumn(); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowKroot".Translate() + (!DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Kroot")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Faction".Translate()), ref settings.AllowKroot, null, !DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Kroot")) || !settings.AllowTauWeapons, DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Kroot")) && settings.AllowTauWeapons); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowKroot".Translate() + (!DefDatabase <ThingDef> .AllDefs.Any(x => x.defName.Contains("OG_Alien_Kroot")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Auxiliaries".Translate()), ref settings.AllowKrootAuxiliaries, null, !DefDatabase <ThingDef> .AllDefs.Any(x => x.defName.Contains("OG_Alien_Kroot")) || !settings.AllowTauWeapons, DefDatabase <ThingDef> .AllDefs.Any(x => x.defName.Contains("OG_Alien_Kroot")) && settings.AllowTauWeapons); listing_General.NewColumn(); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowVespid".Translate() + (!DefDatabase <ThingDef> .AllDefs.Any(x => x.defName.Contains("OG_Alien_Vespid")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Faction".Translate()), ref settings.AllowVespid, null, !DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Vespid")) || !settings.AllowTauWeapons, DefDatabase <FactionDef> .AllDefs.Any(x => x.defName.Contains("OG_Vespid")) && settings.AllowTauWeapons); listing_General.CheckboxLabeled("AdeptusMechanicus.Xenobiologis.AllowVespid".Translate() + (!DefDatabase <ThingDef> .AllDefs.Any(x => x.defName.Contains("OG_Alien_Vespid")) ? "AdeptusMechanicus.Xenobiologis.NotYetAvailable".Translate() : "AdeptusMechanicus.Xenobiologis.Auxiliaries".Translate()), ref settings.AllowVespidAuxiliaries, null, !DefDatabase <ThingDef> .AllDefs.Any(x => x.defName.Contains("OG_Alien_Vespid")) || !settings.AllowTauWeapons, DefDatabase <ThingDef> .AllDefs.Any(x => x.defName.Contains("OG_Alien_Vespid")) && settings.AllowTauWeapons); listing_Race.EndSection(listing_General); } listing_Main.EndSection(listing_Race); }