-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata-updates.lua
106 lines (100 loc) · 5.69 KB
/
data-updates.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
--going to be removed
if mods["Krastorio2"] and settings.startup["IF-kr-Infinite-Fuel"].value == true then
data.raw.item["kr-Infinite-Fuel"].fuel_category = "vehicle-fuel"
--data.raw.recipe["kr-Infinite-Fuel"].hidden = false
--table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "kr-Infinite-Fuel"} )
end
if settings.startup["IF-kr-Infinite-Fuel"].value == false then
--data.raw.item["kr-Infinite-Fuel"].fuel_category = "nothing"
end
if settings.startup["IF-enable-on-nuclear-reactor"].value == true then
data.raw.item["Reactor-Infinite-Fuel"].fuel_category = "nuclear"
--data.raw.recipe["Reactor-Infinite-Fuel"].hidden = false
--table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Reactor-Infinite-Fuel"} )
end
if settings.startup["IF-enable-on-nuclear-reactor"].value == false then
--data.raw.item["Reactor-Infinite-Fuel"].fuel_category = "nothing"
end
--going to be removed end
local IFFD = settings.startup["IF-fuel-disabler"].value
local IFFD2 = {}
if IFFD == "tier 1" then
IFFD2 = 1
elseif IFFD == "tier 2" then
IFFD2 = 2
elseif IFFD == "tier 3" then
IFFD2 = 3
else
IFFD2 = 0
end
if IFFD2 >= 1 then
data.raw["recipe"]["Infinite-Fuel"].hidden = false
data.raw["technology"]["Infinite-Power"].hidden = false
table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Infinite-Fuel"} )
if IFFD2 >= 2 then
data.raw["recipe"]["Boosted-Infinite-Fuel"].hidden = false
table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Boosted-Infinite-Fuel"} )
if IFFD2 >= 3 then
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].hidden = false
table.insert(data.raw["technology"]["Infinite-Power"].effects, {type = "unlock-recipe",recipe = "Ultra-Boosted-Infinite-Fuel"} )
end
end
end
--Fuel Balancer
local recipebalancing = settings.startup["IF-fuel-recipebalancer"].value
if recipebalancing == "easy" then
elseif recipebalancing == "normal" then
data.raw["recipe"]["Infinite-Fuel"].ingredients = {{"nuclear-fuel", 10}}
data.raw["recipe"]["Boosted-Infinite-Fuel"].ingredients = {{"Infinite-Fuel", 10}}
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].ingredients = {{"Boosted-Infinite-Fuel", 10}}
data.raw["recipe"]["Infinite-Fuel"].energy_required = 750
data.raw["recipe"]["Boosted-Infinite-Fuel"].energy_required = 1500
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].energy_required = 3000
elseif recipebalancing == "hard" then
data.raw["recipe"]["Infinite-Fuel"].ingredients = {{"nuclear-fuel", 20}, {"rocket-fuel", 10}}
data.raw["recipe"]["Boosted-Infinite-Fuel"].ingredients = {{"Infinite-Fuel", 20}, {"rocket-fuel", 10}}
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].ingredients = {{"Boosted-Infinite-Fuel", 20}, {"rocket-fuel", 10}}
data.raw["recipe"]["Infinite-Fuel"].energy_required = 1250
data.raw["recipe"]["Boosted-Infinite-Fuel"].energy_required = 2500
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].energy_required = 5000
elseif recipebalancing == "extreme" then
data.raw["recipe"]["Infinite-Fuel"].ingredients = {{"nuclear-fuel", 40}, {"rocket-fuel", 20}, {"low-density-structure", 5}, {"processing-unit", 5}}
data.raw["recipe"]["Boosted-Infinite-Fuel"].ingredients = {{"Infinite-Fuel", 40}, {"rocket-fuel", 20}, {"low-density-structure", 5}, {"processing-unit", 5}}
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].ingredients = {{"Boosted-Infinite-Fuel", 40}, {"rocket-fuel", 20}, {"low-density-structure", 5}, {"processing-unit", 5}}
data.raw["recipe"]["Infinite-Fuel"].energy_required = 2500
data.raw["recipe"]["Boosted-Infinite-Fuel"].energy_required = 5000
data.raw["recipe"]["Ultra-Boosted-Infinite-Fuel"].energy_required = 10000
else
end
local bonusbalancing = settings.startup["IF-fuel-bonusbalancer"].value
if bonusbalancing == "easy" then
elseif bonusbalancing == "normal" then
data.raw["item"]["Infinite-Fuel"].fuel_acceleration_multiplier = 2.5
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 5
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 10
data.raw["item"]["Infinite-Fuel"].fuel_top_speed_multiplier = 4.5
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 6
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 9.5
elseif bonusbalancing == "hard" then
data.raw["item"]["Infinite-Fuel"].fuel_acceleration_multiplier = 2
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 4
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 8
data.raw["item"]["Infinite-Fuel"].fuel_top_speed_multiplier = 4
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 5
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 6
elseif bonusbalancing == "extreme" then
data.raw["item"]["Infinite-Fuel"].fuel_acceleration_multiplier = 1.5
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 2
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_acceleration_multiplier = 2.5
data.raw["item"]["Infinite-Fuel"].fuel_top_speed_multiplier = 3
data.raw["item"]["Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 3.5
data.raw["item"]["Ultra-Boosted-Infinite-Fuel"].fuel_top_speed_multiplier = 4
else
end
local technologybalancing = settings.startup["IF-fuel-technologybalancer"].value
if technologybalancing == "easy" then
data.raw["technology"]["Infinite-Power"].prerequisites = {"oil-processing"}
data.raw["technology"]["Infinite-Power"].ingredients = {{"automation-science-pack", 1}, {"logistic-science-pack", 1}, {"chemical-science-pack", 1}}
elseif technologybalancing == "normal" then
else
end