Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request]: resource consumption #85

Open
zer0Kerbal opened this issue Dec 18, 2022 · 1 comment
Open

[Request]: resource consumption #85

zer0Kerbal opened this issue Dec 18, 2022 · 1 comment
Assignees
Labels
type: discussion Questions, queries, posers, proposals and info that requires discussion. type: request Requested functionality, features, pages, workflows, endpoints, etc.

Comments

@zer0Kerbal
Copy link
Owner

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 zer0Kerbal added type: discussion Questions, queries, posers, proposals and info that requires discussion. type: request Requested functionality, features, pages, workflows, endpoints, etc. labels Dec 18, 2022
@zer0Kerbal zer0Kerbal self-assigned this Dec 18, 2022
@zer0Kerbal
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: discussion Questions, queries, posers, proposals and info that requires discussion. type: request Requested functionality, features, pages, workflows, endpoints, etc.
Development

No branches or pull requests

1 participant