Skip to content

Commit

Permalink
add check for missing machine inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames committed Apr 13, 2020
1 parent 4e0f81c commit 16add2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion technic/machines/register/machine_base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 16add2b

Please sign in to comment.