mirror of
https://github.com/minetest-mods/technic.git
synced 2025-02-23 07:10:19 +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))
|
meta:set_int("src_time", meta:get_int("src_time") + round(data.speed*10))
|
||||||
end
|
end
|
||||||
while true do
|
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
|
if not result then
|
||||||
technic.swap_node(pos, machine_node)
|
technic.swap_node(pos, machine_node)
|
||||||
meta:set_string("infotext", S("%s Idle"):format(machine_desc_tier))
|
meta:set_string("infotext", S("%s Idle"):format(machine_desc_tier))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user