ExtraCells / ExtraCells2

ExtraCells 2
MIT License
136 stars 115 forks source link

fluid cells: reconcile storage math with AE2, other changes #629

Closed bzy-xyz closed 5 years ago

bzy-xyz commented 5 years ago

Fixes #628.

Current implementation of fluid cells uses a hardcoded 250/byte ratio, which in general may not correspond with the actual itemsPerByte for the rest of AE2. Additionally, bytes per type are ignored.

This change pulls the actual itemsPerByte from the underlying AE2 channel type, and makes types consume bytes at the same ratio as in AE2.

As a side effect, some misuse of "bytes" as "items" was corrected for fluid cells (reconciling these with the AE2 behaviour) to avoid an integer overflow. Additionally, some changes are made to gas cells to avoid UI confusion, but the underlying mechanics of these cells are untouched as they are outside scope for the issue being addressed.

ruifung commented 5 years ago

@BrockWS Could you give this a look over? It looks fine to me but I can't test this at the moment.