Jump to content

[1.7.x ~ 1.3.x] AirlockPlus: EVA to/from any part, using any airlock [ v.0.0.11 @ 2019-06-02 ]


cakepie

Recommended Posts

  • 5 months later...
  • 4 months later...
  • 1 month later...
  • 2 months later...
On 12/24/2020 at 6:42 AM, eberkain said:

the alt-click on a hatch to eva a kerb from any pod to that hatch doens't seem to work anymore.   :( 

Its working but because framewait is too short it usually all aborted before window appear. Increasing  this

private static int framewait = 5;

will help. I set it to 50 and its always work(little overkill but i dont mind) .

p.s. i know this is old post, but issue still here. and this is a great mod(i really tired of transfering 20 kerbals on disembark/embark so they plant flag and back).

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
  • 10 months later...
On 9/25/2021 at 9:11 PM, shelshok said:

Installing from CKAN says incompatible with later versions of Harmony.

https://imgur.com/a/5ZMYh1i

Indeed it is.  If you have Airlocks Plus (with Harmony v1 removed), Konstruction (and its dependencies) and something that uses Harmony v2 installed, the Konstruction toolbar button will get duplicated each time you revert to the VAB or SPH.  After a few reverts the toolbar is filled with multiple Konstruction buttons.   Remove Airlocks Plus and the duplication issue goes away.  

I don't know if it causes any other issues with other mods, but this issue is certainly evidence that Airlocks Plus does not get along with Harmony v2.  

It's too bad, this is a really useful mod.

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...

@cakepie hasn't posted on the forum in four years (almost to the date, actually), though they did interact about a year ago. HOPEFULLY this ping gets their attention.

The license for this mod is, unfortunately, a pain in the ass for modification. Even if I was willing to maintain it that would put me off. With that said, you can get this to compile pretty easily against 1.12/ModuleManager 4.2.2 with the following setup:

.NET version: 4.8

References:
Assembly-CSharp.dll
UnityEngine.CoreModule.dll
UnityEngine.InputLegacyModule.dll
UnityEngine.PhysicsModule.dll
UnityEngine.Te3xtRenderingModule.dll
UnityEngine.UI.dll

0Harmony.dll
ModuleManager.4.2.2.dll

CLSInterfaces.dll
ConnectedLivingSpace.dll

You'll need to make the following change to the source files to use the MM-distributed Harmony:

diff --git a/Source/HarmonyPatches.cs b/Source/HarmonyPatches.cs
index 163ecb3..d54befc 100644
--- a/Source/HarmonyPatches.cs
+++ b/Source/HarmonyPatches.cs
@@ -4,7 +4,7 @@
 using System.Reflection;
 using UnityEngine;
 using KSP.UI.Screens.Flight.Dialogs;
-using Harmony;
+using HarmonyLib;

 namespace AirlockPlus.Harmony
 {
@@ -18,9 +18,9 @@ public sealed class Patcher : MonoBehaviour
             // If Harmony dependency is missing, AddonLoader will barf in logs when instantiating addon
             //     ADDON BINDER: Cannot resolve assembly ...
             // and none of this will execute
-            Assembly harmonyAssy = typeof(HarmonyInstance).Assembly;
+          Assembly harmonyAssy = typeof(HarmonyLib.Harmony).Assembly;
             Debug.Log($"[AirlockPlus|Patcher] Using Harmony {harmonyAssy.GetName().Version.ToString()} located at {harmonyAssy.Location}");
-            HarmonyInstance harmony = HarmonyInstance.Create("com.github.cake-pie.AirlockPlus");
+          HarmonyLib.Harmony harmony = new HarmonyLib.Harmony("com.github.cake-pie.AirlockPlus");
             harmony.PatchAll(Assembly.GetExecutingAssembly());
             harmonyAvailable = true;
             Destroy(gameObject);

I've only tested it briefly since recompiling it, but at first glance it works fine. Given that the harmony code is all I changed I'd be surprised if there's any actual "new" bugs that didn't exist already.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...