Jump to content

[SOLVED] How to get a list of CeletialBody?


Recommended Posts

Is there any method to get a list of CeletialBody in curent game universe? Or a list of CeletialBody names?

I find a list at the bottom of file "setting.cfg", though.

OK, I get it:

FlightGlobals.Bodies

Edited by Xavier513
Link to comment
Share on other sites

// get the system core, credit to KER
var CBody = PSystemManager.Instance.localBodies.Find(CB => CB.referenceBody == null || CB.referenceBody == CB);

// find all orbiting bodies
var Children = CBody.orbitingBodies;

// optionally, recursively search each child for .orbitingBodies

 

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