Jump to content

ScenarioModule, proper use and an odd issue


Recommended Posts

Last month I discovered a very odd interaction between two mods FillItUp and ProgressiveColonization.  The problem occured when leaving the Editor and going to launch.

Everything works fine in the editor: VGfZeqr.png

but after launch: tqorgFm.png

You can see how buttons have been doubled.

FillItUp uses the ToolbarController, ProgressiveColonization uses the stock AddModApplication()

I've spent several hours on this, and the only thing I found was that the method calling AddModApplication() is inside a ScenarioModule, which happens to be an abstract class inherited by two other classes, one for the Editor and one for the Flight scene.

When I merely change the class from a ScenarioModule to a MonoBehaviour, the toolbar work correctly.

Oddly enough, even when I disable the AddModApplication() call in ProgressiveColonization, the problem still happens.

ProgressiveColonization uses this method:  PopupDialog.SpawnPopupDialog

So is it ok/normal to use ScenarioModule this way (as a replacement for MonoBehaviour)?  And even though it does inherit from MonoBehaviour, certain methods, such as Awake(), Start(), etc aren't available to be used (ie:  they don't get called)

 

 

 

Edited by linuxgurugamer
Link to comment
Share on other sites

I've found the cause of the problem, and it has nothing to do with the ScenarioModule, that was a red herring.

It turns out that both mods are intercepting the Launch button, and then something odd is going on, I haven't yet figured out what is wrong.  This only happens with these two mods (that I know of) because of this particular behaviour.

I'll update this once I have it fixed

Link to comment
Share on other sites

9 minutes ago, linuxgurugamer said:

I've found the cause of the problem, and it has nothing to do with the ScenarioModule, that was a red herring.

It turns out that both mods are intercepting the Launch button, and then something odd is going on, I haven't yet figured out what is wrong.  This only happens with these two mods (that I know of) because of this particular behaviour.

I'll update this once I have it fixed

I saw the doubling up of stock toolbar icons in 2019, I think.  What troubleshooting I did didn't succeed in narrowing down the mods that still had the bug.  I think the mods included Janitor's Closet.  I'll go through my old CKAN setups this weekend and see if one of them still has the bug.

Link to comment
Share on other sites

30 minutes ago, Jacke said:

I saw the doubling up of stock toolbar icons in 2019, I think.  What troubleshooting I did didn't succeed in narrowing down the mods that still had the bug.  I think the mods included Janitor's Closet.  I'll go through my old CKAN setups this weekend and see if one of them still has the bug.

I know what the problem is.  It has to do with both mods intercepting the Launch button, and then both mods, simultaneously initiating the launch sequence.

It has to do with this:

EditorLogic.fetch.launchBtn.onClick.RemoveListener(defaultLaunchDelegate);

 

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...