Fengist Posted July 10, 2016 Share Posted July 10, 2016 Anyone know of a way to stop specific and all resources from being transferred through a part. Especially electricity? I didn't see anything obvious in the API. Thanks Link to comment Share on other sites More sharing options...
Fengist Posted July 19, 2016 Author Share Posted July 19, 2016 Guess that's a no. Link to comment Share on other sites More sharing options...
FreeThinker Posted July 21, 2016 Share Posted July 21, 2016 Electriccharge is a global stock source, it will always be avialable Link to comment Share on other sites More sharing options...
Diazo Posted July 21, 2016 Share Posted July 21, 2016 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 More sharing options...
Fengist Posted July 24, 2016 Author Share Posted July 24, 2016 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 More sharing options...
JPLRepo Posted July 28, 2016 Share Posted July 28, 2016 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 More sharing options...
Fengist Posted July 28, 2016 Author Share Posted July 28, 2016 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 More sharing options...
JPLRepo Posted July 28, 2016 Share Posted July 28, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now