Jump to content

Spawning a new part?


Recommended Posts

So, I'd like to give my plugin the ability to create a hexcan full of SolidFuel (outside of the VAB/SPH). I could use some advice on the best/easiest way to go about it. KAS is already a requirement, so it doesn't really matter where the hexcan appears, so long as an EVA kerbal can grab it reasonably easily. I can see a few options, but they all seem a bit messy for simply creating a single part.

  1. Create the hexcan as a new vessel, similar to Extraplanetary Launchpads. This might involve some work to ensure the hexcan ends up nearby, but not within another vessel.
  2. Unload the current vessel, edit the protovessel so that a hexcan is sticking off the side, then reload the vessel. It would be hard to take into account every possible vessel configuration. Also, is doing this to an active vessel likely to cause any problems?
  3. Add the hexcan directly to a KAS container. I've looked at the KAS sourcecode and I think I wouldn't have access to the internal functions KAS uses for this. I could do the same thing as idea #2, but edit the protopart container to add the hexcan.

Thoughts?

Edited by XanderTek
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...