Browse Source

Fix all startup errors

tags/v2.0.0
NorbiPeti 3 years ago
parent
commit
98e00de642
Signed by: NorbiPeti <szatmari.norbert.peter@gmail.com> GPG Key ID: DBA4C4549A927E56
5 changed files with 8 additions and 8 deletions
  1. +1
    -1
      GamecraftModdingAPI/Blocks/CustomBlock.cs
  2. +2
    -2
      GamecraftModdingAPI/Inventory/HotbarSlotSelectionHandlerEnginePatch.cs
  3. +1
    -1
      GamecraftModdingAPI/Main.cs
  4. +1
    -1
      GamecraftModdingAPI/Persistence/SaveGameEnginePatch.cs
  5. +3
    -3
      GamecraftModdingAPI/Tests/GamecraftModdingAPIPluginTest.cs

+ 1
- 1
GamecraftModdingAPI/Blocks/CustomBlock.cs 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;


+ 2
- 2
GamecraftModdingAPI/Inventory/HotbarSlotSelectionHandlerEnginePatch.cs 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;
}


+ 1
- 1
GamecraftModdingAPI/Main.cs 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.");
}
}


+ 1
- 1
GamecraftModdingAPI/Persistence/SaveGameEnginePatch.cs 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");


+ 3
- 3
GamecraftModdingAPI/Tests/GamecraftModdingAPIPluginTest.cs 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();



Loading…
Cancel
Save