minetest-mods / moreblocks

More Blocks
https://content.minetest.net/packages/Calinou/moreblocks/
zlib License
45 stars 67 forks source link

Conserve left-over microblocks. #108

Open fozolo opened 6 years ago

fozolo commented 6 years ago

This commit conserves the microblocks so that they are never lost. Previously, any left-over microblocks were destroyed if the input box was manually emptied or if anything was taken from the output while the input box is empty.

fozolo commented 6 years ago

A code comment noted that this "covers material loss in the machine". However, this loss is applied inconsistently. For example, a player could add a single block to the input box and take out one microblock leaving 7 leftover. Then taking out one more microblock causes the remaining 6 leftover to be destroyed. Alternatively, the player could take out 8 microblocks at once. In the first scenario the player experiences 75% waste, while in the second scenario there is 0% waste.

Panquesito7 commented 5 years ago

I don't know if it was a bug created by other mods or something alike, but it was just creating unknown items on the circular saw (that is what I remember). Used MT/MTG 0.4.17.1.

SmallJoker commented 4 years ago

Needs rebase and review from @Calinou

The4codeblocks commented 1 year ago

I read the code and the changes feel intuitive.

The4codeblocks commented 1 year ago

I checked it and..... Events.