sandalle / minecraft_bigreactor_control

Minecraft BigReactor Computercraft Control Program
MIT License
76 stars 41 forks source link

Energy buffer rounded to nearest percentage #9

Closed Viper007Bond closed 10 years ago

Viper007Bond commented 10 years ago

Despite the decimal in the display, the energy percentage shown is being rounded to the nearest full integer.

Big Reactors 0.3.3A ComputerCraft 1.63

sandalle commented 10 years ago

Sorry for the delay, I didn't get a message stating that this issue was opened. I'll look into this. There is some rounding code used and the display seems to like including a decimal place or two even when I ask it not to (or I forgot to commit that change ;)).

Viper007Bond commented 10 years ago

The reactors can buffer quite a bit so I think there's nothing wrong with showing tenths of a percent. It gives you a more accurate view of your reactor status. The normal GUI of the reactor shows tenths in its display as well.

sandalle commented 10 years ago

The GUI shows hundredths of a percent for RF/t and then only full integers for buffer. I'll try to follow suite for the GUI. Where I've seen this issue most on displaying rounded numbers even when I don't want it is for the reactor control rods. Those only go whole percentages anyways, but the LUA print keeps putting a ".0" after it. Turbine RF/t are in whole numbers, though RPMs are in tenths of an RPM. Max Flow is in full mB/t integers.

sandalle commented 10 years ago

Goals to match in-game Big Reactors:

Viper007Bond commented 10 years ago

I'm talking about the energy buffer percentage, not raw RF value. The energy buffer shows tenths in the normal GUI: https://i.imgur.com/mZpHZYn.png (76.8% in this screenshot)

But your UI rounds that: https://i.imgur.com/CHCoJAa.png (57.0% in this screenshot)

I'm using a passively cooled reactor at the moment and sorry for all the periods in the screenshots. It's the one thing I hate about the Sphax texture pack.

sandalle commented 10 years ago

This is fixed in the master branch and will go out as 0.3.9 Soon(TM). :)

Viper007Bond commented 10 years ago

Cool, thanks!