public OverrideHook() { var fxCore = new Fox_Core("NimbusFox", "OverrideAPI", "0.1"); fxCore.PatchController.Override(typeof(TileDatabase), "LoadDefinitions", typeof(TileDatabasePatches), nameof(TileDatabasePatches.LoadDefinitionsInit), TileDatabasePatches.LoadDefinitionsTranspiler); }
internal static void Init() { FoxCore = new Fox_Core("NimbusFox", "World Edit", "V0.2"); _positions = new Dictionary <Entity, UserData>(); _undoData = new Dictionary <string, RedoUndo>(); RegionManager = new RegionManager(); }
public void GameContextInitializeAfter() { if (Process.GetCurrentProcess().ProcessName.Contains("ContentBuilder") && !Process.GetCurrentProcess().StartInfo.Arguments.Contains("--stopVariantCheck")) { var variantLoader = new VariantLoader(); Application.Run(variantLoader); variantLoader.Dispose(); } if (FxCore == null) { FxCore = new Fox_Core("NimbusFox", "FoxCore", "V2.1"); //FxCore.PatchController.Add(typeof(PlayerEntityLogic), "PersistOtherPlayerData", typeof(CoreHook), nameof(BeforeSave), typeof(CoreHook), nameof(AfterSave)); //FxCore.PatchController.Add(typeof(PlayerEntityLogic), "Construct", null, null, typeof(CoreHook), nameof(AfterLoad)); FxCore.PatchController.Add(typeof(PlayerPersistence), "SaveAllPlayerDataOnConnect", null, null, typeof(CoreHook), nameof(OnConnect)); FxCore.PatchController.Add(typeof(PlayerPersistence), "SaveDisconnectingPlayer", null, null, typeof(CoreHook), nameof(OnDisconnect)); FxCore.PatchController.Add(typeof(ChatController), "ReceiveConsoleResponse", typeof(ChatControllerPatches), nameof(ChatControllerPatches.ReceiveConsoleResponse)); UserManager = new UserManager(); } }
public TestHook() { var fxCore = new Fox_Core("NimbusFox", "TestMod", "DEV"); DirectoryTest(fxCore.SaveDirectory); DirectoryTest(fxCore.ConfigDirectory); fxCore.ExceptionManager.HandleException(new Exception("Test")); }
public static void CreateItem(Dictionary <Color, Color> replaceColorsWith, string kind, string newVariantTileCode, string source, Fox_Core modFoxCore, Blob overrides) { CreateItem(replaceColorsWith, kind, newVariantTileCode, source, modFoxCore.ModDirectory, overrides); }
public static void CreateTile(Tile baseTile, Dictionary <Color, Color> replaceColorsWith, string newVariantTileCode, Fox_Core modFoxCore, Blob overrides) { CreateTile(baseTile, replaceColorsWith, newVariantTileCode, modFoxCore.ModDirectory, overrides); }