public static void Postfix1(PHCKLDDNJNP __instance) { if (GameObject.FindObjectsOfType <BCLDBBKFJPK>().Count == 4) { BCLDBBKFJPK showAnonymousvote = GameObject.FindObjectsOfType <BCLDBBKFJPK>().ToList().Where(x => x.TitleText.Text == "Anonymous Votes").First(); showSheriffOption = GameObject.Instantiate(showAnonymousvote); showSheriffOption.TitleText.Text = "Show Sheriff"; showSheriffOption.NHLMDAOEOAE = CustomGameOptions.showSheriff; showSheriffOption.CheckMark.enabled = CustomGameOptions.showSheriff; PCGDGFIAJJI killcd = GameObject.FindObjectsOfType <PCGDGFIAJJI>().ToList().Where(x => x.TitleText.Text == "Kill Cooldown").First(); SheriffCooldown = GameObject.Instantiate(killcd); SheriffCooldown.gameObject.name = "SheriffCDText"; SheriffCooldown.TitleText.Text = "Sheriff Kill Cooldown"; SheriffCooldown.Value = CustomGameOptions.SheriffKillCD; SheriffCooldown.ValueText.Text = CustomGameOptions.SheriffKillCD.ToString(); LLKOLCLGCBD[] options = new LLKOLCLGCBD[__instance.KJFHAPEDEBH.Count + 2]; __instance.KJFHAPEDEBH.ToArray().CopyTo(options, 0); options[options.Length - 2] = showSheriffOption; options[options.Length - 1] = SheriffCooldown; __instance.KJFHAPEDEBH = new Il2CppReferenceArray <LLKOLCLGCBD>(options); } }
public static void Postfix() { BCLDBBKFJPK option = GameObject.FindObjectsOfType <BCLDBBKFJPK>().ToList().Where(x => x.TitleText.Text == "Anonymous Votes").First(); if (chameleonDuration != null && chameleonCooldown != null) { chameleonDuration.transform.position = option.transform.position - new Vector3(0f, 5.5f, 0f); chameleonCooldown.transform.position = option.transform.position - new Vector3(0f, 6f, 0f); } }
public static void Postfix2(PHCKLDDNJNP __instance) { BCLDBBKFJPK showAnonymousvote = GameObject.FindObjectsOfType <BCLDBBKFJPK>().ToList().Where(x => x.TitleText.Text == "Anonymous Votes").First(); if (SheriffCooldown != null & showSheriffOption != null) { showSheriffOption.transform.position = showAnonymousvote.transform.position - new Vector3(0, 5.5f, 0); SheriffCooldown.transform.position = showAnonymousvote.transform.position - new Vector3(0, 6f, 0); } }
public static void Postfix(GameOptionsMenu __instance) { foreach (var customNoOption in AllCustomNumberOptions) { try { Scroller componentInParent = __instance.GetComponentInParent <Scroller>(); componentInParent.YBounds = new FloatRange(componentInParent.YBounds.min, 20f); float num = -8.5f; float num2 = -0.5f; NumberOption option = UnityEngine.Object.Instantiate(__instance.GetComponentsInChildren <NumberOption>().First(), __instance.transform); // Instantiate new option option.transform.localPosition = new Vector3(option.transform.localPosition.x, num + num2 * customNoOption.IndexId, option.transform.localPosition.z); // Update position option.Title = (StringNames)customNoOption.StringNameId; // Set custom string name id option.TitleText.Text = customNoOption.TitleText; // Set the title text option.Value = customNoOption.Value; // Set the current value option.gameObject.AddComponent <NumberOption>(); option.ValidRange = customNoOption.FloatRange; customNoOption.GameNumberOption = option; } catch { } } foreach (var customToggleOption in AllCustomToggleOptions) { try { Scroller componentInParent = __instance.GetComponentInParent <Scroller>(); componentInParent.YBounds = new FloatRange(componentInParent.YBounds.min, 20f); float num = -8.5f; float num2 = -0.5f; ToggleOption option = UnityEngine.Object.Instantiate(__instance.GetComponentsInChildren <ToggleOption>().First(), __instance.transform); // Instantiate new option option.transform.localPosition = new Vector3(option.transform.localPosition.x, num + num2 * customToggleOption.IndexId, option.transform.localPosition.z); // Update position option.Title = (StringNames)customToggleOption.StringNameId; // Set custom string name id option.TitleText.Text = customToggleOption.TitleText; // Set the title text option.CheckMark.enabled = customToggleOption.Value; // Set the current value option.gameObject.AddComponent <NumberOption>(); customToggleOption.GameToggleOption = option; } catch { } } }
public static bool Prefix(ToggleOption __instance) { if (__instance.TitleText.Text == "Show Sheriff") { CustomGameOptions.showSheriff = !CustomGameOptions.showSheriff; FFGALNAPKCD.LocalPlayer.RpcSyncSettings(FFGALNAPKCD.GameOptions); __instance.NHLMDAOEOAE = CustomGameOptions.showSheriff; __instance.CheckMark.enabled = CustomGameOptions.showSheriff; return(false); } return(true); }
static bool Prefix(ref ToggleOption __instance) { if (__instance.Title == killTargetTitle) { string str = ""; TranslationController_GetString.Prefix(__instance.Title, ref str); __instance.TitleText.Text = str; __instance.CheckMark.enabled = doKillSheriffsTarget; __instance.OnValueChanged = new Action <OptionBehaviour>(GameOptionsMenu_Start.OnValueChanged); __instance.enabled = true; return(false); } return(true); }
public static void Postfix(ToggleOption __instance) { try { var options = AllCustomToggleOptions.Where(x => x.StringNameId == (int)__instance.Title); if (options.Count() != 1) { return; } var option = options.First(); if (option.Value != __instance.CheckMark.enabled) { option.Value = __instance.CheckMark.enabled; option.ExecuteValueChanged(); } } catch { } }