mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -381,7 +381,7 @@ local items = {
|
||||
},
|
||||
['electric-filter-furnace'] = {
|
||||
enabled = settings.startup['PHI-MB'].value and settings.startup['PHI-RS'].value,
|
||||
stage = 2,
|
||||
stage = 1,
|
||||
type = 'furnace',
|
||||
name = 'electric-filter-furnace',
|
||||
ref_name = 'electric-filter-furnace',
|
||||
|
||||
@@ -2,38 +2,7 @@ local items = require 'config'
|
||||
local main = require 'main'
|
||||
local file_stage = 2
|
||||
|
||||
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 items['item']['nuclear-reactor'].enabled then
|
||||
if settings.startup['PHI-EN'] and settings.startup['PHI-EN-NUCLEAR-TIER'].value > 1 then
|
||||
data.raw['fluid']['steam'].max_temperature = 5000
|
||||
end
|
||||
|
||||
@@ -111,3 +80,35 @@ if settings.startup['PHI-EQ-ARMOR'].value then
|
||||
|
||||
table.insert(data.raw.technology['power-armor-mk2'].effects, {type='unlock-recipe', recipe='power-armor-mk3'})
|
||||
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
|
||||
|
||||
@@ -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