static SkinManager() { if (CustomKnight.isSatchelInstalled()) { SetDataDir(); } }
internal DumpManager() { if (CustomKnight.isSatchelInstalled()) { ModHooks.LanguageGetHook += SaveTextDump; UnityEngine.SceneManagement.SceneManager.sceneLoaded += dumpAllSprites; On.HutongGames.PlayMaker.Actions.ActivateGameObject.DoActivateGameObject += dumpAllSprites; } }
internal static Menu PrepareMenu(ModToggleDelegates toggleDelegates) { return(new Menu("Custom Knight", new Element[] { Blueprints.CreateToggle(toggleDelegates, "Custom Skins", "", "Enabled", "Disabled"), new HorizontalOption( "Swapper", "Apply skin to bosses, enemies & areas", new string[] { "Disabled", "Enabled" }, (setting) => { CustomKnight.toggleSwap(setting == 1); }, () => CustomKnight.swapManager.enabled ? 1 : 0, Id: "SwapperEnabled"), new HorizontalOption( "Select Skin", "The skin will be used for current save and any new saves.", getSkinNameArray(), (setting) => { selectedSkin = setting; }, () => selectedSkin, Id: "SelectSkinOption"), new MenuButton("PreloadButton", "Will Preload objects for modifying events", (_) => TogglePreloads(), Id: "PreloadButton"), new MenuRow( new List <Element> { Blueprints.NavigateToMenu("Skin List", "Opens a list of Skins", () => SkinsList.GetMenu(MenuRef.menuScreen)), new MenuButton("Apply Skin", "Apply The currently selected skin.", (_) => ApplySkin()), }, Id: "ApplyButtonGroup" ) { XDelta = 400f }, new TextPanel("To Add more skins, copy the skins into your Skins folder."), new MenuRow( new List <Element> { new MenuButton("Open Folder", "Open skins folder", (_) => OpenSkins()), new MenuButton("Fix / Reload", "Fix skin structure and reload", (_) => FixSkins()), new MenuButton("Need Help?", "Join the HK Modding Discord", (_) => OpenLink("https://discord.gg/J4SV6NFxAA")), }, Id: "HelpButtonGroup" ) { XDelta = 425f }, new MenuRow( new List <Element> { new MenuButton("Dump", "Dumps the sprites that Swapper supports (Expect lag)", (_) => ToggleDumping(), Id: "DumpButton"), //new MenuButton("Generate Cache","Generates Cache for Everything (Can take hours)",(_)=>DumpAll(),Id:"DumpAllButton"), //new MenuButton("Need Help?","Join the HK Modding Discord",(_)=>OpenLink("https://discord.gg/J4SV6NFxAA")), }, Id: "AdditonalButtonGroup" ) { XDelta = 425f }, })); }