forked from pyanodon/pyhightech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data-final-fixes.lua
50 lines (46 loc) · 1.17 KB
/
data-final-fixes.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
require("__stdlib__/stdlib/data/data").Util.create_data_globals()
RECIPE('ball-mill-mk01'):remove_ingredient('py-asphalt'):add_ingredient({type = 'item', name = 'electronic-circuit', amount = 10})
local blackholemods =
{
--{item name, amount of fuel in x*100KJ}
{"soil",1},
{"guar-seeds",2},
{"clay",2},
{"wood",5},
{"limestone",5},
{"lime",5},
{"sand",5},
{"pure-sand",5},
{"coal-dust",5},
}
local defaultfuelcount = 40 -- 100KJ per unit times 30 = 3MJ
--creating all the hidden recipes for each item to be converted to blackhole fuel
for i, item in pairs(data.raw.item) do
local fuelcount = defaultfuelcount
if item.name ~= "blackhole-fuel" then
RECIPE {
type = "recipe",
name = "blackhole-fuel-"..item.name,
category = "blackhole-energy",
energy_required = 0.1,
enabled = true,
ingredients =
{
{item.name, 1}
},
results =
{
{name="blackhole-fuel", amount=fuelcount}
},
main_product = "blackhole-fuel",
hidden = true,
hidden_from_flow_stats = true,
}
end
end
for _,name in pairs(blackholemods) do
--log(name)
if data.raw.item[name] ~= nil then
data.raw.recipe["blackhole-fuel-"..name[1]].results[1].amount=name[2]
end
end