Jump to content

How to find science need for node a part is in


Recommended Posts

I'd like to be able to take a part, and find out how much science was needed to buy the node that that part is in.  Obvioiusly this would be for a science and career game.

So I know that first I need to find the TechRequired for the part, and then given that, find the find and get the science cost.

But so far, I haven't had any success.  The tech tree is only spawned when going into the science building, I need to do this in a flight scene.

Thanks

Link to comment
Share on other sites

15 minutes ago, linuxgurugamer said:

I'd like to be able to take a part, and find out how much science was needed to buy the node that that part is in.  Obvioiusly this would be for a science and career game.

So I know that first I need to find the TechRequired for the part, and then given that, find the find and get the science cost.

But so far, I haven't had any success.  The tech tree is only spawned when going into the science building, I need to do this in a flight scene.

Thanks

I'm hoping this is it:

 ProtoTechNode techNode = ResearchAndDevelopment.Instance.GetTechState(startingPart.partInfo.TechRequired);

Link to comment
Share on other sites

28 minutes ago, linuxgurugamer said:

I'm hoping this is it:

 ProtoTechNode techNode = ResearchAndDevelopment.Instance.GetTechState(startingPart.partInfo.TechRequired);

But that doesn't seem to work in the flight scene :-(

I suppose it helps if "startingPart" is actually initialized :-)

Edited by linuxgurugamer
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...