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

Asteroid/Comet mass/resources reverting to default after mining them to exhaustion #51

Closed
gotmachine opened this issue Jun 30, 2022 · 0 comments
Labels
kspBug Identified KSP issue

Comments

@gotmachine
Copy link
Contributor

This can be easily reproduced by :

  • attaching a mining setup to a brand new asteroid and using a drain valve to throw the ore away.
  • engaging mining
  • timewarping until asteroid depletion
  • quicksaving-quickreloading
  • the asteroid/comet is now back to full mass and 100% resources

The key for a consistent repro is to timewarp relatively fast, inducing a relatively large per-timestep amount of mass removed.

This seems to happen because of the very weird logic used to keep track of asteroid mass. It seems that during the last update step where there is still something to mine, if the per-timestep mined amount exceed some threshold, it leaves the data in persisted state that will be interpreted as "that asteroid part was just discovered, initialize its mass/resources" on the next load.

@gotmachine gotmachine added the kspBug Identified KSP issue label Jun 30, 2022
gotmachine added a commit that referenced this issue Jul 2, 2022
- New KSP bugfix : [EnginePlateAirstreamShieldedTopPart](#52) (Thanks to @yalov (flart) for reporting and to @Aelfhe1m for coming up with a clever solution).
- New KSP bugfix : [AsteroidInfiniteMining](#51) (Thanks to @Rodg88 for reporting).
gotmachine added a commit that referenced this issue Jan 30, 2023
- New KSP bugfix : [EnginePlateAirstreamShieldedTopPart](#52) (Thanks to @yalov (flart) for reporting and to @Aelfhe1m for coming up with a clever solution).
- New KSP bugfix : [AsteroidInfiniteMining](#51) (Thanks to @Rodg88 for reporting).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kspBug Identified KSP issue
Development

No branches or pull requests

1 participant