zer0Kerbal / RoverAntiGravitySystem

And an other new release from your Lunatic scientists! Theeeee Rover gravity manipulator! A module to manipulate the gravity affecting your rover. You can choose which planet or moon settings you want to apply, turn it on and flyyyyyyyyyy. Sadly our scientist were not able to solve the problem of conflicting with engine electronics. For Kerbal Space Program.
https://forum.kerbalspaceprogram.com/index.php?/topic/208483-*/
GNU General Public License v2.0
3 stars 2 forks source link

[Request]: resource consumption #85

Open zer0Kerbal opened 1 year ago

zer0Kerbal commented 1 year ago

Description of the new feature / enhancement

make the resource consumption scale with the mass of the vessel being effected

Proposed technical implementation details

code change. when unit powered on, consume EC at rate ECbase * vessel.mass

zer0Kerbal commented 1 year ago

from @lisias

If you are on a PartModule, try

this.vessel.GetTotalMass();

This will get yout the current total mas of the vessel, including everything inside (fuel, and I think kerbals too).

https://www.kerbalspaceprogram.com/ksp/api/class_vessel.html#a5f5aa50edff7f5b58df6fe4ff4ec298c

There's also this "RevelMass()" thingy, but theres's no documentation on it.