Currently all minetest_game PR's are failing travis since the
upstream luacheck now also warns about whitespace issues, and
there are a few of those in the code. This fixes all of them
so we can yet again rely on luacheck.
Indicate in the infotext when a furnace has filled up `dst` but still
has fuel. The info text shows the item as 100% with added "(output
full)" text, indicating that while it can cook the item, there is no
place for it in the `dst`. Emptying the `dst` should make the item
cook immediately and furnace resume normal operation.
* Unused variables
* Unused values (assigned to variables, but overwritten before use)
* Defining already defined variables instead of reassigning to them.
Adds a minor helper function that allows efficient retrieval of
several inventories from a node inventory. We use this helper to
quickly retrieve the items in chests, vessel shelves, book shelves
and furnaces, and return these with the nodes itself to the TNT caller.
The TNT caller then performs the entity physics, and we don't need
to do anything else.
We disable TNT doing anything with bones.
We expose a bug in the code that drops the items - metadata was lost
entirely. This patch corrects that by properly copying the metadata
and creating the drops list inclusive metadata.
Node timers are higher precision and a better guarantee
of happening at regular intervals, whereas ABM's may be
postponed, cancelled or missed if a player is too far.
The largest benefit is that once the furnace is done
cooking, no more ABM's are fired - the timer is stopped
instead and no more events are created until items
are put in the furnace.
This patch is larger due to the migration of the timer
function and indentation change as a result of the somewhat
reduced complexity. I've tested with several furnaces and
this works correctly and behavior is not affected, although
people may find that their furnaces now work more
regularly.
If you place several furnaces next to eachother, you will
still find all furnace timers firing exactly at the same
time. This is a bug in core that should not coalesce node
timers at second intervals.
* Move furnace related code into furnace.lua
* Move duplicated code into functions
* Rewrite ABM:
* Easier to follow strcuture (no returns in the middle)
* No unnecessary calls to get_craft_result
* Split logic and "visual feedback" (a bit)
* Fewer calls to meta:set and meta:get
* Better feedback on the current state of the furnace