Jump to content

[1.8.1] Docking Port Alignment Indicator (Version 6.8.5 - Updated 12/14/19)


NavyFish

Recommended Posts

7 hours ago, NavyFish said:

EDIT  Nevermind, I think I figured it out. There was indeed an erroneous metadata file in the KCAN archive. I've submitted a PR to remove it. Out of my hands until that's mergerd, thanks for the heads up.

Merged

Link to comment
Share on other sites

It's possible that it is just a mod conflict, but on 1.2.2 it looks like 6.6.0 crashes the game while 6.5.2 works fine. This makes sense to me, what with 6.6.0 being compiled against 1.3 and not 1.2. The problem is that 6.6.0 is marked as compatible with 1.2.* in CKAN. I just rolled it back by hand, so I'm fine, but I thought someone might want to take a look at that.

 

Josh

Link to comment
Share on other sites

11 hours ago, Olympic1 said:

Merged

Thanks for the quick turnaround. I just put in another PR, see below.

5 hours ago, deepholecaver said:

It's possible that it is just a mod conflict, but on 1.2.2 it looks like 6.6.0 crashes the game while 6.5.2 works fine. This makes sense to me, what with 6.6.0 being compiled against 1.3 and not 1.2. The problem is that 6.6.0 is marked as compatible with 1.2.* in CKAN. I just rolled it back by hand, so I'm fine, but I thought someone might want to take a look at that.

 

Josh

Ok. I've changed the min version on KCAN for 6.6.0 to 1.2.0. Thanks.

Link to comment
Share on other sites

FYI I just released 6.7.0 to bring an end to the versioning and KCAN conflicts.  No changes from 6.6.0 apart from a new .version file - it was done to 'purge' the corrupted version from Spacedock. Please update to 6.7.0 if you downloaded 6.6.0. 

Edited by NavyFish
Link to comment
Share on other sites

4 hours ago, M3Man03 said:

Just wanted to say that the version of this mod on CKAN majorly conflicts with a lot of the docking ports/rings from many other mods - possibly avoid this for now.

 

Can you give us some examples?

DPAI 6.7.0 is *not* compatible with KSP 1.2.2.  if you're using 1.2.2., keep using DPAI 6.5.2.

 

Link to comment
Share on other sites

10 hours ago, PixelHunter said:

Hi,

When I try to install via CKAN the web server throws a 404 error for this URL:

Downloading "https://spacedock.info/mod/543/Docking Port Alignment Indicator/download/6.6.0"

I like your mod!

Thanks

First do a full CKAN refresh, then with DPAI selected in CKAN look at the information pane towards the right side of the window and click the "Versions" tab. From there, select and install 6.7.0.  If that doesn't work, manually install DPAI (download it from spacedock or curseforge), and CKAN will auto-detect the version next time you load it.

This should be resolved shortly - the metadata for 6.6.0 will be removed from KCAN, as it no longer exists as a downloadable (as you discovered!).

Please let me know if you have trouble getting this to work. Thanks.

Navy

Edited by NavyFish
Link to comment
Share on other sites

  • 2 weeks later...

@NavyFish

The app launcher button showing on the main menu can be fixed by replacing this:

                GameEvents.onGUIApplicationLauncherDestroyed.Add(delegate()
                {
                    //appLauncherButton = null;
                });

... with this

                GameEvents.onGUIApplicationLauncherUnreadifying.Add(delegate()
                {
            		if (launcherButton != null)
            		{
                		ApplicationLauncher.Instance.RemoveModApplication(appLauncherButton);
                		appLauncherButton = null;
            		}
                });

The key is that "unreadifying" event.  One of the old devs taught me that during the 1.2 Beta.

Link to comment
Share on other sites

On 6/13/2017 at 0:10 PM, Alshain said:

@NavyFish

The app launcher button showing on the main menu can be fixed by replacing this:


                GameEvents.onGUIApplicationLauncherDestroyed.Add(delegate()
                {
                    //appLauncherButton = null;
                });

... with this


                GameEvents.onGUIApplicationLauncherUnreadifying.Add(delegate()
                {
            		if (launcherButton != null)
            		{
                		ApplicationLauncher.Instance.RemoveModApplication(appLauncherButton);
                		appLauncherButton = null;
            		}
                });

The key is that "unreadifying" event.  One of the old devs taught me that during the 1.2 Beta.

Hey, thanks Alshain!

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...
  • 2 months later...
 

The key is that "unreadifying" event.  One of the old devs taught me that during the 1.2 Beta.

 

 

Minor bug with latest version from CKAN in KSP 1.3.0.1804 x64:

After the stock toolbar icon has appeared in-game it will also appear on the main menu after exiting KSC.

Yep, thanks. Known bug. I've been quite delinquent in updating the mod. Glad it still works :)

@Alshain   I tried your fix (a couple months ago, derp), but it didn't seem to work. Are you sure "ApplicationLauncher.Instance.RemoveModApplication" is the correct function to call upon the unreadifying event?

 

Link to comment
Share on other sites

10 hours ago, NavyFish said:

@Alshain   I tried your fix (a couple months ago, derp), but it didn't seem to work. Are you sure "ApplicationLauncher.Instance.RemoveModApplication" is the correct function to call upon the unreadifying event?

It's definitely the right call to remove the button, I use it in MonthlyBudgets (although I call it in onGameSceneSwitchRequested). Just loaded your files into VS and I notice you aren't destroying your GameEvents when the mod is unloaded not sure if that's needed, but I thought I was once told if you don't do that the event will fire but will throw exceptions as nothing to receive it?.

Failing that, a simple if(HighLogic.LoadedScene == GameScenes.MainMenu) return; in the addToStockAppLauncher method would probably do it.

 

Edited by severedsolo
Link to comment
Share on other sites

18 hours ago, NavyFish said:

 

Yep, thanks. Known bug. I've been quite delinquent in updating the mod. Glad it still works :)

@Alshain   I tried your fix (a couple months ago, derp), but it didn't seem to work. Are you sure "ApplicationLauncher.Instance.RemoveModApplication" is the correct function to call upon the unreadifying event?

 

It should be.  I've slept since then.  I'll have to go back and look at your implementation.  One thing you might want to add to the delegate is the event unregistration though.

GameEvents.onGUIApplicationLauncherUnreadifying.Remove()

My implementation is a bit different, I treat buttons as interfaced objects so I can treat the App Launcher and Blizzy's Toolbar as single Interface (IButtonBar).  Never the less, if it helps, here is the code I use.  I also registered the onGUIApplicationLauncherDestroyed  event which looking at it now, I don't seem to have unregistered that one in my code... hmmm.

https://github.com/Alshain01/KSP-AdvancedTweakablesButton/blob/master/AdvancedTweakablesButton/AppLauncher.cs

this one is from AGM, it's basically the same but instead of altering a setting in the game, it controls the visibility of a window.  It also has documentation and better code style (I took the time to run through StyleCop on it).

https://github.com/Alshain01/ActionGroupManager/blob/master/AGM-VisualUI/UI/ButtonBar/AppLauncher.cs

Link to comment
Share on other sites

Hi @NavyFish. If you are open to issues/features reports, then I have minor one or two :) The mod window stays open when you press F2. It's probably connected to the second one issue/feature, that when you close DPAI window, then targeting of a port is lost.

Anyway, the mod works nicely. Thanks for it.

Link to comment
Share on other sites

Hey guys I am starting to rebuild a full 1.3.1 Kerbal system and I am very careful about the rebuilt .... 

This mod is one of the most useful mod ever ... but I do not want to corrupt anything. Someone can confirm that it still work on 1.3.1 please?

 

 

Link to comment
Share on other sites

53 minutes ago, Frag2000 said:

Hey guys I am starting to rebuild a full 1.3.1 Kerbal system and I am very careful about the rebuilt .... 

This mod is one of the most useful mod ever ... but I do not want to corrupt anything. Someone can confirm that it still work on 1.3.1 please?

 

 

I've been using it throughout the 1.3.1 beta and now in full release and has worked perfectly.

Link to comment
Share on other sites

On 10/6/2017 at 2:19 AM, maja said:

Hi @NavyFish. If you are open to issues/features reports, then I have minor one or two :) The mod window stays open when you press F2. It's probably connected to the second one issue/feature, that when you close DPAI window, then targeting of a port is lost.

Anyway, the mod works nicely. Thanks for it.

Thanks for the report!

28 minutes ago, spikethedoggy said:

I've been using it throughout the 1.3.1 beta and now in full release and has worked perfectly.

 

28 minutes ago, vicdoctor said:

It works in 1.3.1

 

Hooray :)  thank you for checking. I'll update the OP

Link to comment
Share on other sites

  • 2 weeks later...
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...