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

Audit power/energy confusion #398

Open
DaleStan opened this issue Jan 29, 2025 · 0 comments
Open

Audit power/energy confusion #398

DaleStan opened this issue Jan 29, 2025 · 0 comments
Labels

Comments

@DaleStan
Copy link
Collaborator

The words and units for power and energy are used somewhat interchangeably by the Factorio devs. We should audit the values in data.raw and determine if (a) power values in joules are reliably energy-per-tick, (b) power values in watts are reliably watts, and (c) energy values are reliably in joules.

If so, ParseEnergy should be refactored so the caller must specify whether they're reading an energy value or a power value. A ParsePower call should detect joules/tick vs watts and convert both to MW (collecting all the scattered * 60s into a single place), while ParseEnergy should reject values in MW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant