This commit is contained in:
2026-03-19 19:30:58 +09:00
parent b0fda01ec9
commit 8bb5bf99c4
12 changed files with 463 additions and 432 deletions

83
PHI-CL/data/b/mbe-c.lua Normal file
View File

@@ -0,0 +1,83 @@
return {
-- MBE A 7 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['solar-panel'] = {
enabled = true,
type = 'solar-panel',
name = 'solar-panel',
max = settings.startup['PHI-MB-ENERGY-POWER-TIER'].value
},
-- MBE A 7 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['accumulator'] = {
enabled = true,
type = 'accumulator',
name = 'accumulator',
max = settings.startup['PHI-MB-ENERGY-POWER-TIER'].value
},
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['boiler'] = {
enabled = true,
type = 'boiler',
name = 'boiler',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['steam-engine'] = {
enabled = true,
type = 'generator',
name = 'steam-engine',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['nuclear-reactor'] = {
enabled = true,
type = 'reactor',
name = 'nuclear-reactor',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['heat-pipe'] = {
enabled = true,
type = 'heat-pipe',
name = 'heat-pipe',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['heat-exchanger'] = {
enabled = true,
type = 'boiler',
name = 'heat-exchanger',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['steam-turbine'] = {
enabled = true,
type = 'generator',
name = 'steam-turbine',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
['fusion-reactor'] = {
enabled = mods['space-age'],
mod = 'space-age',
type = 'fusion-reactor',
name = 'fusion-reactor',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
['fusion-generator'] = {
enabled = mods['space-age'],
mod = 'space-age',
type = 'fusion-generator',
name = 'fusion-generator',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
['heating-tower'] = {
enabled = mods['space-age'],
mod = 'space-age',
type = 'reactor',
name = 'heating-tower',
tech = 'heating-tower',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5)
},
}

44
PHI-CL/data/b/mbe.lua Normal file
View File

@@ -0,0 +1,44 @@
local param = require 'config'
local main = require 'main'
local items = require 'mbe-c'
-- MBE C 1 BASE FLUID
data.raw['fluid']['steam'].max_temperature = ((settings.startup['PHI-MB-ENERGY-POWER-TIER'].value > 1) and 5000) or data.raw['fluid']['steam'].max_temperature
-- MBE A 7 BASE RESEARCH
for i = 1, 7 do
data:extend({{
type = 'technology',
name = 'compound-energy-' .. i,
enabled = (i <= tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value)),
prerequisites = ((i > 1) and {'compound-energy-' .. (i - 1)}) or {'solar-energy', 'advanced-circuit', 'electric-energy-accumulators'},
effects = {},
upgrade = true,
unit = {count = math.floor(125 * (i ^ 2)), ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}}, time = 30},
icons = {{icon = '__base__/graphics/technology/solar-energy.png', icon_size = 256, tint = param['tint'][i]}},
order = 'a-h-' .. i,
localised_name = {'phi-cl.combine', {'technology-name.compound-energy'}, tostring(i)},
localised_description = {'technology-description.compound-energy'}
}})
end
-- MBE A 38 BASE ENTITY,RECIPE,RESEARCH_EFFECT
-- MBE A 12 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
for _, v in pairs(items) do
if v.enabled and (v.max >= v.min) then
v.mod = v.mod or 'base'
v.category = v.category or 'item'
v.ref_name = v.ref_name or v.name
v.tech = v.tech or 'compound-energy'
v.min = v.min or 2
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

0
PHI-CL/data/b/mbm.lua Normal file
View File

98
PHI-CL/data/b/mbq.lua Normal file
View File

@@ -0,0 +1,98 @@
local items = require 'config'
if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
-- MBQ A 1 ARMOR_GRID
local grid = table.deepcopy(data.raw['equipment-grid']['large-equipment-grid'])
grid.name = 'equipment-grid-14x14'
grid.width = 14
grid.height = 14
data:extend({grid})
-- MBQ A 1 ARMOR
local armor = table.deepcopy(data.raw['armor']['power-armor-mk2'])
armor.name = 'power-armor-mk3'
armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}}
armor.icon = nil
armor.icon_size = nil
for _, v in pairs(armor.resistances) do
v.decrease = v.decrease + 10
v.percent = ((v.percent < 90) and v.percent + 10) or v.percent
end
armor.order = armor.order .. '-2'
armor.equipment_grid = 'equipment-grid-14x14'
armor.inventory_size_bonus = armor.inventory_size_bonus + 10
armor.localised_name = {'phi-cl.combine-gen', {'item-name.power-armor-mk2'}, '3'}
data:extend({armor})
-- MBQ A 1 RECIPE
data:extend({{
type = 'recipe',
name = armor.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'power-armor-mk2', amount = 2}},
results = {{type = 'item', name = armor.name, amount = 1}},
main_product = armor.name,
localised_name = {'phi-cl.combine-gen', {'item-name.power-armor-mk2'}, '3'}
}})
-- MBQ A 1 RESEARCH_EFFECT
table.insert(data.raw.technology['power-armor-mk2'].effects, {type = 'unlock-recipe', recipe = armor.name})
if mods['space-age'] then
-- MBQ A 1 ARMOR_GRID
grid = table.deepcopy(data.raw['equipment-grid']['large-equipment-grid'])
grid.name = 'equipment-grid-15x16'
grid.width = 15
grid.height = 16
data:extend({grid})
-- MBQ A 1 ARMOR
armor = table.deepcopy(data.raw['armor']['mech-armor'])
armor.name = 'mech-armor-mk2'
armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}}
armor.icon = nil
armor.icon_size = nil
for _, v in pairs(armor.resistances) do
v.decrease = v.decrease + 10
v.percent = ((v.percent < 90) and v.percent + 10) or v.percent
end
armor.order = armor.order .. '-2'
armor.equipment_grid = 'equipment-grid-15x16'
armor.inventory_size_bonus = armor.inventory_size_bonus + 10
armor.localised_name = {'phi-cl.combine-gen', {'item-name.mech-armor'}, '2'}
data:extend({armor})
-- MBQ A 1 RECIPE
data:extend({{
type = 'recipe',
name = armor.name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'mech-armor', amount = 2}},
results = {{type = 'item', name = armor.name, amount = 1}},
main_product = armor.name,
localised_name = {'phi-cl.combine-gen', {'item-name.mech-armor'}, '2'}
}})
-- MBQ A 1 RESEARCH_EFFECT
table.insert(data.raw.technology['mech-armor'].effects, {type = 'unlock-recipe', recipe = armor.name})
end
for _, an in ipairs(data.raw['character']['character']['animations']) do
if an.armors then
for _, ar in ipairs(an.armors) do
if ar == 'power-armor-mk2' then
table.insert(an.armors, 'power-armor-mk3')
elseif ar == 'mech-armor' then
table.insert(an.armors, 'mech-armor-mk2')
end
end
end
end
end