mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-14 06:20:41 +01:00
add check for missing machine inventory
This commit is contained in:
parent
4e0f81c4a0
commit
16add2ba9f
|
@ -105,7 +105,7 @@ function technic.register_base_machine(data)
|
|||
meta:set_int("src_time", meta:get_int("src_time") + round(data.speed*10))
|
||||
end
|
||||
while true do
|
||||
local result = technic.get_recipe(typename, inv:get_list("src"))
|
||||
local result = inv:get_list("src") and technic.get_recipe(typename, inv:get_list("src"))
|
||||
if not result then
|
||||
technic.swap_node(pos, machine_node)
|
||||
meta:set_string("infotext", S("%s Idle"):format(machine_desc_tier))
|
||||
|
|
Loading…
Reference in New Issue
Block a user