mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-31 12:11:40 +09:00
.
This commit is contained in:
@@ -46,6 +46,41 @@ for _, v in pairs(items['equipment']) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if settings.startup['PHI-RS'].value then
|
||||||
|
local item = table.deepcopy(data.raw['furnace']['electric-furnace'])
|
||||||
|
item.name = 'electric-filter-furnace'
|
||||||
|
item.minable.result = 'electric-filter-furnace'
|
||||||
|
item.type = 'assembling-machine'
|
||||||
|
data:extend({item})
|
||||||
|
|
||||||
|
item = table.deepcopy(data.raw.item['electric-furnace'])
|
||||||
|
item.name = 'electric-filter-furnace'
|
||||||
|
item.place_result = 'electric-filter-furnace'
|
||||||
|
item.order = item.order .. 'B'
|
||||||
|
data:extend({item})
|
||||||
|
|
||||||
|
data:extend({{
|
||||||
|
type = 'recipe',
|
||||||
|
name = 'electric-filter-furnace',
|
||||||
|
energy_required = 2,
|
||||||
|
enabled = false,
|
||||||
|
ingredients = {{'electric-furnace', 1}},
|
||||||
|
result = 'electric-filter-furnace',
|
||||||
|
}})
|
||||||
|
|
||||||
|
data:extend({{
|
||||||
|
type = 'recipe',
|
||||||
|
name = 'electric-furnace-return',
|
||||||
|
energy_required = 2,
|
||||||
|
enabled = false,
|
||||||
|
ingredients = {{'electric-filter-furnace', 1}},
|
||||||
|
result = 'electric-furnace',
|
||||||
|
}})
|
||||||
|
|
||||||
|
table.insert(data.raw.technology[items['item']['electric-filter-furnace'].tech].effects, {type='unlock-recipe', recipe='electric-furnace'})
|
||||||
|
table.insert(data.raw.technology[items['item']['electric-filter-furnace'].tech].effects, {type='unlock-recipe', recipe='electric-furnace-return'})
|
||||||
|
|
||||||
|
|
||||||
if settings.startup['PHI-RS-RECIPE-DROF'].value == 1 then
|
if settings.startup['PHI-RS-RECIPE-DROF'].value == 1 then
|
||||||
data.raw['utility-constants'].default.dynamic_recipe_overload_factor = 1.17
|
data.raw['utility-constants'].default.dynamic_recipe_overload_factor = 1.17
|
||||||
|
|
||||||
@@ -56,7 +91,6 @@ end
|
|||||||
data.raw['utility-constants'].default.minimum_recipe_overload_multiplier = settings.startup['PHI-RS-RECIPE-MINROM'].value
|
data.raw['utility-constants'].default.minimum_recipe_overload_multiplier = settings.startup['PHI-RS-RECIPE-MINROM'].value
|
||||||
data.raw['utility-constants'].default.maximum_recipe_overload_multiplier = settings.startup['PHI-RS-RECIPE-MAXROM'].value
|
data.raw['utility-constants'].default.maximum_recipe_overload_multiplier = settings.startup['PHI-RS-RECIPE-MAXROM'].value
|
||||||
|
|
||||||
|
|
||||||
if settings.startup['PHI-RS-MODULE'].value then
|
if settings.startup['PHI-RS-MODULE'].value then
|
||||||
table.insert(items, {
|
table.insert(items, {
|
||||||
name='speed-module',
|
name='speed-module',
|
||||||
@@ -102,7 +136,7 @@ for j=1, 2, 1 do
|
|||||||
if recipe_multiplier[j] ~= 1 then
|
if recipe_multiplier[j] ~= 1 then
|
||||||
for i=1, #items, 1 do
|
for i=1, #items, 1 do
|
||||||
if data.raw.recipe[items[i].name] then
|
if data.raw.recipe[items[i].name] then
|
||||||
local item = table.deepcopy(data.raw.recipe[items[i].name])
|
item = table.deepcopy(data.raw.recipe[items[i].name])
|
||||||
item.enabled = false
|
item.enabled = false
|
||||||
|
|
||||||
if item.normal and item.normal then
|
if item.normal and item.normal then
|
||||||
@@ -186,7 +220,6 @@ for j=1, 2, 1 do
|
|||||||
item.ingredients[k].amount = v.amount * recipe_multiplier[j]
|
item.ingredients[k].amount = v.amount * recipe_multiplier[j]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if item.results then
|
if item.results then
|
||||||
for k, v in pairs(item.results) do
|
for k, v in pairs(item.results) do
|
||||||
if v[1] and v[2] then
|
if v[1] and v[2] then
|
||||||
@@ -238,38 +271,4 @@ if module_limitation then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if settings.startup['PHI-RS'].value then
|
|
||||||
local item = table.deepcopy(data.raw['furnace']['electric-furnace'])
|
|
||||||
item.name = 'electric-filter-furnace'
|
|
||||||
item.minable.result = 'electric-filter-furnace'
|
|
||||||
item.type = 'assembling-machine'
|
|
||||||
data:extend({item})
|
|
||||||
|
|
||||||
item = table.deepcopy(data.raw.item['electric-furnace'])
|
|
||||||
item.name = 'electric-filter-furnace'
|
|
||||||
item.place_result = 'electric-filter-furnace'
|
|
||||||
item.order = item.order .. 'B'
|
|
||||||
data:extend({item})
|
|
||||||
|
|
||||||
data:extend({{
|
|
||||||
type = 'recipe',
|
|
||||||
name = 'electric-filter-furnace',
|
|
||||||
energy_required = 2,
|
|
||||||
enabled = false,
|
|
||||||
ingredients = {{'electric-furnace', 1}},
|
|
||||||
result = 'electric-filter-furnace',
|
|
||||||
}})
|
|
||||||
|
|
||||||
data:extend({{
|
|
||||||
type = 'recipe',
|
|
||||||
name = 'electric-furnace-return',
|
|
||||||
energy_required = 2,
|
|
||||||
enabled = false,
|
|
||||||
ingredients = {{'electric-filter-furnace', 1}},
|
|
||||||
result = 'electric-furnace',
|
|
||||||
}})
|
|
||||||
|
|
||||||
table.insert(data.raw.technology[items['item']['electric-filter-furnace'].tech].effects, {type='unlock-recipe', recipe='electric-furnace'})
|
|
||||||
table.insert(data.raw.technology[items['item']['electric-filter-furnace'].tech].effects, {type='unlock-recipe', recipe='electric-furnace-return'})
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user