minetest-mods / moreblocks

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

"Conserve left-over microblocks." (RE-PUBLISHED) #197

Open The4codeblocks opened 1 year ago

The4codeblocks commented 1 year 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.

Commits originally from @fozolo.

The4codeblocks commented 1 year ago

NOTE: THESE COMMITS ARE TAKEN FROM https://github.com/minetest-mods/moreblocks/pull/108. I ONLY RE-PUBLISHED IT TO MAKE IT COMPATIBLE WITH THE CURRENT VERSION.

FULL CREDIT GOES TO @fozolo.

The4codeblocks commented 1 year ago

Certain warning. image Oh well. That "unused value" is actually an initialization empty string. Is it ok to just make it local node_name?

Calinou commented 1 year ago

Is it ok to just make it local node_name?

Sure, but I'm surprised luacheck even complains about it in the first place.

The4codeblocks commented 1 year ago

oof image

The4codeblocks commented 1 year ago

With current code, I'd expect error() to be called, but it isn't. image image Maybe that's the issue.