Skip to content

Commit 02ae49a

Browse files
author
notnotmelon
committed
compat: Added compatiblity and custom recipes with pyanodons.
1 parent b1e7441 commit 02ae49a

3 files changed

Lines changed: 82 additions & 0 deletions

File tree

compat/pyanodon.lua

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
if not mods["pyalienlife"] then return end
2+
if not mods["pyhightech"] then return end
3+
4+
data.raw.technology["factory-connection-type-circuit"].prerequisites = {
5+
"factory-architecture-t1",
6+
"advanced-combinators",
7+
}
8+
data.raw.technology["factory-connection-type-circuit"].unit.ingredients = {
9+
{"py-science-pack-1", 1},
10+
}
11+
12+
data.raw.technology["factory-architecture-t2"].unit.ingredients = {
13+
{"py-science-pack-1", 1},
14+
}
15+
16+
data.raw.technology["factory-interior-upgrade-display"].prerequisites = {
17+
"factory-architecture-t1"
18+
}
19+
data.raw.technology["factory-interior-upgrade-display"].unit.ingredients = {
20+
{"automation-science-pack", 1},
21+
}
22+
23+
table.insert(
24+
data.raw.technology["factory-connection-type-heat"].prerequisites,
25+
"uranium-processing"
26+
)
27+
data.raw.technology["factory-connection-type-heat"].unit.ingredients = {
28+
{"chemical-science-pack", 1},
29+
}
30+
31+
data.raw.technology["factory-connection-type-chest"].unit.ingredients = {
32+
{"py-science-pack-2", 1},
33+
}
34+
35+
data.raw.recipe["factory-1"].ingredients = {
36+
{type = "item", name = "concrete", amount = 500},
37+
{type = "item", name = "steel-plate", amount = 100},
38+
{type = "item", name = "tinned-cable", amount = 100},
39+
{type = "item", name = "treated-wood", amount = 100},
40+
}
41+
42+
data.raw.recipe["factory-2"].ingredients = {
43+
{type = "item", name = "factory-1", amount = 1},
44+
{type = "item", name = "py-asphalt", amount = 300},
45+
{type = "item", name = "concrete-wall", amount = 100},
46+
{type = "item", name = "fiberboard", amount = 100},
47+
{type = "item", name = "bolts", amount = 500},
48+
{type = "item", name = "tinned-cable", amount = 100},
49+
}
50+
51+
data.raw.recipe["factory-3"].ingredients = {
52+
{type = "item", name = "factory-2", amount = 1},
53+
{type = "item", name = "super-steel", amount = 500},
54+
{type = "item", name = "super-alloy", amount = 500},
55+
{type = "item", name = mods.pyalternativeenergy and "heating-system" or "simik", amount = 1},
56+
{type = "item", name = "tinned-cable", amount = 100},
57+
{type = "item", name = "nexelit-substation", amount = 2},
58+
{type = "item", name = "fiberglass", amount = 200},
59+
}

data-final-fixes.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,25 @@ require "compat.efficient-smelting"
22
require "compat.gregtorio"
33

44
data.raw.item["factory-hidden-construction-robot"].stack_size = 1000
5+
6+
-- Auto-rebalance the roboport upgrade tech such that it costs the same packs as the construction-robotics tech.
7+
local construction_robotics = data.raw.technology["construction-robotics"]
8+
local roboport_upgrade = data.raw.technology["factory-interior-upgrade-roboport"]
9+
local architecture_2 = data.raw.technology["factory-architecture-t2"]
10+
if construction_robotics and roboport_upgrade and architecture_2 then
11+
local construction_robotics = construction_robotics.unit
12+
local roboport_upgrade = roboport_upgrade.unit
13+
local architecture_2 = architecture_2.unit
14+
if construction_robotics and roboport_upgrade and architecture_2 then
15+
roboport_upgrade.count = math.max(construction_robotics.count or 0, architecture_2.count or 0) + 15
16+
roboport_upgrade.time = math.max(construction_robotics.time or 0, architecture_2.time or 0) + 15
17+
local ingredients = {}
18+
for _, tech in pairs{construction_robotics, architecture_2} do
19+
for _, ingredient in pairs(tech.ingredients) do
20+
ingredients[#ingredients+1] = ingredient
21+
end
22+
end
23+
ingredients = table.dedupe(ingredients)
24+
roboport_upgrade.ingredients = ingredients
25+
end
26+
end

data-updates.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ require "prototypes.ceiling"
33
require "prototypes.factory-pumps"
44
require "prototypes.quality-tooltips"
55
require "script.roboport.utility-constants"
6+
require "compat.pyanodon"
67

78
local F = "__factorissimo-2-notnotmelon__"
89

0 commit comments

Comments
 (0)