Jump to content

Need to disable change of fairings in Editor


Recommended Posts

I'm updating Kronal Vessel Viewer for 1.2.1, and have made a lot of progress.

However, I'm stumped when working with the stock fairings.  Specifically, when in the editor, and you move the mouse over a fairing, it explodes and becomes opaque.

I've figured out that using the following functions will manually set the exploded view and opacity, my problem is that the game seems to constantly update and reset them no matter where the mouse is:

p.SetExplodedView(VesselViewConfig.fairingPanelValueParam);
p.SetTgtExplodedView(VesselViewConfig.fairingPanelValueParam);
p.SetOpacity(0);
p.SetTgtOpacity(0);

I can probably remove the two SetTgt... functions, but that's not my issue.

So for now, I have a LateUpdate function which constantly sets the values while in the Editor.  It works, kindof, but is kludgy, also the opacity of the fairings flickers.  Is there any way to disable the game from constantly setting those values?

I've even tried using the following:

InputLockManager.SetControlLock(ControlTypes.All, "KVV");
EditorLogic.fetch.Lock(true, true, true, "KVV");

Thanks in advance

Edited by linuxgurugamer
Link to comment
Share on other sites

If I'm not mistaken, the module won't receive LateUpdate unless it is enabled.  So you could set

Part.FindModuleImplementing<ModuleProceduralFairing>().enabled = false;

(abbreviated for clarity)

That in itself is a bit hacky too though.

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