mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -2,50 +2,6 @@ local items = require 'config'
|
||||
local main = require 'main'
|
||||
local file_stage = 1
|
||||
|
||||
for k, v in pairs(items['setting']) do
|
||||
for k2=1, #v.effect do
|
||||
if items[v.effect[k2]] ~= nil then
|
||||
if settings.startup[k].value < items[v.effect[k2]].min then
|
||||
items[v.effect[k2]].enabled = false
|
||||
end
|
||||
|
||||
items[v.effect[k2]][v.type] = settings.startup[k].value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs(items['item']) do
|
||||
if v.enabled then
|
||||
if v.stage == file_stage then
|
||||
v.category = 'item'
|
||||
|
||||
for j=v.min, v.max, 1 do
|
||||
main.EEE(v, j)
|
||||
main.EI(v, j)
|
||||
main.ER(v, j)
|
||||
main.ET(v, j)
|
||||
end
|
||||
|
||||
main.EL(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs(items['equipment']) do
|
||||
if v.enabled then
|
||||
if v.stage == file_stage then
|
||||
v.category = 'equipment'
|
||||
|
||||
for j=v.min, v.max, 1 do
|
||||
main.EEQ(v, j)
|
||||
main.EI(v, j)
|
||||
main.ER(v, j)
|
||||
main.ET(v, j)
|
||||
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'
|
||||
@@ -79,7 +35,9 @@ if settings.startup['PHI-RS'].value then
|
||||
|
||||
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'})
|
||||
|
||||
data.raw['furnace']['electric-furnace'].fast_replaceable_group = 'electric-furnace'
|
||||
data.raw['assembling-machine']['electric-filter-furnace'].fast_replaceable_group = data.raw['furnace']['electric-furnace'].fast_replaceable_group
|
||||
data.raw['assembling-machine']['electric-filter-furnace'].crafting_categories = data.raw['furnace']['electric-furnace'].crafting_categories
|
||||
|
||||
if settings.startup['PHI-RS-RECIPE-DROF'].value == 1 then
|
||||
data.raw['utility-constants'].default.dynamic_recipe_overload_factor = 1.17
|
||||
@@ -272,3 +230,48 @@ if settings.startup['PHI-RS'].value then
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for k, v in pairs(items['setting']) do
|
||||
for k2=1, #v.effect do
|
||||
if items[v.effect[k2]] ~= nil then
|
||||
if settings.startup[k].value < items[v.effect[k2]].min then
|
||||
items[v.effect[k2]].enabled = false
|
||||
end
|
||||
|
||||
items[v.effect[k2]][v.type] = settings.startup[k].value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs(items['item']) do
|
||||
if v.enabled then
|
||||
if v.stage == file_stage then
|
||||
v.category = 'item'
|
||||
|
||||
for j=v.min, v.max, 1 do
|
||||
main.EEE(v, j)
|
||||
main.EI(v, j)
|
||||
main.ER(v, j)
|
||||
main.ET(v, j)
|
||||
end
|
||||
|
||||
main.EL(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs(items['equipment']) do
|
||||
if v.enabled then
|
||||
if v.stage == file_stage then
|
||||
v.category = 'equipment'
|
||||
|
||||
for j=v.min, v.max, 1 do
|
||||
main.EEQ(v, j)
|
||||
main.EI(v, j)
|
||||
main.ER(v, j)
|
||||
main.ET(v, j)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user