This commit is contained in:
The4codeblocks 2024-04-21 12:33:09 -06:00 committed by GitHub
commit 0e14272c1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 7 deletions

View File

@ -160,16 +160,14 @@ function circular_saw:update_inventory(pos, amount)
return
end
-- Determine the kind of stairs from either the normal block or micro block.
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
-- Any microblocks not taken out yet are now lost.
-- (covers material loss in the machine)
self:reset(pos)
return
node_name = inv:get_stack("micro", 1):get_name():gsub(":micro_", ":") or ""
else
node_name = stack:get_name() or ""
end
local node_name = stack:get_name() or ""
local node_def = stack:get_definition()
local name_parts = circular_saw.known_nodes[node_name] or ""
local modname = name_parts[1] or ""