In the EMC Link, remove empty bucket cost when calculating fluid cost.
loldev69 opened this issue ยท 5 comments
The cost of an empty bucket is usually many times greater than the cost of its contents: for example, by default a lava bucket is worth 832 EMC, that is 768 EMC for the empty bucket and only 64 EMC for the lava.
Because of that, it might be a good idea to tweak getFluidCostPer() by subtracting the cost of the empty bucket from the cost of the filled bucket.
Potential pitfalls: fluids could end up with a value of 0 EMC (like water) or even a negative EMC value, causing math issues later on.
One solution would be to constrain the result of getFluidCostPer() to be greater than 0 , another would be to add checks in both drain() and handleActivation().
I'm looking into doing this in steps, like an efficiency upgrade type thing, where each tier up is more efficient than the last
The numbers I've currently got in mind are:
- 0 (0%)
- 2 (2%)
- 4 (6%)
- 4 (10%)
- 5 (15%)
- 5 (20%)
- 6 (26%)
- 6 (32%)
- 7 (39%)
- 7 (46%)
- 8 (54%)
- 8 (62%)
- 9 (71%)
- 9 (80%)
- 10 (90%)
- 10 (100%)
With that,
- tier 1 = 0% efficiency, 832 emc
- tier 10 = 46% efficiency, ~479 emc
- tier 16 = 100% efficiency, 64 emc
The efficiency only effects the subtraction of the bucket's value