Long Inserters

by GotLag

Adds long fast, filter and stack inserters. Compatible with Space Age.

Content
1 year, 2 months ago
0.15 - 2.0
15.1K
Logistics

g Please add support for "Stack Inserters" Mod

5 days ago

Hey there :)

I am doing a Space Exploration run and a while ago i added "Stack Inserters" Mod (https://mods.factorio.com/mod/stack-inserters), today I wanted to also add this "Long Inserters" Mod and found, that it does only add long stack inserter when space-age is active.

In the next message I will post a patch, that updates this mod to support also "Stack Inserters" Mod without Space Age active. I hope this can/will be integrated in this mod. I would have opened a Pull Request, but I did not found a source repo.

5 days ago

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

New response