Fix all startup errors
This commit is contained in:
parent
2d41026a05
commit
98e00de642
5 changed files with 8 additions and 8 deletions
|
@ -83,7 +83,7 @@ namespace GamecraftModdingAPI.Blocks
|
|||
|
||||
//public static ExclusiveGroup Group { get; } = new ExclusiveGroup("Custom block");
|
||||
|
||||
[HarmonyPatch]
|
||||
//[HarmonyPatch] - TODO
|
||||
public static class MaterialCopyPatch
|
||||
{
|
||||
private static Material[] materials;
|
||||
|
|
|
@ -15,9 +15,9 @@ namespace GamecraftModdingAPI.Inventory
|
|||
|
||||
public static BlockIDs EquippedPartID { get => (BlockIDs)selectedBlockInt; }
|
||||
|
||||
private static MethodInfo PatchedMethod { get; } = AccessTools.Method("Gamecraft.GUI.Hotbar.Blocks.SyncHotbarSlotSelectedToEquippedPartEngine:ActivateSlotForCube", parameters: new Type[] { typeof(uint), typeof(int), typeof(ExclusiveGroupStruct) });
|
||||
private static MethodInfo PatchedMethod { get; } = AccessTools.Method("Gamecraft.GUI.Hotbar.Blocks.SyncHotbarSlotSelectedToEquippedPartEngine:ActivateSlotForCube", parameters: new Type[] { typeof(uint), typeof(int) });
|
||||
|
||||
public static void Prefix(uint playerID, int selectedDBPartID, ExclusiveGroupStruct groupID)
|
||||
public static void Prefix(uint playerID, int selectedDBPartID)
|
||||
{
|
||||
selectedBlockInt = selectedDBPartID;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace GamecraftModdingAPI
|
|||
|
||||
private static void OnPatchError()
|
||||
{
|
||||
ErrorBuilder.DisplayMustQuitError("Failed to patch Gamecraft!\n" +
|
||||
ErrorBuilder.DisplayMustQuitError("Failed to patch Techblox!\n" +
|
||||
"Make sure you're using the latest version of GamecraftModdingAPI or disable mods if the API isn't released yet.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ using HarmonyLib;
|
|||
|
||||
namespace GamecraftModdingAPI.Persistence
|
||||
{
|
||||
[HarmonyPatch]
|
||||
//[HarmonyPatch] - TODO
|
||||
class SaveGameEnginePatch
|
||||
{
|
||||
private static readonly byte[] frameStart = Encoding.UTF8.GetBytes("\0\0\0GamecraftModdingAPI\0\0\0");
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace GamecraftModdingAPI.Tests
|
|||
//SteamInitPatch.ForcePassSteamCheck = true;
|
||||
// in case running in a VM
|
||||
//MinimumSpecsCheckPatch.ForcePassMinimumSpecCheck = true;
|
||||
// disable some Gamecraft analytics
|
||||
// disable some Techblox analytics
|
||||
//AnalyticsDisablerPatch.DisableAnalytics = true;
|
||||
// disable background music
|
||||
Logging.MetaDebugLog("Audio Mixers: " + string.Join(",", AudioTools.GetMixers()));
|
||||
|
@ -144,7 +144,7 @@ namespace GamecraftModdingAPI.Tests
|
|||
{
|
||||
CommandBuilder.Builder()
|
||||
.Name("Exit")
|
||||
.Description("Close Gamecraft immediately, without any prompts")
|
||||
.Description("Close Techblox immediately, without any prompts")
|
||||
.Action(() => { UnityEngine.Application.Quit(); })
|
||||
.Build();
|
||||
|
||||
|
|
Loading…
Reference in a new issue