This commit is contained in:
2025-04-26 23:22:36 +09:00
parent 26d835d7d0
commit 3a0c7993a1
5 changed files with 25 additions and 47 deletions

View File

@@ -296,7 +296,7 @@ local items = {
ref_name = 'exoskeleton-equipment', ref_name = 'exoskeleton-equipment',
tech = 'exoskeleton-equipment', tech = 'exoskeleton-equipment',
min = 2, min = 2,
max = settings.startup['PHI-EQ-EQUIPMENT-TIER'].value max = math.min(tonumber(settings.startup['PHI-EQ-EQUIPMENT-TIER'].value) or 1, 2)
}, },
['fission-reactor-equipment'] = { ['fission-reactor-equipment'] = {
enabled = settings.startup['PHI-EQ'].value, enabled = settings.startup['PHI-EQ'].value,
@@ -318,7 +318,7 @@ local items = {
ref_name = 'night-vision-equipment', ref_name = 'night-vision-equipment',
tech = 'night-vision-equipment', tech = 'night-vision-equipment',
min = 2, min = 2,
max = settings.startup['PHI-EQ-EQUIPMENT-TIER'].value max = math.min(tonumber(settings.startup['PHI-EQ-EQUIPMENT-TIER'].value) or 1, 2)
}, },
['personal-laser-defense-equipment'] = { ['personal-laser-defense-equipment'] = {
enabled = settings.startup['PHI-EQ'].value, enabled = settings.startup['PHI-EQ'].value,
@@ -871,7 +871,7 @@ if mods and mods['space-age'] then
ref_name = 'toolbelt-equipment', ref_name = 'toolbelt-equipment',
tech = 'toolbelt-equipment', tech = 'toolbelt-equipment',
min = 2, min = 2,
max = settings.startup['PHI-EQ-EQUIPMENT-TIER'].value max = math.min(tonumber(settings.startup['PHI-EQ-EQUIPMENT-TIER'].value) or 1, 2)
} }
items['equipment']['battery-equipment'].ref_name = 'battery-mk3-equipment' items['equipment']['battery-equipment'].ref_name = 'battery-mk3-equipment'

View File

@@ -40,30 +40,17 @@ if mods['space-exploration'] and settings.startup['PHI-MB'].value and settings.s
item.localised_description = {'description.se-core-miner-drill'} item.localised_description = {'description.se-core-miner-drill'}
data:extend({item}) data:extend({item})
if i > 2 then data:extend({{
data:extend({{ type = 'recipe',
type = 'recipe', name = miner_name,
name = miner_name, energy_required = 2,
energy_required = 2, enabled = false,
enabled = false, ingredients = (i > 2 and {{type = 'item', name = 'se-core-miner-drill-' .. (i - 1), amount = 1}, {type = 'item', name = 'se-core-miner-drill', amount = 1}}) or {{type = 'item', name = 'se-core-miner-drill', amount = 2}},
ingredients = {{type = 'item', name = 'se-core-miner-drill-' .. (i - 1), amount = 1}, {type = 'item', name = 'se-core-miner-drill', amount = 1}}, results = {{type = 'item', name = miner_name, amount = 1}},
results = {{type = 'item', name = miner_name, amount = 1}}, localised_name = {'name.se-core-miner-drill'},
localised_name = {'name.se-core-miner-drill'}, localised_description = {'description.se-core-miner-drill'}
localised_description = {'description.se-core-miner-drill'} }})
}})
else
data:extend({{
type = 'recipe',
name = miner_name,
energy_required = 2,
enabled = false,
ingredients = {{type = 'item', name = 'se-core-miner-drill', amount = 2}},
results = {{type = 'item', name = miner_name, amount = 1}},
localised_name = {'name.se-core-miner-drill'},
localised_description = {'description.se-core-miner-drill'}
}})
end
data.raw['mining-drill'][miner_name].fast_replaceable_group = data.raw['mining-drill']['se-core-miner-drill'].fast_replaceable_group data.raw['mining-drill'][miner_name].fast_replaceable_group = data.raw['mining-drill']['se-core-miner-drill'].fast_replaceable_group
table.insert(data.raw.technology['se-core-miner'].effects, {type='unlock-recipe', recipe=miner_name}) table.insert(data.raw.technology['se-core-miner'].effects, {type='unlock-recipe', recipe=miner_name})

View File

@@ -217,6 +217,10 @@ if settings.startup['PHI-MI'].value then
v.automatic = true v.automatic = true
end end
for _, v in pairs(data.raw['reactor']) do
v.scale_energy_usage = ((v.fast_replaceable_group and v.fast_replaceable_group == 'reactor') and settings.startup['PHI-MI-NUCLEAR'].value) or v.scale_energy_usage
end
for _, v in pairs({data.raw['module']['efficiency-module'], data.raw['module']['efficiency-module-2'], data.raw['module']['efficiency-module-3']}) do for _, v in pairs({data.raw['module']['efficiency-module'], data.raw['module']['efficiency-module-2'], data.raw['module']['efficiency-module-3']}) do
for _, v2 in pairs(v.effect) do for _, v2 in pairs(v.effect) do
v2 = v2 * settings.startup['PHI-MI-EFFCY'].value / 100 v2 = v2 * settings.startup['PHI-MI-EFFCY'].value / 100
@@ -225,12 +229,6 @@ if settings.startup['PHI-MI'].value then
data.raw.recipe['landfill'].ingredients = {{type = 'item', name = 'stone', amount = tonumber(settings.startup['PHI-MI-LANDFILL'].value) or 20}} data.raw.recipe['landfill'].ingredients = {{type = 'item', name = 'stone', amount = tonumber(settings.startup['PHI-MI-LANDFILL'].value) or 20}}
if settings.startup['PHI-MI-NUCLEAR'].value then
for _, v in pairs(data.raw['reactor']) do
v.scale_energy_usage = ((v.fast_replaceable_group and v.fast_replaceable_group == 'reactor') and settings.startup['PHI-MI-NUCLEAR'].value) or v.scale_energy_usage
end
end
if settings.startup['PHI-MI-PIPE'].value then if settings.startup['PHI-MI-PIPE'].value then
local s = (1 + settings.startup['PHI-MI-PIPE'].value) / 2 local s = (1 + settings.startup['PHI-MI-PIPE'].value) / 2

View File

@@ -139,8 +139,8 @@ for _, force in pairs(game.forces) do
if script.active_mods['space-exploration'] then if script.active_mods['space-exploration'] then
if technologies['se-core-miner'].researched then if technologies['se-core-miner'].researched then
for i = 2, settings.startup['PHI-MB-MACHINE-TIER'].value do for i = 2, settings.startup['PHI-MB-MACHINE-TIER'].value do
recipes['se-core-miner-' .. i].enabled = true recipes['se-core-miner-drill-' .. i].enabled = true
recipes['se-core-miner-' .. i].reload() recipes['se-core-miner-drill-' .. i].reload()
end end
end end
end end

View File

@@ -129,13 +129,6 @@ data:extend({
maximum_value = 1000, maximum_value = 1000,
localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-EFFCY'}, {'mod-setting-name.PHI-MI-EFFCY'}}, localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-EFFCY'}, {'mod-setting-name.PHI-MI-EFFCY'}},
order = 'C02' order = 'C02'
}, {
type = 'bool-setting',
name = 'PHI-MI-NUCLEAR',
setting_type = 'startup',
default_value = true,
localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-NUCLEAR'}, {'mod-setting-name.PHI-MI-NUCLEAR'}},
order = 'C03'
}, { }, {
type = 'int-setting', type = 'int-setting',
name = 'PHI-MI-PIPE', name = 'PHI-MI-PIPE',
@@ -143,7 +136,7 @@ data:extend({
default_value = 1, default_value = 1,
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-PIPE'}, {'mod-setting-name.PHI-MI-PIPE'}}, localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-PIPE'}, {'mod-setting-name.PHI-MI-PIPE'}},
order = 'C04' order = 'C03'
}, { }, {
type = 'int-setting', type = 'int-setting',
name = 'PHI-MI-ROBOT', name = 'PHI-MI-ROBOT',
@@ -151,14 +144,14 @@ data:extend({
default_value = 1, default_value = 1,
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-ROBOT'}, {'mod-setting-name.PHI-MI-ROBOT'}}, localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-ROBOT'}, {'mod-setting-name.PHI-MI-ROBOT'}},
order = 'C05' order = 'C04'
}, { }, {
type = 'bool-setting', type = 'bool-setting',
name = 'PHI-MI-ROBOT-ENERGY', name = 'PHI-MI-ROBOT-ENERGY',
setting_type = 'startup', setting_type = 'startup',
default_value = false, default_value = false,
localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-ROBOT-ENERGY'}, {'mod-setting-name.PHI-MI-ROBOT-ENERGY'}}, localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-ROBOT-ENERGY'}, {'mod-setting-name.PHI-MI-ROBOT-ENERGY'}},
order = 'C06' order = 'C05'
}, { }, {
type = 'int-setting', type = 'int-setting',
name = 'PHI-MI-TRAIN', name = 'PHI-MI-TRAIN',
@@ -166,7 +159,7 @@ data:extend({
default_value = 1, default_value = 1,
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-TRAIN'}, {'mod-setting-name.PHI-MI-TRAIN'}}, localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-TRAIN'}, {'mod-setting-name.PHI-MI-TRAIN'}},
order = 'C07' order = 'C06'
}, { }, {
type = 'int-setting', type = 'int-setting',
name = 'PHI-MI-PIPE-EXTENT', name = 'PHI-MI-PIPE-EXTENT',
@@ -175,7 +168,7 @@ data:extend({
minimum_value = 80, minimum_value = 80,
maximum_value = 2560, maximum_value = 2560,
localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-PIPE-EXTENT'}, {'mod-setting-name.PHI-MI-PIPE-EXTENT'}}, localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-PIPE-EXTENT'}, {'mod-setting-name.PHI-MI-PIPE-EXTENT'}},
order = 'C08' order = 'C07'
}, { }, {
type = 'int-setting', type = 'int-setting',
name = 'PHI-MI-ROCKET-CAPACITY', name = 'PHI-MI-ROCKET-CAPACITY',
@@ -184,7 +177,7 @@ data:extend({
minimum_value = 1, minimum_value = 1,
maximum_value = 10000, maximum_value = 10000,
localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-ROCKET-CAPACITY'}, {'mod-setting-name.PHI-MI-ROCKET-CAPACITY'}}, localised_name = {'phi-cl.combine', {'mod-setting-name-prefix.PHI-MI-ROCKET-CAPACITY'}, {'mod-setting-name.PHI-MI-ROCKET-CAPACITY'}},
order = 'C09' order = 'C08'
}, { }, {
type = 'bool-setting', type = 'bool-setting',
name = 'PHI-SA', name = 'PHI-SA',