-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathlead-recipe-se.lua
176 lines (170 loc) · 5.74 KB
/
lead-recipe-se.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
-- Additional recipes if Space Exploration mod is enabled
local util = require("data-util");
if mods["space-exploration"] then
se_delivery_cannon_recipes[util.me.lead_ore] = {name= util.me.lead_ore}
se_delivery_cannon_recipes[util.me.lead_plate] = {name= util.me.lead_plate}
util.se_landfill({ore="lead-ore"})
if string.sub(mods["space-exploration"], 1, 3) == "0.6" then
util.se_matter({ore="lead-ore", energy_required=1, quant_out=10, stream_out=60})
data:extend({
{
type = "item-subgroup",
name = "lead",
group = "resources",
order = "a-h-z-a",
}
})
util.set_item_subgroup("lead-plate", "lead")
data:extend({
{
type = "item",
name = "lead-ingot",
icons = {{icon = "__bzlead__/graphics/icons/lead-ingot.png", icon_size = 128}},
order = "b-b",
stack_size = 50,
subgroup = "lead",
},
{
type = "fluid",
name = "molten-lead",
default_temperature = 600,
max_temperature = 600,
base_color = {r=121, g=80, b=80},
flow_color = {r=121, g=80, b=80},
icons = {{icon = "__bzlead__/graphics/icons/molten-lead.png", icon_size = 128}},
order = "a[molten]-a",
pressure_to_speed_ratio = 0.4,
flow_to_energy_ratio = 0.59,
auto_barrel = false,
subgroup = "fluid",
},
{
type = "recipe",
category = "smelting",
name = "molten-lead",
main_product = "molten-lead",
subgroup = "lead",
results = {
{type = "fluid", name = "molten-lead", amount = mods.Krastorio2 and 750 or 900},
},
energy_required = 60,
ingredients = {
{name = mods.Krastorio2 and "enriched-lead" or "lead-ore", amount = 24},
{type = "fluid", name = "se-pyroflux", amount = 10},
},
enabled = false,
always_show_made_in = true,
allow_as_intermediate = false,
order = "a-a"
},
{
type = "recipe",
name = "lead-ingot",
category = "casting",
results = {{"lead-ingot", 1}},
energy_required = 25,
ingredients = {
{type = "fluid", name = "molten-lead", amount = 250},
},
enabled = false,
always_show_made_in = true,
allow_as_intermediate = false,
},
{
type = "recipe",
category = "crafting",
name = "lead-ingot-to-plate",
icons = {
{icon = "__bzlead__/graphics/icons/lead-plate.png", icon_size = 64, icon_mipmaps = 3},
{icon = "__bzlead__/graphics/icons/lead-ingot.png", icon_size = 128, scale = 0.125, shift = {-8, -8}},
},
results = {
{name = "lead-plate", amount = 10},
},
energy_required = 5,
ingredients = {
{name = "lead-ingot", amount = 1}
},
enabled = false,
always_show_made_in = true,
allow_decomposition = false,
order = "a-c-b"
},
})
util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "molten-lead"})
util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "lead-ingot"})
util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "lead-ingot-to-plate"})
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "molten-lead"})
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "lead-ingot"})
util.add_effect("se-vulcanite-smelting", {type = "unlock-recipe", recipe= "lead-ingot-to-plate"})
if mods["Krastorio2"] then
util.set_item_subgroup("enriched-lead", "lead")
data.raw.recipe["enriched-lead-plate"].order= "d[lead-plate]"
se_delivery_cannon_recipes["enriched-lead"] = {name= "enriched-lead"}
else
if util.me.byproduct() then util.add_product("molten-lead", {"copper-ore", 6}) end
end
se_delivery_cannon_recipes["lead-ingot"] = {name="lead-ingot"}
else
data.raw.item["lead-plate"].subgroup = "plates"
if mods["Krastorio2"] then
data:extend({
{
type = "recipe",
name = "enriched-lead-smelting-vulcanite",
category = "smelting",
order = "d[lead-plate]",
energy_required = 24,
enabled = false,
always_show_made_in = true,
allow_as_intermediate = false,
ingredients = {
{name = "enriched-lead", amount = 8},
{name = "se-vulcanite-block", amount = 1},
},
results = {
{name = util.me.lead_plate, amount = 12},
},
icons =
{
{ icon = "__bzlead__/graphics/icons/lead-plate.png", icon_size = 64 },
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, scale=0.25, shift= {-10, -10}},
},
},
})
table.insert(data.raw.technology["se-processing-vulcanite"].effects,
{type = "unlock-recipe", recipe= "enriched-lead-smelting-vulcanite"})
data.raw.recipe["enriched-lead-plate"].order= "d[lead-plate]"
se_delivery_cannon_recipes["enriched-lead"] = {name= "enriched-lead"}
else
data:extend({
{
type = "recipe",
name = "lead-smelting-vulcanite",
category = "smelting",
subgroup = "plates",
order = "d[lead-plate]",
energy_required = 24,
enabled = false,
always_show_made_in = true,
allow_as_intermediate = false,
ingredients = {
{name = "lead-ore", amount = 8},
{name = "se-vulcanite-block", amount = 1},
},
results = {
{name = util.me.lead_plate, amount = util.me.byproduct() and 10 or 12},
},
icons =
{
{ icon = "__bzlead__/graphics/icons/lead-plate.png", icon_size = 64, icon_mipmaps = 3 },
{ icon = "__space-exploration-graphics__/graphics/icons/vulcanite-block.png", icon_size = 64, icon_mipmaps = 3, scale=0.25, shift= {-10, -10}},
},
},
})
if util.me.byproduct() then util.add_product("lead-smelting-vulcanite", {"copper-ore", 2}) end
table.insert(data.raw.technology["se-processing-vulcanite"].effects,
{type = "unlock-recipe", recipe= "lead-smelting-vulcanite"})
end
end
end