mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -465,6 +465,37 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-NUCLEAR'].value
|
||||
data.raw['reactor']['nuclear-reactor'].scale_energy_usage = true
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value then
|
||||
local s = (1 + settings.startup['PHI-MI-PIPE'].value) / 2
|
||||
|
||||
for _, t in pairs({data.raw['offshore-pump'], data.raw['pump']}) do
|
||||
for _, v in pairs(t) do
|
||||
v.pumping_speed = v.pumping_speed * s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ROBOT'].value then
|
||||
local s = (1 + settings.startup['PHI-MI-ROBOT'].value) / 2
|
||||
local sn = (17 - settings.startup['PHI-MI-ROBOT'].value) / 16
|
||||
|
||||
for _, t in pairs({data.raw['construction-robot'], data.raw['logistic-robot']}) do
|
||||
for _, v in pairs(t) do
|
||||
v.speed = v.speed * s
|
||||
|
||||
if settings.startup['PHI-MI-ROBOT-ENERGY'].value then
|
||||
v.energy_per_tick = '0J'
|
||||
v.energy_per_move = '0J'
|
||||
v.speed_multiplier_when_out_of_energy = 1
|
||||
|
||||
else
|
||||
v.energy_per_tick = tostring(tonumber(string.match(v.energy_per_tick, '[%d%.]+')) * sn) .. string.match(v.energy_per_tick, '%a+')
|
||||
v.energy_per_move = tostring(tonumber(string.match(v.energy_per_move, '[%d%.]+')) * sn) .. string.match(v.energy_per_move, '%a+')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs(items['item']) do
|
||||
if (v.stage == file_stage) and v.enabled and (v.max >= v.min) then
|
||||
v.category = 'item'
|
||||
|
||||
@@ -110,13 +110,15 @@ PHI-EQ-DEFENSE-TIER=EQ2 Defense tier
|
||||
PHI-EQ-TOOL-TIER=EQ3 Tool tier
|
||||
PHI-EQ-UTILITY-TIER=EQ4 Utility tier
|
||||
PHI-EQ-ARMOR=EQ5 Enable armor
|
||||
PHI-EQ-SIZE=EQ6 Small equipment
|
||||
|
||||
PHI-MI=MI Miscellaneous change
|
||||
PHI-MI-LANDFILL=MI1 Landfill requirement
|
||||
PHI-MI-EFFCY=MI2 Efficiency module efficiency
|
||||
PHI-MI-NUCLEAR=MI3 Nuclear adjustable output
|
||||
PHI-MI-PIPE=MI4 Pipe efficiency
|
||||
PHI-MI-ROBOT=MI5 Robot efficiency
|
||||
PHI-MI-ROBOT=MI5A Robot efficiency
|
||||
PHI-MI-ROBOT-ENERGY=MI5B Nuclear fussion robot
|
||||
PHI-MI-TRAIN=MI6 Train efficiency
|
||||
|
||||
PHI-CT=CT Creative testing tools
|
||||
|
||||
@@ -109,13 +109,15 @@ PHI-EQ-DEFENSE-TIER=EQ2 防御モジュールの最高等級
|
||||
PHI-EQ-TOOL-TIER=EQ3 ツールモジュールの最高等級
|
||||
PHI-EQ-UTILITY-TIER=EQ4 ユーティリティモジュールの最高等級
|
||||
PHI-EQ-ARMOR=EQ5 アーマーを有効にする
|
||||
PHI-EQ-SIZE=EQ6 小さなアーマー設備
|
||||
|
||||
PHI-MI=MI その他の変更
|
||||
PHI-MI-LANDFILL=MI1 埋立地要件
|
||||
PHI-MI-EFFCY=MI2 エネルギー効率モジュール効率
|
||||
PHI-MI-NUCLEAR=MI3 原子炉出力の調整可能
|
||||
PHI-MI-PIPE=MI4 パイプ効率
|
||||
PHI-MI-ROBOT=MI5 ロボット効率
|
||||
PHI-MI-ROBOT=MI5A ロボット効率
|
||||
PHI-MI-ROBOT-ENERGY=MI5B 核融合ロボット
|
||||
PHI-MI-TRAIN=MI6 列車効率
|
||||
|
||||
PHI-CT=CT クリエイティブテストツール
|
||||
|
||||
@@ -109,13 +109,15 @@ PHI-EQ-DEFENSE-TIER=EQ2 防禦的最高等級
|
||||
PHI-EQ-TOOL-TIER=EQ3 工具的最高等級
|
||||
PHI-EQ-UTILITY-TIER=EQ4 雜項的最高等級
|
||||
PHI-EQ-ARMOR=EQ5 護甲啟用
|
||||
PHI-EQ-SIZE=EQ6 小型裝甲裝備
|
||||
|
||||
PHI-MI=MI 雜項小變化
|
||||
PHI-MI-LANDFILL=MI1 人造陸地需求
|
||||
PHI-MI-EFFCY=MI2 節能組件效率
|
||||
PHI-MI-NUCLEAR=MI3 核能反應爐可調輸出
|
||||
PHI-MI-PIPE=MI4 水管效率
|
||||
PHI-MI-ROBOT=MI5 無人機效率
|
||||
PHI-MI-ROBOT=MI5A 無人機效率
|
||||
PHI-MI-ROBOT-ENERGY=MI5B 核融合無人機
|
||||
PHI-MI-TRAIN=MI6 火車效率
|
||||
|
||||
PHI-CT=CT 創意測試工具
|
||||
|
||||
@@ -109,13 +109,15 @@ PHI-EQ-DEFENSE-TIER=EQ2 防禦的最高等級
|
||||
PHI-EQ-TOOL-TIER=EQ3 工具的最高等級
|
||||
PHI-EQ-UTILITY-TIER=EQ4 雜項的最高等級
|
||||
PHI-EQ-ARMOR=EQ5 護甲啟用
|
||||
PHI-EQ-SIZE=EQ6 小型裝甲裝備
|
||||
|
||||
PHI-MI=MI 雜項小變化
|
||||
PHI-MI-LANDFILL=MI1 人造陸地需求
|
||||
PHI-MI-EFFCY=MI2 節能組件效率
|
||||
PHI-MI-NUCLEAR=MI3 核能反應爐可調輸出
|
||||
PHI-MI-PIPE=MI4 水管效率
|
||||
PHI-MI-ROBOT=MI5 無人機效率
|
||||
PHI-MI-ROBOT=MI5A 無人機效率
|
||||
PHI-MI-ROBOT-ENERGY=MI5B 核融合無人機
|
||||
PHI-MI-TRAIN=MI6 火車效率
|
||||
|
||||
PHI-CT=CT 創意測試工具
|
||||
|
||||
@@ -293,6 +293,15 @@ function main.EEQ(source, tier)
|
||||
|
||||
item.localised_name = {'phi-cl.combine-gen', {'name.' .. source.ref_name}, tostring(tier)}
|
||||
|
||||
if settings.startup['PHI-EQ-SIZE'].value then
|
||||
item.shape = {
|
||||
width = 1,
|
||||
height = 1,
|
||||
type = 'full',
|
||||
points = {{0, 0}}
|
||||
}
|
||||
end
|
||||
|
||||
data:extend({item})
|
||||
end
|
||||
|
||||
|
||||
@@ -604,28 +604,6 @@
|
||||
end
|
||||
|
||||
** MAIN
|
||||
for _, tc in pairs({'layers', 'sheets'}) do
|
||||
if item[ve][tc] and item[ve][tc][1] then
|
||||
item[ve][tc][1].tint = items['tint'][tier]
|
||||
end
|
||||
|
||||
for _, v in pairs(item[ve]) do
|
||||
if type(v) == 'table' then
|
||||
if v[tc] and v[tc][1] then
|
||||
v[tc][1].tint = items['tint'][tier]
|
||||
end
|
||||
|
||||
for i=1, #v, 1 do
|
||||
if v[i] and type(v[i]) == 'table' then
|
||||
if v[i][tc] and v[i][tc][1] then
|
||||
v[i][tc][1].tint = items['tint'][tier]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if source.name == 'kr-gas-power-station' then
|
||||
item.fluid_usage_per_tick = item.fluid_usage_per_tick * (tier - source.min + 2)
|
||||
|
||||
@@ -863,27 +841,6 @@ if settings.startup['PHI-MB'].value and mods['space-exploration'] and settings.s
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value then
|
||||
local s = (1 + settings.startup['PHI-MI-PIPE'].value) / 2
|
||||
|
||||
for _, v in pairs(data.raw['pump']) do
|
||||
v.pumping_speed = v.pumping_speed * s
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ROBOT'].value then
|
||||
local s = (1 + settings.startup['PHI-MI-ROBOT'].value) / 2
|
||||
local sn = (17 - settings.startup['PHI-MI-ROBOT'].value) / 16
|
||||
|
||||
for _, t in pairs({data.raw['construction-robot'], data.raw['logistic-robot']}) do
|
||||
for _, v in pairs(t) do
|
||||
v.speed = v.speed * s
|
||||
v.energy_per_tick = tostring(tonumber(string.match(v.energy_per_tick, '[%d%.]+')) * sn) .. string.match(v.energy_per_tick, '%a+')
|
||||
v.energy_per_move = tostring(tonumber(string.match(v.energy_per_move, '[%d%.]+')) * sn) .. string.match(v.energy_per_move, '%a+')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-TRAIN'].value then
|
||||
local s = (7 + settings.startup['PHI-MI-TRAIN'].value) / 8
|
||||
|
||||
@@ -988,7 +945,7 @@ end
|
||||
** MIGRATION
|
||||
if script.active_mods['space-exploration'] then
|
||||
if technologies['se-core-miner'].researched then
|
||||
for i=2, settings.startup['PHI-MB-MINING-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-' .. i].reload()
|
||||
end
|
||||
@@ -997,20 +954,6 @@ end
|
||||
|
||||
** SETTING
|
||||
{
|
||||
type = 'int-setting',
|
||||
name = 'PHI-MI-PIPE',
|
||||
setting_type = 'startup',
|
||||
default_value = 1,
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'E04'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-MI-ROBOT',
|
||||
setting_type = 'startup',
|
||||
default_value = 1,
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'E05'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-MI-TRAIN',
|
||||
setting_type = 'startup',
|
||||
|
||||
@@ -86,6 +86,12 @@ data:extend({
|
||||
default_value = 2,
|
||||
allowed_values = {1, 2},
|
||||
order = 'D04'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-EQ-SIZE',
|
||||
setting_type = 'startup',
|
||||
default_value = false,
|
||||
order = 'D06'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-MI',
|
||||
@@ -112,6 +118,26 @@ data:extend({
|
||||
setting_type = 'startup',
|
||||
default_value = false,
|
||||
order = 'E03'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-MI-PIPE',
|
||||
setting_type = 'startup',
|
||||
default_value = 1,
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'E04'
|
||||
}, {
|
||||
type = 'int-setting',
|
||||
name = 'PHI-MI-ROBOT',
|
||||
setting_type = 'startup',
|
||||
default_value = 1,
|
||||
allowed_values = {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
order = 'E05'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-MI-ROBOT-ENERGY',
|
||||
setting_type = 'startup',
|
||||
default_value = true,
|
||||
order = 'E06'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
name = 'PHI-CT',
|
||||
|
||||
Reference in New Issue
Block a user