Skip to content

Commit

Permalink
added productivity module support for intermediate recipes
Browse files Browse the repository at this point in the history
only for modules up to 10% productivity
  • Loading branch information
judos committed May 14, 2016
1 parent a1f3c9b commit 00c3655
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/data-final-fixes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ require "prototypes.incinerator-recipes"
require "prototypes.easier-but-more-trains"

require "prototypes.technology-fixes"
require "prototypes.productivity-support"

-- Recipe categories tweaks
addCategorySupportsNew("pulverizer","hc-pulverizer")
addCategorySupportsNew("big-processing-machine","hc-pulverizer")
addCategorySupportsNew("big-processing-machine","hc-pulverizer")
2 changes: 1 addition & 1 deletion source/prototypes/harder-buildings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local recipeWhiteList = table.set({
addItem("scrap-metal","raw-resource","z[scrap-metal]",50)

-- Recipes: --
-- item Name category subgroup time ingredients products order
-- n ame category subgroup time ingredients products order
addRecipe("scrap-metal-processing","hc-pulverizer","raw-resource",8,{{"scrap-metal",5}},{{"pulverized-iron",3},{"copper-dust",2}},"z[scrap-metal]")

for recipeName,recipe in pairs(data.raw["recipe"]) do
Expand Down
27 changes: 27 additions & 0 deletions source/prototypes/productivity-support.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
local resourceRecipes = {
"crushed-iron",
"crushed-iron-big",
"pulverized-iron",
"pulverized-iron-big",

"copper-dust",
"copper-dust-big",
"copper-sulfat",
"copper-plate|sulfat",

"steel-dust",
"steel-dust|2",
"coal-dust",
"gravel-pile",
"gravel"
}

for _, module in pairs(data.raw.module) do
if module.limitation and module.effect and module.effect.productivity then
if module.effect.productivity.bonus <= 0.101 then
for _, resources in pairs(resourceRecipes) do
table.insert(module.limitation, resources)
end
end
end
end

0 comments on commit 00c3655

Please sign in to comment.