diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-12-01 04:22:40 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-12-01 04:22:40 -0500 |
commit | 2922421f4a88e56a0a1c819f62bf2bc287835388 (patch) | |
tree | b6dafb3d00ef05778e456716c03544279c2978fa /unified_inventory/api.lua | |
parent | 67d414d2f9aa5999e3f1755543a68455b4bb6d99 (diff) | |
download | dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.gz dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.bz2 dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.tar.xz dreambuilder_modpack-2922421f4a88e56a0a1c819f62bf2bc287835388.zip |
Update several mods:
biome_lib, boost_cart, building_blocks, castle, homedecor, glooptest,
currency, roads, invsaw, maptools, mesecons, moreblocks, nixie_tubes,
pipeworks, signs_lib, technic, unified_inventory, unifiedbricks, worldedit,
xban2
Diffstat (limited to 'unified_inventory/api.lua')
-rw-r--r-- | unified_inventory/api.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua index 936ee72..e1b980a 100644 --- a/unified_inventory/api.lua +++ b/unified_inventory/api.lua @@ -82,9 +82,11 @@ minetest.after(0.01, function() -- appears after a “maybe” local max_start = true -- Let's iterate through the items madness! - for i=1,#def.drop.items do + -- Handle invalid drop entries gracefully. + local drop_items = def.drop.items or { } + for i=1,#drop_items do if max_items_left ~= nil and max_items_left <= 0 then break end - local itit = def.drop.items[i] + local itit = drop_items[i] for j=1,#itit.items do local dstack = ItemStack(itit.items[j]) if not dstack:is_empty() and dstack:get_name() ~= name then @@ -133,7 +135,7 @@ minetest.after(0.01, function() for _, recipes in pairs(unified_inventory.crafts_for.recipe) do for _, recipe in ipairs(recipes) do local ingredient_items = {} - for _, spec in ipairs(recipe.items) do + for _, spec in pairs(recipe.items) do local matches_spec = unified_inventory.canonical_item_spec_matcher(spec) for _, name in ipairs(unified_inventory.items_list) do if matches_spec(name) then |