mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-03-20 19:20:25 +01:00
Conserve left-over microblocks. (RE-DONE)
Commits originally from @fozolo .
This commit is contained in:
parent
d70ac4b289
commit
be59464bef
@ -161,15 +161,12 @@ function circular_saw:update_inventory(pos, amount)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local stack = inv:get_stack("input", 1)
|
local stack = inv:get_stack("input", 1)
|
||||||
-- At least one "normal" block is necessary to see what kind of stairs are requested.
|
local node_name = ""
|
||||||
if stack:is_empty() then
|
if stack:is_empty() then
|
||||||
-- Any microblocks not taken out yet are now lost.
|
node_name = inv:get_stack("micro", 1):get_name():gsub(":micro_", ":") or ""
|
||||||
-- (covers material loss in the machine)
|
else
|
||||||
self:reset(pos)
|
node_name = stack:get_name() or ""
|
||||||
return
|
|
||||||
|
|
||||||
end
|
end
|
||||||
local node_name = stack:get_name() or ""
|
|
||||||
local node_def = stack:get_definition()
|
local node_def = stack:get_definition()
|
||||||
local name_parts = circular_saw.known_nodes[node_name] or ""
|
local name_parts = circular_saw.known_nodes[node_name] or ""
|
||||||
local modname = name_parts[1] or ""
|
local modname = name_parts[1] or ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user