/// <summary> /// Applied before OnActivate runs. /// </summary> /// <param name="___entryPrefab"></param> internal static void Prefix(GameObject ___entryPrefab) { if (___entryPrefab != null) { ModDialogs.ConfigureRowPrefab(___entryPrefab); } }
/// <summary> /// Applied after Update runs. /// </summary> internal static void Postfix(MainMenu __instance) { if (DebugNotIncludedOptions.Instance?.SkipFirstModCheck != true) { ModDialogs.CheckFirstMod(__instance.gameObject); } }
/// <summary> /// Applied to ModsScreen to add our buttons and otherwise tweak the dialog. /// </summary> private static void BuildDisplay(ModsScreen __instance, object ___displayedMods) { // Must cast the type because ModsScreen.DisplayedMod is private foreach (var displayedMod in (System.Collections.IEnumerable)___displayedMods) { ModDialogs.ConfigureRowInstance(Traverse.Create(displayedMod)); } __instance.GetComponent <AllModsHandler>()?.UpdateCheckedState(); }
/// <summary> /// Applied before DevRestartDialog runs. /// </summary> internal static bool Prefix(Manager __instance, GameObject parent, bool is_crash) { var events = __instance.events; bool cont = true; if (events != null && events.Count > 0 && is_crash) { ModDialogs.BlameFailedMod(parent); events.Clear(); cont = false; } return(cont); }
/// <summary> /// Applied after OnActivate runs. /// </summary> internal static void Postfix(KButton ___workshopButton, ModsScreen __instance) { if (___workshopButton != null) { // Hide the "STEAM WORKSHOP" button var obj = ___workshopButton.gameObject; obj.SetActive(false); var parent = obj.GetParent(); if (parent != null) { ModDialogs.AddExtraButtons(__instance.gameObject, parent); } } }