Jump to content

How does ModuleEngines' List<Propellants> work in the editor?


Recommended Posts

Somehow, ModuleEngines manages to create a List<Propellants> that gets loaded from the part.cfg file, and this List<Propellants> is successfully copied from the part in VAB's PartLoader.LoadedPartsList into the part that gets created to stick on your ship in the editor.

I cannot replicate this behavior in my own modules. I've done everything Mu presented in this thread, but when I click on my part and add it to the ship, my List<FuelTanks> is empty. I have confirmed that my List<FuelTanks> in PartLoader.LoadedPartsList has multiple entries, but none of them get copied to the new part. I have also confirmed that ModuleEngines' List<Propellants> DOES get copied correctly in the editor, so clearly what I want to do is possible.

Help?

Link to comment
Share on other sites

Tried it. :( referencing the part and partmodule's GameObject doesn't work, because the editor-part isn't at all the same part as the launchpad-part.

The ship gets rebuilt from a temporary save file on the launchpad, so all you'd succeed in doing with DontDestroyOnLoad is having parts floating somewhere that never get cleaned up, leading to a memory leak.

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