forked from UberWaffe/ScienceCostTweaker
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
angels productivity fix should work without boblibray now
- Loading branch information
Showing
1 changed file
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
if mods["boblibrary"] then | ||
local science_packs_and_intermediates = | ||
{ | ||
"automation-science-pack", | ||
"logistic-science-pack", | ||
"chemical-science-pack", | ||
"military-science-pack", | ||
"production-science-pack", | ||
"utility-science-pack", | ||
"advanced-logistic-science-pack", | ||
"alien-science-pack", | ||
"science-pack-gold", | ||
"omni-pack", | ||
} | ||
local science_packs_and_intermediates = | ||
{ | ||
"automation-science-pack", | ||
"logistic-science-pack", | ||
"chemical-science-pack", | ||
"military-science-pack", | ||
"production-science-pack", | ||
"utility-science-pack", | ||
"advanced-logistic-science-pack", | ||
"alien-science-pack", | ||
"science-pack-gold", | ||
"omni-pack", | ||
} | ||
|
||
local finallist = {} | ||
local finallist = {} | ||
|
||
-- Go through all the recipes defined in the science pack and intermidate list. | ||
-- For any of them that exist, add them to the final list of things to limit. | ||
for j, recipeName in pairs(science_packs_and_intermediates) do | ||
if data.raw.recipe[recipeName] then | ||
table.insert(finallist, recipeName) | ||
end | ||
end | ||
if mods["angelsrefining"] then | ||
for _, recipe_name in pairs(finallist) do | ||
angelsmods.functions.allow_productivity(recipe_name) | ||
end | ||
else | ||
bobmods.lib.module.add_productivity_limitations(finallist) | ||
-- Go through all the recipes defined in the science pack and intermidate list. | ||
-- For any of them that exist, add them to the final list of things to limit. | ||
for j, recipeName in pairs(science_packs_and_intermediates) do | ||
if data.raw.recipe[recipeName] then | ||
table.insert(finallist, recipeName) | ||
end | ||
end | ||
|
||
-- if angelsmod with productivity limit function exists, add it to list | ||
if mods["angelsrefining"] and angelsmods and angelsmods.functions and angelsmods.functions.allow_productivity then | ||
-- sctm.log("angelprodlimit") | ||
angelsmods.functions.allow_productivity(finallist) | ||
-- if bobsmod with productivity limit function exists, add it to list | ||
elseif mods["boblibrary"] and bobmods and bobmods.lib and bobmods.lib.module and bobmods.lib.module.add_productivity_limitations then | ||
-- sctm.log("bobprodlimit") | ||
bobmods.lib.module.add_productivity_limitations(finallist) | ||
end |