in the fleet upkeep menu show the total it cost, everything presented in a nice spreadsheet #230
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Done in
34e2520.Two faults, and the second is invisible from the code.
There was no total. The menu listed every berth and never added them up, so the bill had to be done in your head. There is a
TOTALrow now, and the headline carries both figures — "13 ore 2 gas 5 energy EVERY 25S · 31.2 ore 4.8 gas 12.0 energy PER MINUTE" — because they answer different questions: the per-charge bill is what you watch happen, the rate is what you plan against.The columns never aligned. Rows were one
Labelpadded with%-16s, which lines up only in a monospace font — the theme's isCarroisGothicSC-Regular, which is proportional — withautowrap_mode = 2on top, so a long row folded and the table lost its shape entirely. It is a realGridContainerofLabelcells now.Amounts are listed in the game's own resource order rather than the dictionary's. The screenshot showed "2 ore 1 energy" on one row above "2 gas 2 ore" on the next, which defeats the point of a column you read down.
The sheet is rebuilt only when the numbers change.
BuildControllerrefreshes this menu every frame while it is open, and rebuilding a dozen Labels per frame for figures that move every 25 seconds is what #6 and #10 are about. The test refreshes twice and asserts the same cell objects come back.Every figure still comes from
fleet_upkeep_breakdown(), the calculation the charging loop itself runs — the new total sums those same per-berth costs rather than recomputing them, so the readout cannot disagree with what is actually being taken.