mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
Update main.lua
This commit is contained in:
@@ -192,33 +192,33 @@ table.insert(data.raw.technology['compound-energy-2'].effects, {type='unlock-rec
|
|||||||
|
|
||||||
|
|
||||||
for i=1, #recipe_list, 1 do
|
for i=1, #recipe_list, 1 do
|
||||||
if data.raw['recipe'][recipe_list[i]] ~= nil then
|
if data.raw.recipe[recipe_list[i]] ~= nil then
|
||||||
local energy_required
|
local energy_required
|
||||||
local ingredients_1 = {}
|
local ingredients_1 = {}
|
||||||
local ingredients_2 = {}
|
local ingredients_2 = {}
|
||||||
local results_1 = {}
|
local results_1 = {}
|
||||||
local results_2 = {}
|
local results_2 = {}
|
||||||
|
|
||||||
if data.raw['recipe'][recipe_list[i]].energy_required ~= nil then
|
if data.raw.recipe[recipe_list[i]].energy_required ~= nil then
|
||||||
energy_required = data.raw['recipe'][recipe_list[i]].energy_required * 4
|
energy_required = data.raw.recipe[recipe_list[i]].energy_required * 4
|
||||||
else
|
else
|
||||||
energy_required = 2
|
energy_required = 2
|
||||||
end
|
end
|
||||||
|
|
||||||
for k, v in pairs(data.raw['recipe'][recipe_list[i]].ingredients) do
|
for k, v in pairs(data.raw.recipe[recipe_list[i]].ingredients) do
|
||||||
table.insert(ingredients_1, {data.raw['recipe'][recipe_list[i]].ingredients[k], v * 4})
|
table.insert(ingredients_1, {data.raw.recipe[recipe_list[i]].ingredients[k], v * 4})
|
||||||
table.insert(ingredients_2, {data.raw['recipe'][recipe_list[i]].ingredients[k], v * 16})
|
table.insert(ingredients_2, {data.raw.recipe[recipe_list[i]].ingredients[k], v * 16})
|
||||||
end
|
end
|
||||||
|
|
||||||
if data.raw['recipe'][recipe_list[i]].results ~= nil then
|
if data.raw.recipe[recipe_list[i]].results ~= nil then
|
||||||
for k, v in pairs(data.raw['recipe'][recipe_list[i]].results) do
|
for k, v in pairs(data.raw.recipe[recipe_list[i]].results) do
|
||||||
table.insert(results_1, {data.raw['recipe'][recipe_list[i]].results[k], v * 4})
|
table.insert(results_1, {data.raw.recipe[recipe_list[i]].results[k], v * 4})
|
||||||
table.insert(results_2, {data.raw['recipe'][recipe_list[i]].results[k], v * 16})
|
table.insert(results_2, {data.raw.recipe[recipe_list[i]].results[k], v * 16})
|
||||||
end
|
end
|
||||||
|
|
||||||
data:extend({{
|
data:extend({{
|
||||||
type = 'recipe',
|
type = 'recipe',
|
||||||
name = data.raw['recipe'][recipe_list[i]].name .. ' 4x',
|
name = data.raw.recipe[recipe_list[i]].name .. ' 4x',
|
||||||
energy_required = energy_required,
|
energy_required = energy_required,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
ingredients = ingredients_1,
|
ingredients = ingredients_1,
|
||||||
@@ -227,7 +227,7 @@ for i=1, #recipe_list, 1 do
|
|||||||
|
|
||||||
data:extend({{
|
data:extend({{
|
||||||
type = 'recipe',
|
type = 'recipe',
|
||||||
name = data.raw['recipe'][recipe_list[i]].name .. ' 16x',
|
name = data.raw.recipe[recipe_list[i]].name .. ' 16x',
|
||||||
energy_required = energy_required * 4,
|
energy_required = energy_required * 4,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
ingredients = ingredients_2,
|
ingredients = ingredients_2,
|
||||||
@@ -236,22 +236,22 @@ for i=1, #recipe_list, 1 do
|
|||||||
else
|
else
|
||||||
data:extend({{
|
data:extend({{
|
||||||
type = 'recipe',
|
type = 'recipe',
|
||||||
name = data.raw['recipe'][recipe_list[i]].name .. ' 4x',
|
name = data.raw.recipe[recipe_list[i]].name .. ' 4x',
|
||||||
energy_required = energy_required,
|
energy_required = energy_required,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
ingredients = ingredients_1,
|
ingredients = ingredients_1,
|
||||||
result = data.raw['recipe'][recipe_list[i]].result,
|
result = data.raw.recipe[recipe_list[i]].result,
|
||||||
result_count = data.raw['recipe'][recipe_list[i]].result_count * 4
|
result_count = data.raw.recipe[recipe_list[i]].result_count * 4
|
||||||
}})
|
}})
|
||||||
|
|
||||||
data:extend({{
|
data:extend({{
|
||||||
type = 'recipe',
|
type = 'recipe',
|
||||||
name = data.raw['recipe'][recipe_list[i]].name .. ' 16x',
|
name = data.raw.recipe[recipe_list[i]].name .. ' 16x',
|
||||||
energy_required = energy_required * 4,
|
energy_required = energy_required * 4,
|
||||||
enabled = false,
|
enabled = false,
|
||||||
ingredients = ingredients_2,
|
ingredients = ingredients_2,
|
||||||
result = data.raw['recipe'][recipe_list[i]].result,
|
result = data.raw.recipe[recipe_list[i]].result,
|
||||||
result_count = data.raw['recipe'][recipe_list[i]].result_count * 16,
|
result_count = data.raw.recipe[recipe_list[i]].result_count * 16,
|
||||||
}})
|
}})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -260,9 +260,9 @@ for i=1, #recipe_list, 1 do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
data.raw['recipe']['loader'].hidden = false
|
data.raw.recipe['loader'].hidden = false
|
||||||
data.raw['recipe']['fast-loader'].hidden = false
|
data.raw.recipe['fast-loader'].hidden = false
|
||||||
data.raw['recipe']['express-loader'].hidden = false
|
data.raw.recipe['express-loader'].hidden = false
|
||||||
table.insert(data.raw.technology['logistics'].effects, {type='unlock-recipe', recipe='loader'})
|
table.insert(data.raw.technology['logistics'].effects, {type='unlock-recipe', recipe='loader'})
|
||||||
table.insert(data.raw.technology['logistics-2'].effects, {type='unlock-recipe', recipe='fast-loader'})
|
table.insert(data.raw.technology['logistics-2'].effects, {type='unlock-recipe', recipe='fast-loader'})
|
||||||
table.insert(data.raw.technology['logistics-3'].effects, {type='unlock-recipe', recipe='express-loader'})
|
table.insert(data.raw.technology['logistics-3'].effects, {type='unlock-recipe', recipe='express-loader'})
|
||||||
|
|||||||
Reference in New Issue
Block a user