Skip to content

Commit

Permalink
Fix for missing check in compatibility scripts (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico committed Jul 29, 2021
1 parent 51a855e commit fbe281d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 17 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---------------------------------------------------------------------------------------------------
Version: 0.2.2
Bugfixes:
- Fix for missing check in compatibility scripts (https://github.com/nicolas-lang/Factorio.LongWarehouses/issues/1)
---------------------------------------------------------------------------------------------------
Version: 0.2.1
Major Features:
- Complete refactoring
Expand Down
20 changes: 12 additions & 8 deletions data/compatibility/aai-containers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ if mods["aai-containers"] then
whTech.unit.ingredients = data_util.getResearchUnitIngredients("aai-storehouse-base")
whTech.unit.count = data_util.getResearchUnitCount("aai-storehouse-base")*2
--
local whTechLogistic1 = data.raw["technology"]["nco-LongWarehousesLogistics1"]
table.insert(whTechLogistic1.prerequisites,"aai-storehouse-storage")
whTechLogistic1.unit.ingredients = data_util.getResearchUnitIngredients("aai-storehouse-storage")
whTechLogistic1.unit.count = data_util.getResearchUnitCount("aai-storehouse-storage")*2
if settings.startup["wh-enable-logistic"].value then
local whTechLogistic1 = data.raw["technology"]["nco-LongWarehousesLogistics1"]
table.insert(whTechLogistic1.prerequisites,"aai-storehouse-storage")
whTechLogistic1.unit.ingredients = data_util.getResearchUnitIngredients("aai-storehouse-storage")
whTechLogistic1.unit.count = data_util.getResearchUnitCount("aai-storehouse-storage")*2
end
--
local whTechLogistic2 = data.raw["technology"]["nco-LongWarehousesLogistics2"]
table.insert(whTechLogistic2.prerequisites,"aai-storehouse-logistic")
whTechLogistic2.unit.ingredients = data_util.getResearchUnitIngredients("aai-storehouse-logistic")
whTechLogistic2.unit.count = data_util.getResearchUnitCount("aai-storehouse-logistic")*2
if settings.startup["wh-enable-advanced-logistic"].value then
local whTechLogistic2 = data.raw["technology"]["nco-LongWarehousesLogistics2"]
table.insert(whTechLogistic2.prerequisites,"aai-storehouse-logistic")
whTechLogistic2.unit.ingredients = data_util.getResearchUnitIngredients("aai-storehouse-logistic")
whTechLogistic2.unit.count = data_util.getResearchUnitCount("aai-storehouse-logistic")*2
end
end
20 changes: 12 additions & 8 deletions data/compatibility/k2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ if mods["Krastorio2"] then
whTech.unit.ingredients = data_util.getResearchUnitIngredients("kr-containers")
whTech.unit.count = data_util.getResearchUnitCount("kr-containers")*2
--
local whTechLogistic1 = data.raw["technology"]["nco-LongWarehousesLogistics1"]
table.insert(whTechLogistic1.prerequisites,"kr-logistic-containers-1")
whTechLogistic1.unit.ingredients = data_util.getResearchUnitIngredients("kr-logistic-containers-1")
whTechLogistic1.unit.count = data_util.getResearchUnitCount("kr-logistic-containers-1")*2
if settings.startup["wh-enable-logistic"].value then
local whTechLogistic1 = data.raw["technology"]["nco-LongWarehousesLogistics1"]
table.insert(whTechLogistic1.prerequisites,"kr-logistic-containers-1")
whTechLogistic1.unit.ingredients = data_util.getResearchUnitIngredients("kr-logistic-containers-1")
whTechLogistic1.unit.count = data_util.getResearchUnitCount("kr-logistic-containers-1")*2
end
--
local whTechLogistic2 = data.raw["technology"]["nco-LongWarehousesLogistics2"]
table.insert(whTechLogistic2.prerequisites,"kr-logistic-containers-2")
whTechLogistic2.unit.ingredients = data_util.getResearchUnitIngredients("kr-logistic-containers-2")
whTechLogistic2.unit.count = data_util.getResearchUnitCount("kr-logistic-containers-2")*2
if settings.startup["wh-enable-advanced-logistic"].value then
local whTechLogistic2 = data.raw["technology"]["nco-LongWarehousesLogistics2"]
table.insert(whTechLogistic2.prerequisites,"kr-logistic-containers-2")
whTechLogistic2.unit.ingredients = data_util.getResearchUnitIngredients("kr-logistic-containers-2")
whTechLogistic2.unit.count = data_util.getResearchUnitCount("kr-logistic-containers-2")*2
end
end
end
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nco-LongWarehouses",
"version": "0.2.1",
"version": "0.2.2",
"title": "Long Warehouses",
"author": "Karoschl",
"contact": "",
Expand Down

0 comments on commit fbe281d

Please sign in to comment.