[ModAPI] Please add functionality to set tank FilledRatio in IMyGasTank

Meridius_IX shared this feedback 5 years ago
Submitted

While working with Hydrogen Tanks in ModAPI, I've found there's no reliable way to set the FilledRatio of the tank (I use this in my NPC drones so I don't need to worry about gas running out).


I've tried setting it using the MyResourceSourceComponent, but it doesn't work properly on the ModAPI side of things.


I've also tried copying the block object builder, deleting the block, changing the objectbuilder value, and then readding the block. This works fine in SinglePlayer, but the Method to add blocks in IMyCubeBlock does not send the block to clients (my attempts to build the block on the client also did not work).


Having an easy-to-use method in the IMyGasTank interface would make life a lot easier for dealing with this issue!

Replies (1)

photo
1

Yey ChangeFilledRatio() was added in v204, can be marked solved.

Leave a Comment
 
Attach a file