Percentage of Transportation Workers in Statistics Building is broken
Closed this issue · 7 comments
insraq commented
jimmyh77 commented
@insraq This code got change last week.
mReduceOf(
gameState.transportation,
(prev, k, v) => prev + v.reduce((prev, curr) => prev + curr.currentFuelAmount, 0),
0,
) / Tick.current.workersUsed.get("Power")!,
From this!!
mReduceOf(
gameState.transportation,
(prev, k, v) => prev + v.reduce((prev, curr) => prev + curr.currentFuelAmount, 0),
0,
) / Tick.current.workersUsed.Worker!,
insraq commented
Oh, that's wrong. It should be Tick.current.workersUsed.get("Worker")
insraq commented
Do you want to make a PR? I am on the 0.3
branch
jimmyh77 commented
PR for main or 0.3?
Main I assume.
jimmyh77 commented
Not sure how they have that big a number, mine is NaN
insraq commented
This should be fixed in main
.
If you have power, then it will show a big number (which is wrong, it's using power instead of worker)