Fix all startup errors

This commit is contained in:
Norbi Peti 2021-04-12 17:37:51 +02:00
parent 2d41026a05
commit 98e00de642
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
5 changed files with 8 additions and 8 deletions

View file

@ -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;

View file

@ -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;
}

View file

@ -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.");
}
}

View file

@ -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");

View file

@ -47,7 +47,7 @@ namespace GamecraftModdingAPI.Tests
/// Ideally, GamecraftModdingAPI should be loaded by another mod; not itself
/// </summary>
public class GamecraftModdingAPIPluginTest : IllusionPlugin.IEnhancedPlugin
{
{
private static Harmony harmony { get; set; }
@ -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();