mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-06-27 05:46:22 +09:00
.
This commit is contained in:
+2
-15
@@ -220,17 +220,6 @@ end
|
||||
-- recipe
|
||||
function main.ER(source, tier)
|
||||
local result_name = source.name .. ((source.category == 'equipment' and ('-mk' .. tier .. '-equipment')) or ('-' .. tier))
|
||||
local ingredients = {}
|
||||
local ingredient_name
|
||||
|
||||
if source.category == 'equipment' then
|
||||
ingredient_name = (tier == source.min and source.ref_name) or (source.name .. '-mk' .. (tier - 1) .. '-equipment')
|
||||
|
||||
else
|
||||
ingredient_name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name
|
||||
end
|
||||
|
||||
table.insert(ingredients, {type = 'item', name = ingredient_name, amount = 2})
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
@@ -238,7 +227,7 @@ function main.ER(source, tier)
|
||||
icons = table.deepcopy(data.raw.item[source.ref_name].icons),
|
||||
energy_required = 2,
|
||||
enabled = false,
|
||||
ingredients = ingredients,
|
||||
ingredients = {{type = 'item', name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name, amount = 2}},
|
||||
results = {{type = 'item', name = result_name, amount = 1}},
|
||||
main_product = result_name,
|
||||
localised_name = {'?', data.raw[source.type][result_name].localised_name, ''},
|
||||
@@ -252,13 +241,11 @@ function main.ET(source, tier)
|
||||
return
|
||||
end
|
||||
|
||||
local recipe_name = (source.category == 'equipment' and (source.name .. '-mk' .. tier .. '-equipment')) or (source.name .. '-' .. tier)
|
||||
|
||||
if not data.raw.technology[source.tech].effects then
|
||||
data.raw.technology[source.tech].effects = {}
|
||||
end
|
||||
|
||||
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=recipe_name})
|
||||
table.insert(data.raw.technology[source.tech].effects, {type = 'unlock-recipe', recipe = source.name .. '-' .. tier})
|
||||
|
||||
if source.type ~= 'ammo-turret' and source.type ~= 'fluid-turret' then
|
||||
return
|
||||
|
||||
+4
-8
@@ -12,8 +12,7 @@ data:extend({
|
||||
name = 'PHI-MB-ENERGY',
|
||||
setting_type = 'startup',
|
||||
default_value = 1,
|
||||
minimum_value = 1,
|
||||
maximum_value = 8,
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
localised_name = {'phi-cl.setting-category-color', 'MBE', {'phi-cl.enable'}, {'mod-setting-name.PHI-MB-ENERGY'}},
|
||||
localised_description = {'', '[item=solar-panel]', {'phi-cl.setting-change-color', '\n[104] A103 C1'}},
|
||||
order = 'AA00'
|
||||
@@ -22,8 +21,7 @@ data:extend({
|
||||
name = 'PHI-MB-ENERGY-SOLAR-RATIO',
|
||||
setting_type = 'startup',
|
||||
default_value = 4,
|
||||
minimum_value = 2,
|
||||
maximum_value = 16,
|
||||
allowed_values = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16},
|
||||
localised_name = {'phi-cl.setting-class-color', 'MBE1', {'phi-cl.ratio'}, {'mod-setting-name.PHI-MB-ENERGY-SOLAR-RATIO'}},
|
||||
localised_description = {'', '[item=beacon]'},
|
||||
order = 'AA01'
|
||||
@@ -32,8 +30,7 @@ data:extend({
|
||||
name = 'PHI-MB-MACHINE',
|
||||
setting_type = 'startup',
|
||||
default_value = 1,
|
||||
minimum_value = 1,
|
||||
maximum_value = 3,
|
||||
allowed_values = {1, 2, 3},
|
||||
localised_name = {'phi-cl.setting-category-color', 'MBM', {'phi-cl.enable'}, {'mod-setting-name.PHI-MB-MACHINE'}},
|
||||
localised_description = {'', '[item=assembling-machine-3]', {'phi-cl.setting-change-color', '\n[150] A150'}},
|
||||
order = 'AB00'
|
||||
@@ -42,8 +39,7 @@ data:extend({
|
||||
name = 'PHI-MB-EQUIPMENT',
|
||||
setting_type = 'startup',
|
||||
default_value = 1,
|
||||
minimum_value = 1,
|
||||
maximum_value = 3,
|
||||
allowed_values = {1, 2, 3},
|
||||
localised_name = {'phi-cl.setting-category-color', 'MBQ', {'phi-cl.enable'}, {'mod-setting-name.PHI-MB-EQUIPMENT'}},
|
||||
localised_description = {'', '[item=personal-laser-defense-equipment]', {'phi-cl.setting-change-color', '\n[63] A63'}},
|
||||
order = 'AC00'
|
||||
|
||||
Reference in New Issue
Block a user