Skip to content

Commit

Permalink
0.3.12
Browse files Browse the repository at this point in the history
- fixed null reference for recipe.ingredients #2
  • Loading branch information
0ptera authored Jan 25, 2018
1 parent 6ecca2e commit ab65b9a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.3.12
Date: 25.1.2018
Bugfixes:
- fixed null reference for recipe.ingredients #2
---------------------------------------------------------------------------------------------------
Version: 0.3.11
Date: 25.1.2018
Bugfixes:
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ReStack",
"version": "0.3.11",
"version": "0.3.12",
"title": "ReStack",
"author": "Optera",
"contact": "https://forums.factorio.com/memberlist.php?mode=viewprofile&u=21729",
Expand Down
6 changes: 4 additions & 2 deletions modules/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ end

function SelectItemsByRecipeInput(recipe, stack_size, category)
if recipe.ingredients then
for _, ingredient in pairs(recipe.ingredients) do
ReStack_Items[ingredient[1]] = {stack_size = stack_size, type = category}
for n, ingredient in pairs(recipe.ingredients) do
if ingredient[1] then
ReStack_Items[ingredient[1]] = {stack_size = stack_size, type = category}
end
end
end
end

0 comments on commit ab65b9a

Please sign in to comment.