This commit is contained in:
2026-03-19 20:12:22 +09:00
parent abfa7dbc07
commit 77e82b9bc3
5 changed files with 105 additions and 113 deletions

View File

@@ -33,107 +33,7 @@ local items = {
}, },
['item'] = {}, ['item'] = {},
['equipment'] = { ['equipment'] = {
['battery-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'battery-equipment',
name = 'battery',
ref_name = 'battery-mk2-equipment',
tech = 'battery-mk2-equipment',
min = 3,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['discharge-defense-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'active-defense-equipment',
name = 'discharge-defense',
ref_name = 'discharge-defense-equipment',
tech = 'discharge-defense-equipment',
min = 2,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['energy-shield-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'energy-shield-equipment',
name = 'energy-shield',
ref_name = 'energy-shield-mk2-equipment',
tech = 'energy-shield-mk2-equipment',
min = 3,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['exoskeleton-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'movement-bonus-equipment',
name = 'exoskeleton',
ref_name = 'exoskeleton-equipment',
tech = 'exoskeleton-equipment',
min = 2,
max = math.min(tonumber(settings.startup['PHI-MB-EQUIPMENT-TIER'].value) or 1, 2)
},
['fission-reactor-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'generator-equipment',
name = 'fission-reactor',
ref_name = 'fission-reactor-equipment',
tech = 'fission-reactor-equipment',
min = 2,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['night-vision-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'night-vision-equipment',
name = 'night-vision',
ref_name = 'night-vision-equipment',
tech = 'night-vision-equipment',
min = 2,
max = math.min(tonumber(settings.startup['PHI-MB-EQUIPMENT-TIER'].value) or 1, 2)
},
['personal-laser-defense-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'active-defense-equipment',
name = 'personal-laser-defense',
ref_name = 'personal-laser-defense-equipment',
tech = 'personal-laser-defense-equipment',
min = 2,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['personal-roboport-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'roboport-equipment',
name = 'personal-roboport',
ref_name = 'personal-roboport-mk2-equipment',
tech = 'personal-roboport-mk2-equipment',
min = 3,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['solar-panel-equipment'] = {
enabled = settings.startup['PHI-MB-EQUIPMENT'].value,
stage = 1,
mod = 'base',
type = 'solar-panel-equipment',
name = 'solar-panel',
ref_name = 'solar-panel-equipment',
tech = 'solar-panel-equipment',
min = 2,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value,
base = 30,
graphics_name = 'solar-panel-equipment'
}
}, },
['space-age'] = { ['space-age'] = {
['PHI-VP'] = { ['PHI-VP'] = {

View File

@@ -15,51 +15,51 @@ return {
['boiler'] = { ['boiler'] = {
type = 'boiler', type = 'boiler',
name = 'boiler', name = 'boiler',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT -- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['steam-engine'] = { ['steam-engine'] = {
type = 'generator', type = 'generator',
name = 'steam-engine', name = 'steam-engine',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT -- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['nuclear-reactor'] = { ['nuclear-reactor'] = {
type = 'reactor', type = 'reactor',
name = 'nuclear-reactor', name = 'nuclear-reactor',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT -- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['heat-pipe'] = { ['heat-pipe'] = {
type = 'heat-pipe', type = 'heat-pipe',
name = 'heat-pipe', name = 'heat-pipe',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT -- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['heat-exchanger'] = { ['heat-exchanger'] = {
type = 'boiler', type = 'boiler',
name = 'heat-exchanger', name = 'heat-exchanger',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
-- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT -- MBE A 4 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['steam-turbine'] = { ['steam-turbine'] = {
type = 'generator', type = 'generator',
name = 'steam-turbine', name = 'steam-turbine',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT -- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
['fusion-reactor'] = { ['fusion-reactor'] = {
mod = 'space-age', mod = 'space-age',
type = 'fusion-reactor', type = 'fusion-reactor',
name = 'fusion-reactor', name = 'fusion-reactor',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT -- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
['fusion-generator'] = { ['fusion-generator'] = {
mod = 'space-age', mod = 'space-age',
type = 'fusion-generator', type = 'fusion-generator',
name = 'fusion-generator', name = 'fusion-generator',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
-- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT -- MBE A 4 SPACE_AGE ENTITY,RECIPE,RESEARCH_EFFECT
['heating-tower'] = { ['heating-tower'] = {
@@ -67,6 +67,6 @@ return {
type = 'reactor', type = 'reactor',
name = 'heating-tower', name = 'heating-tower',
tech = 'heating-tower', tech = 'heating-tower',
max = math.min(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value, 5) max = math.min(tonumber(settings.startup['PHI-MB-ENERGY-POWER-TIER'].value) or 1, 5)
}, },
} }

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

@@ -0,0 +1,74 @@
return {
-- MBM A 2 BASE ENTITY,RECIPE,RESEARCH_EFFECT
['battery-equipment'] = {
type = 'battery-equipment',
name = 'battery',
ref_name = 'battery-mk2-equipment',
tech = 'battery-mk2-equipment',
min = 3,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['discharge-defense-equipment'] = {
type = 'active-defense-equipment',
name = 'discharge-defense',
ref_name = 'discharge-defense-equipment',
tech = 'discharge-defense-equipment',
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['energy-shield-equipment'] = {
type = 'energy-shield-equipment',
name = 'energy-shield',
ref_name = 'energy-shield-mk2-equipment',
tech = 'energy-shield-mk2-equipment',
min = 3,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['exoskeleton-equipment'] = {
type = 'movement-bonus-equipment',
name = 'exoskeleton',
ref_name = 'exoskeleton-equipment',
tech = 'exoskeleton-equipment',
max = math.min(tonumber(settings.startup['PHI-MB-EQUIPMENT-TIER'].value) or 1, 2)
},
['fission-reactor-equipment'] = {
type = 'generator-equipment',
name = 'fission-reactor',
ref_name = 'fission-reactor-equipment',
tech = 'fission-reactor-equipment',
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['night-vision-equipment'] = {
type = 'night-vision-equipment',
name = 'night-vision',
ref_name = 'night-vision-equipment',
tech = 'night-vision-equipment',
max = math.min(tonumber(settings.startup['PHI-MB-EQUIPMENT-TIER'].value) or 1, 2)
},
['personal-laser-defense-equipment'] = {
mod = 'base',
type = 'active-defense-equipment',
name = 'personal-laser-defense',
ref_name = 'personal-laser-defense-equipment',
tech = 'personal-laser-defense-equipment',
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['personal-roboport-equipment'] = {
mod = 'base',
type = 'roboport-equipment',
name = 'personal-roboport',
ref_name = 'personal-roboport-mk2-equipment',
tech = 'personal-roboport-mk2-equipment',
min = 3,
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value
},
['solar-panel-equipment'] = {
mod = 'base',
type = 'solar-panel-equipment',
name = 'solar-panel',
ref_name = 'solar-panel-equipment',
tech = 'solar-panel-equipment',
max = settings.startup['PHI-MB-EQUIPMENT-TIER'].value,
base = 30,
graphics_name = 'solar-panel-equipment'
}
}

View File

@@ -1,4 +1,6 @@
local items = require 'config' local param = require 'config'
local main = require 'main'
local items = require 'mbq-c'
if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
-- MBQ A 1 ARMOR_GRID -- MBQ A 1 ARMOR_GRID
@@ -11,7 +13,7 @@ if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
-- MBQ A 1 ARMOR -- MBQ A 1 ARMOR
local armor = table.deepcopy(data.raw['armor']['power-armor-mk2']) local armor = table.deepcopy(data.raw['armor']['power-armor-mk2'])
armor.name = 'power-armor-mk3' armor.name = 'power-armor-mk3'
armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}} armor.icons = {{icon = armor.icon, tint = param['tint'][2], icon_size = armor.icon_size}}
armor.icon = nil armor.icon = nil
armor.icon_size = nil armor.icon_size = nil
@@ -52,7 +54,7 @@ if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
-- MBQ A 1 ARMOR -- MBQ A 1 ARMOR
armor = table.deepcopy(data.raw['armor']['mech-armor']) armor = table.deepcopy(data.raw['armor']['mech-armor'])
armor.name = 'mech-armor-mk2' armor.name = 'mech-armor-mk2'
armor.icons = {{icon = armor.icon, tint = items['tint'][2], icon_size = armor.icon_size}} armor.icons = {{icon = armor.icon, tint = param['tint'][2], icon_size = armor.icon_size}}
armor.icon = nil armor.icon = nil
armor.icon_size = nil armor.icon_size = nil
@@ -96,3 +98,19 @@ if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
end end
end end
end end
for _, v in pairs(items) do
v.mod = v.mod or 'base'
v.min = v.min or 2
if v.enabled and (v.mod and mods[v.mod]) and (v.max >= v.min) 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

0
PHI-CL/data/u/mbq-c.lua Normal file
View File