Jump to content

Resource Transfer


Recommended Posts

  • 2 weeks later...

My answer is conditional on the resource system not having changed in the past few versions, but as far as I know this still works.

How resources on a part respond to resource requests is controlled by the mode that resource is set to. There is a global setting for that resource, but there is also a local override on a per part basis.

Part.Resources is a list of PartResource objects, of which you can set the flow mode for that resource for this part specifically, including electricity.

Note that this is specific to resources on this part only, resource requests across this part are affected by the Part.Crossfeed value.

To stop a part from allowing it's resources to be consumed, set the PartResource.FlowMode to none, to cause a part to block resource requests from parts attached to one side from parts on the other side, set Part.Crossfeed false.

Hope that helps,

D.

 

Link to comment
Share on other sites

On 7/21/2016 at 10:50 AM, Diazo said:

My answer is conditional on the resource system not having changed in the past few versions, but as far as I know this still works.

How resources on a part respond to resource requests is controlled by the mode that resource is set to. There is a global setting for that resource, but there is also a local override on a per part basis.

Part.Resources is a list of PartResource objects, of which you can set the flow mode for that resource for this part specifically, including electricity.

Note that this is specific to resources on this part only, resource requests across this part are affected by the Part.Crossfeed value.

To stop a part from allowing it's resources to be consumed, set the PartResource.FlowMode to none, to cause a part to block resource requests from parts attached to one side from parts on the other side, set Part.Crossfeed false.

Hope that helps,

D.

 

If what you're saying is correct.  That means, as I was hoping, that using ElectricCharge, theoretically, one part can act as a logic gate. Am I reading this correctly?  I know that would work for fuel types, and I don't see why ElectricCharge would be any different, it's just a resource.

Link to comment
Share on other sites

On 25/07/2016 at 0:53 AM, Fengist said:

If what you're saying is correct.  That means, as I was hoping, that using ElectricCharge, theoretically, one part can act as a logic gate. Am I reading this correctly?  I know that would work for fuel types, and I don't see why ElectricCharge would be any different, it's just a resource.

I believe what Diazo said is correct. If you set the FlowMode for a resource in a part to none and turn cross feed off then it should block that resource flow.
Having said that, 1.2 Resource flow modes are all changing, and the whole system is being re-written and will most likely change this behaviour.

Link to comment
Share on other sites

4 hours ago, JPLRepo said:

I believe what Diazo said is correct. If you set the FlowMode for a resource in a part to none and turn cross feed off then it should block that resource flow.
Having said that, 1.2 Resource flow modes are all changing, and the whole system is being re-written and will most likely change this behaviour.

Oh.  Wonderful.  And I just wrote more code today that moves resources around.  Thanks for the heads up.  I shall wait to do anything big.

Link to comment
Share on other sites

14 minutes ago, Fengist said:

Oh.  Wonderful.  And I just wrote more code today that moves resources around.  Thanks for the heads up.  I shall wait to do anything big.

Look at this weeks DevNotes

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