This commit is contained in:
2024-01-25 18:37:52 +09:00
parent ccbd4f0314
commit 3e2585c4f9
6 changed files with 92 additions and 94 deletions

View File

@@ -1,10 +1,6 @@
local recipe_multiplier = {settings.startup['PHI-RS-RECIPE-1'].value, settings.startup['PHI-RS-RECIPE-2'].value} local recipe_multiplier = {settings.startup['PHI-RS-RECIPE-1'].value, settings.startup['PHI-RS-RECIPE-2'].value}
local items = require 'config' local items = require 'config'
if recipe_multiplier[1] == 1 then
recipe_multiplier[1] = nil
end
data.raw['utility-constants'].default.dynamic_recipe_overload_factor = settings.startup['PHI-RS-RECIPE-DROF'].value / 100 data.raw['utility-constants'].default.dynamic_recipe_overload_factor = settings.startup['PHI-RS-RECIPE-DROF'].value / 100
if settings.startup['PHI-RS-MODULE'].value == true then if settings.startup['PHI-RS-MODULE'].value == true then
@@ -46,9 +42,10 @@ if settings.startup['PHI-RS-MODULE'].value == true then
}) })
end end
for j=1, 2, 1 do
if recipe_multiplier[j] ~= 1 then
for i=1, #items, 1 do for i=1, #items, 1 do
if data.raw.recipe[items[i].name] ~= nil then if data.raw.recipe[items[i].name] ~= nil then
for j=1, #recipe_multiplier, 1 do
local item = table.deepcopy(data.raw.recipe[items[i].name]) local item = table.deepcopy(data.raw.recipe[items[i].name])
item.enabled = false item.enabled = false
@@ -156,6 +153,7 @@ for i=1, #items, 1 do
end end
end end
end end
end
local module_limitation = table.deepcopy(data.raw.module['productivity-module']['limitation']) local module_limitation = table.deepcopy(data.raw.module['productivity-module']['limitation'])

View File

@@ -33,5 +33,5 @@ PHI-RS-MODULE=Module
[mod-setting-description] [mod-setting-description]
PHI-RS-RECIPE-1=Default 4 ; Disable 1 PHI-RS-RECIPE-1=Default 4 ; Disable 1
PHI-RS-RECIPE-2=Default 8 PHI-RS-RECIPE-2=Default 8 ; Disable 1
PHI-RS-RECIPE-DROF=Default 117 PHI-RS-RECIPE-DROF=Default 117

View File

@@ -33,5 +33,5 @@ PHI-RS-MODULE=モジュール
[mod-setting-description] [mod-setting-description]
PHI-RS-RECIPE-1=デフォルト 4 ; 止める 1 PHI-RS-RECIPE-1=デフォルト 4 ; 止める 1
PHI-RS-RECIPE-2=デフォルト 8 PHI-RS-RECIPE-2=デフォルト 8 ; 止める 1
PHI-RS-RECIPE-DROF=デフォルト 117 PHI-RS-RECIPE-DROF=デフォルト 117

View File

@@ -33,5 +33,5 @@ PHI-RS-MODULE=模組
[mod-setting-description] [mod-setting-description]
PHI-RS-RECIPE-1=預設 4 ; 停用 1 PHI-RS-RECIPE-1=預設 4 ; 停用 1
PHI-RS-RECIPE-2=預設 8 PHI-RS-RECIPE-2=預設 8 ; 停用 1
PHI-RS-RECIPE-DROF=預設 117 PHI-RS-RECIPE-DROF=預設 117

View File

@@ -33,5 +33,5 @@ PHI-RS-MODULE=模組
[mod-setting-description] [mod-setting-description]
PHI-RS-RECIPE-1=預設 4 ; 停用 1 PHI-RS-RECIPE-1=預設 4 ; 停用 1
PHI-RS-RECIPE-2=預設 8 PHI-RS-RECIPE-2=預設 8 ; 停用 1
PHI-RS-RECIPE-DROF=預設 117 PHI-RS-RECIPE-DROF=預設 117

View File

@@ -3,14 +3,14 @@ data:extend({{
name = 'PHI-RS-RECIPE-1', name = 'PHI-RS-RECIPE-1',
setting_type = 'startup', setting_type = 'startup',
default_value = 4, default_value = 4,
allowed_values = {1, 2, 3, 4, 5, 6}, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
order = 'A1' order = 'A1'
}, { }, {
type = 'int-setting', type = 'int-setting',
name = 'PHI-RS-RECIPE-2', name = 'PHI-RS-RECIPE-2',
setting_type = 'startup', setting_type = 'startup',
default_value = 8, default_value = 8,
allowed_values = {2, 3, 4, 5, 6, 7, 8, 9, 10}, allowed_values = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
order = 'A2' order = 'A2'
}, { }, {
type = 'bool-setting', type = 'bool-setting',
@@ -20,7 +20,7 @@ data:extend({{
order = 'A3' order = 'A3'
}, { }, {
type = 'int-setting', type = 'int-setting',
name = 'PHI-RS-RECIPE-3', name = 'PHI-RS-RECIPE-DROF',
setting_type = 'startup', setting_type = 'startup',
default_value = 117, default_value = 117,
minimum_value = 50, minimum_value = 50,