Jump to content

Science module help


Recommended Posts

I'm looking to create a science module plugin that spends a resource in order to deploy the experiment.

First, How would I spend a resource on the ship where the module is attached?

Second, what is the best way to overload the science experiment class?

Link to comment
Share on other sites

To spend the resource, use


float drain = this.part.RequestResource( resourceName, requestAmount );

This will make sure to follow the resource flow rules, and will return the amount that it was actually able to drain.

Not sure about the science experiment though :/

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