Jump to content

ResearchAndDevelopment: Get List of all RDTech nodes?


Recommended Posts

Hi everyone,

 

I am currently working on implementing science/research sync for DMP since official multiplayer is always just another major release away(cough). And I am looking for a way to get a List of all available RDTech entries while NOT in the Research and Development screen(as such RDController does not qualify).

 

Currently I am receiving the PartList with PartLoader.LoadedPartsList and iterate over that, but I hope/believe there is a better way I couldn't find so far. Google/KSP API Reference/this subforum didn't yield any results that I could find so I am just throwing out the question.

 

Cheers and thanks!

 

Edit: Derp I believe I found it sunken into a long thread, the solution appears to be:

 

// Available even outside the R&D Building
foreach(ProtoRDNode node in AssetBase.RnDTechTree.GetTreeNodes())
{
    UnityEngine.Debug.Log("Found ProtoRDNode: " + node.tech.techID + " with state: " + node.tech.state);
}

// Available while having the R&D Building open
            RDNode[] nodes = UnityEngine.GameObject.FindObjectsOfType<RDNode>();
            foreach(RDNode node in nodes)
            {
                DarkLog.Debug("Found RDNode: " + node.name + "[id: " + node.tech.techID + "] with state: " + node.state);
            }

I will update the community API wiki with all information I have gathered surrounding ResearchAndDevelopment

Edited by bawki
Solution found
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...