diff --git a/info.json b/info.json
index e69e8af..2cd71fa 100644
--- a/info.json
+++ b/info.json
@@ -6,5 +6,5 @@
"homepage": "https://mods.factorio.com/mod/Long%20Inserters",
"description": "Adds long fast, filter and stack inserters.",
"factorio_version": "2.0",
- "dependencies": ["? space-age"]
+ "dependencies": ["? space-age", "? stack-inserters"]
}
\ No newline at end of file
diff --git a/prototypes/entities.lua b/prototypes/entities.lua
index be5c9de..d72c12e 100644
--- a/prototypes/entities.lua
+++ b/prototypes/entities.lua
@@ -51,11 +51,8 @@ data:extend({
longbulk
})
-if mods["space-age"] then
- data.raw["inserter"]["long-burner-inserter"].heating_energy = "0kW"
- data.raw["inserter"]["long-fast-inserter"].heating_energy = "50kW"
- data.raw["inserter"]["long-bulk-inserter"].heating_energy = "50kW"
-
+if mods["space-age"] or mods["stack-inserters"] then
+ -- add long-stack-inserter when space-age or stack-inserters is present
local longstack = util.table.deepcopy(data.raw["inserter"]["stack-inserter"])
longstack.name = "long-stack-inserter"
longstack.icon = "Long Inserters/graphics/icons/long-stack-inserter.png"
@@ -71,6 +68,17 @@ if mods["space-age"] then
end
data:extend({longstack})
+
+ -- configure next_upgrade for long-bulk-inserter
+ data.raw["inserter"]["long-bulk-inserter"].next_upgrade = "long-stack-inserter"
+end
+
+if mods["space-age"] then
+ -- update heating_energy for long inserters in space-age
+ data.raw["inserter"]["long-burner-inserter"].heating_energy = "0kW"
+ data.raw["inserter"]["long-fast-inserter"].heating_energy = "50kW"
+ data.raw["inserter"]["long-bulk-inserter"].heating_energy = "50kW"
+ data.raw["inserter"]["long-stack-inserter"].heating_energy = "50kW"
end
data.raw["inserter"]["long-handed-inserter"].next_upgrade = "long-fast-inserter"
\ No newline at end of file
diff --git a/prototypes/items.lua b/prototypes/items.lua
index ca623d0..4655d14 100644
--- a/prototypes/items.lua
+++ b/prototypes/items.lua
@@ -45,7 +45,7 @@ data:extend({
}
})
-if mods["space-age"] then
+if mods["space-age"] or mods["stack-inserters"] then
data:extend({
{
type = "item",
@@ -59,7 +59,7 @@ if mods["space-age"] then
drop_sound = item_sounds.wire_inventory_move,
place_result = "long-stack-inserter",
stack_size = 50,
- default_import_location = "gleba",
+ default_import_location = mods["space-age"] and "gleba" or "nauvis",
weight = 20*kg
}
})
diff --git a/prototypes/recipes.lua b/prototypes/recipes.lua
index 7820852..6d9dfdf 100644
--- a/prototypes/recipes.lua
+++ b/prototypes/recipes.lua
@@ -40,7 +40,7 @@ data:extend({
}
})
-if mods["space-age"] then
+if mods["space-age"] or mods["stack-inserters"] then
data:extend({
{
type = "recipe",
diff --git a/prototypes/technology.lua b/prototypes/technology.lua
index 8ca050c..345dba6 100644
--- a/prototypes/technology.lua
+++ b/prototypes/technology.lua
@@ -7,7 +7,7 @@ end
if data.raw["technology"]["bulk-inserter"] and data.raw["technology"]["bulk-inserter"].effects then
table.insert(data.raw["technology"]["bulk-inserter"].effects,{type = "unlock-recipe",recipe = "long-bulk-inserter"})
end
-if mods["space-age"] then
+if mods["space-age"] or mods["stack-inserters"] then
if data.raw["technology"]["stack-inserter"] and data.raw["technology"]["stack-inserter"].effects then
table.insert(data.raw["technology"]["stack-inserter"].effects,{type = "unlock-recipe",recipe = "long-stack-inserter"})
end