mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-07-28 21:42:30 +09:00
.
This commit is contained in:
@@ -16,7 +16,7 @@ local function spoil_freeze_handle(i)
|
|||||||
item.icon = nil
|
item.icon = nil
|
||||||
item.icon_size = nil
|
item.icon_size = nil
|
||||||
item.icon_mipmaps = nil
|
item.icon_mipmaps = nil
|
||||||
item.spoil_ticks = (i.spoil_ticks and math.floor(i.spoil_ticks * settings.startup['PHI-SA-SPOIL-FREEZE-MULTIPLIER'].value / 10)) or nil
|
item.spoil_ticks = (i.spoil_ticks and math.floor(i.spoil_ticks * settings.startup['PHI-SA-SPOIL-FREEZE'].value / 10)) or nil
|
||||||
item.spoil_result = (i.spoil_ticks and i.name) or nil
|
item.spoil_result = (i.spoil_ticks and i.name) or nil
|
||||||
item.spoil_to_trigger_result = nil
|
item.spoil_to_trigger_result = nil
|
||||||
item.localised_name = {'item-name.' .. i.name}
|
item.localised_name = {'item-name.' .. i.name}
|
||||||
@@ -59,7 +59,7 @@ end
|
|||||||
-- SA C 1 SPACE_AGE TOOL
|
-- SA C 1 SPACE_AGE TOOL
|
||||||
do
|
do
|
||||||
local spoil_set = (settings.startup['PHI-SA'].value and not settings.startup['PHI-SA-SPOIL'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value ~= '')
|
local spoil_set = (settings.startup['PHI-SA'].value and not settings.startup['PHI-SA-SPOIL'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value ~= '')
|
||||||
local spoil_freeze_set = settings.startup['PHI-SA'].value and settings.startup['PHI-SA-SPOIL'].value and settings.startup['PHI-SA-SPOIL-FREEZE-MULTIPLIER'].value and settings.startup['PHI-SA-SPOIL-FREEZE-MULTIPLIER'].value > 0
|
local spoil_freeze_set = settings.startup['PHI-SA'].value and settings.startup['PHI-SA-SPOIL'].value and settings.startup['PHI-SA-SPOIL-FREEZE'].value and settings.startup['PHI-SA-SPOIL-FREEZE'].value > 0
|
||||||
|
|
||||||
for _, v in pairs({'nutrients', 'captive-biter-spawner', 'biter-egg', 'pentapod-egg', 'agricultural-science-pack'}) do
|
for _, v in pairs({'nutrients', 'captive-biter-spawner', 'biter-egg', 'pentapod-egg', 'agricultural-science-pack'}) do
|
||||||
if spoil_set then
|
if spoil_set then
|
||||||
|
|||||||
@@ -2,28 +2,5 @@ return {
|
|||||||
['hide'] = {
|
['hide'] = {
|
||||||
['parameters'] = true,
|
['parameters'] = true,
|
||||||
['spawnables'] = true,
|
['spawnables'] = true,
|
||||||
},
|
|
||||||
['status'] = {
|
|
||||||
['disabled'] = {r = 255, g = 0, b = 0},
|
|
||||||
['idle'] = {r = 255, g = 0, b = 0},
|
|
||||||
['insufficient_input'] = {r = 255, g = 0, b = 0},
|
|
||||||
['no_minable_resources'] = {r = 255, g = 0, b = 0},
|
|
||||||
['no_power'] = {r = 255, g = 0, b = 0},
|
|
||||||
['low_power'] = {r = 255, g = 128, b = 0},
|
|
||||||
['full_output'] = {r = 255, g = 255, b = 0},
|
|
||||||
['working'] = {r = 0, g = 255, b = 0},
|
|
||||||
},
|
|
||||||
['status_ignore'] = {
|
|
||||||
-- Mining Drones
|
|
||||||
['mining-depot'] = true,
|
|
||||||
-- Transport Drones
|
|
||||||
['buffer-depot'] = true,
|
|
||||||
['fluid-depot'] = true,
|
|
||||||
['fuel-depot'] = true,
|
|
||||||
['request-depot'] = true,
|
|
||||||
['supply-depot'] = true,
|
|
||||||
-- Space Exploration
|
|
||||||
['se-core-miner'] = true,
|
|
||||||
['se-rocket-launch-pad-silo'] = true,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,84 +22,6 @@ if items['hide'] and (data.raw['infinity-container']['super-infinity-chest'] or
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- MIG C 11 BASE ENTITY
|
|
||||||
-- MIG C 1 RECYCLER ENTITY
|
|
||||||
-- MIG C 7 SPACE_AGE ENTITY
|
|
||||||
if settings.startup['PHI-CT-STATUS'].value and items['status'] and items['status_ignore'] then
|
|
||||||
function main_entity_number_position(entity)
|
|
||||||
local box = entity.selection_box or entity.collision_box
|
|
||||||
|
|
||||||
if not box then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not box.left_top and not box.right_bottom and type(box[1]) == 'table' and type(box[2]) == 'table' then
|
|
||||||
box = {
|
|
||||||
left_top = {x = box[1][1], y = box[1][2]},
|
|
||||||
right_bottom = {x = box[2][1], y = box[2][2]}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
local w = box.right_bottom.x - box.left_top.x
|
|
||||||
local h = box.right_bottom.y - box.left_top.y
|
|
||||||
local cx = (box.left_top.x + box.right_bottom.x) / 2
|
|
||||||
local cy = (box.left_top.y + box.right_bottom.y) / 2
|
|
||||||
|
|
||||||
local positions = {
|
|
||||||
[1] = {
|
|
||||||
x = cx - 0.2 * w,
|
|
||||||
y = cy + h / 2 - 0.25
|
|
||||||
},
|
|
||||||
[2] = {
|
|
||||||
x = cx - 0.2 * h,
|
|
||||||
y = cy + w / 2 - 0.25
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return positions
|
|
||||||
end
|
|
||||||
|
|
||||||
for _, c in pairs({'assembling-machine', 'furnace', 'mining-drill'}) do
|
|
||||||
for _, v in pairs(data.raw[c]) do
|
|
||||||
if not v.bottleneck_ignore and not items['status_ignore'][v.name] then
|
|
||||||
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do
|
|
||||||
if v[a] then
|
|
||||||
v[a].status_colors = items['status']
|
|
||||||
|
|
||||||
if not v[a].working_visualisations then
|
|
||||||
v[a].working_visualisations = {}
|
|
||||||
end
|
|
||||||
|
|
||||||
local positions = main_entity_number_position(v)
|
|
||||||
|
|
||||||
if positions then
|
|
||||||
v[a].working_visualisations[#v[a].working_visualisations + 1] = {
|
|
||||||
always_draw = true,
|
|
||||||
apply_tint = 'status',
|
|
||||||
render_layer = 'light-effect',
|
|
||||||
animation = {
|
|
||||||
filename = '__base__/graphics/icons/signal/signal_white.png',
|
|
||||||
flags = {'icon'},
|
|
||||||
size = 64,
|
|
||||||
scale = 0.15,
|
|
||||||
line_length = 1,
|
|
||||||
frame_count = 1,
|
|
||||||
animation_speed = 1,
|
|
||||||
draw_as_glow = true
|
|
||||||
},
|
|
||||||
north_position = positions[1],
|
|
||||||
east_position = positions[2],
|
|
||||||
south_position = positions[1],
|
|
||||||
west_position = positions[2],
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- CT A 1 BASE MAP_GEN_PRESET
|
-- CT A 1 BASE MAP_GEN_PRESET
|
||||||
if settings.startup['PHI-CT-TILE'].value then
|
if settings.startup['PHI-CT-TILE'].value then
|
||||||
local autoplace_setting_decorative = {}
|
local autoplace_setting_decorative = {}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
['status'] = {
|
||||||
|
['disabled'] = {r = 255, g = 0, b = 0},
|
||||||
|
['idle'] = {r = 255, g = 0, b = 0},
|
||||||
|
['insufficient_input'] = {r = 255, g = 0, b = 0},
|
||||||
|
['no_minable_resources'] = {r = 255, g = 0, b = 0},
|
||||||
|
['no_power'] = {r = 255, g = 0, b = 0},
|
||||||
|
['low_power'] = {r = 255, g = 128, b = 0},
|
||||||
|
['full_output'] = {r = 255, g = 255, b = 0},
|
||||||
|
['working'] = {r = 0, g = 255, b = 0},
|
||||||
|
},
|
||||||
|
['status_ignore'] = {
|
||||||
|
-- Mining Drones
|
||||||
|
['mining-depot'] = true,
|
||||||
|
-- Transport Drones
|
||||||
|
['buffer-depot'] = true,
|
||||||
|
['fluid-depot'] = true,
|
||||||
|
['fuel-depot'] = true,
|
||||||
|
['request-depot'] = true,
|
||||||
|
['supply-depot'] = true,
|
||||||
|
-- Space Exploration
|
||||||
|
['se-core-miner'] = true,
|
||||||
|
['se-rocket-launch-pad-silo'] = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
local items = require('mi-c')
|
||||||
|
|
||||||
|
|
||||||
|
-- MI C 11 BASE ENTITY
|
||||||
|
-- MI C 1 RECYCLER ENTITY
|
||||||
|
-- MI C 7 SPACE_AGE ENTITY
|
||||||
|
if settings.startup['PHI-CT-STATUS'].value and items['status'] and items['status_ignore'] then
|
||||||
|
function main_entity_number_position(entity)
|
||||||
|
local box = entity.selection_box or entity.collision_box
|
||||||
|
|
||||||
|
if not box then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not box.left_top and not box.right_bottom and type(box[1]) == 'table' and type(box[2]) == 'table' then
|
||||||
|
box = {
|
||||||
|
left_top = {x = box[1][1], y = box[1][2]},
|
||||||
|
right_bottom = {x = box[2][1], y = box[2][2]}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local w = box.right_bottom.x - box.left_top.x
|
||||||
|
local h = box.right_bottom.y - box.left_top.y
|
||||||
|
local cx = (box.left_top.x + box.right_bottom.x) / 2
|
||||||
|
local cy = (box.left_top.y + box.right_bottom.y) / 2
|
||||||
|
|
||||||
|
local positions = {
|
||||||
|
[1] = {
|
||||||
|
x = cx - 0.2 * w,
|
||||||
|
y = cy + h / 2 - 0.25
|
||||||
|
},
|
||||||
|
[2] = {
|
||||||
|
x = cx - 0.2 * h,
|
||||||
|
y = cy + w / 2 - 0.25
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return positions
|
||||||
|
end
|
||||||
|
|
||||||
|
for _, c in pairs({'assembling-machine', 'furnace', 'mining-drill'}) do
|
||||||
|
for _, v in pairs(data.raw[c]) do
|
||||||
|
if not v.bottleneck_ignore and not items['status_ignore'][v.name] then
|
||||||
|
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do
|
||||||
|
if v[a] then
|
||||||
|
v[a].status_colors = items['status']
|
||||||
|
|
||||||
|
if not v[a].working_visualisations then
|
||||||
|
v[a].working_visualisations = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local positions = main_entity_number_position(v)
|
||||||
|
|
||||||
|
if positions then
|
||||||
|
v[a].working_visualisations[#v[a].working_visualisations + 1] = {
|
||||||
|
always_draw = true,
|
||||||
|
apply_tint = 'status',
|
||||||
|
render_layer = 'light-effect',
|
||||||
|
animation = {
|
||||||
|
filename = '__base__/graphics/icons/signal/signal_white.png',
|
||||||
|
flags = {'icon'},
|
||||||
|
size = 64,
|
||||||
|
scale = 0.15,
|
||||||
|
line_length = 1,
|
||||||
|
frame_count = 1,
|
||||||
|
animation_speed = 1,
|
||||||
|
draw_as_glow = true
|
||||||
|
},
|
||||||
|
north_position = positions[1],
|
||||||
|
east_position = positions[2],
|
||||||
|
south_position = positions[1],
|
||||||
|
west_position = positions[2],
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -56,19 +56,19 @@ PHI-MB-EQUIPMENT-SIZE=Small equipment
|
|||||||
|
|
||||||
PHI-MI=Miscellaneous Item
|
PHI-MI=Miscellaneous Item
|
||||||
PHI-MI-GENERIC=Generic
|
PHI-MI-GENERIC=Generic
|
||||||
|
PHI-MI-STATUS=Entity Status Light
|
||||||
PHI-MI-ROBOT-ENERGY=Nuclear fussion robot
|
PHI-MI-ROBOT-ENERGY=Nuclear fussion robot
|
||||||
PHI-MI-PIPE-EXTENT=Pipe Extent
|
PHI-MI-PIPE-EXTENT=Pipe Extent
|
||||||
|
|
||||||
PHI-SA=Space Age
|
PHI-SA=Space Age
|
||||||
PHI-SA-SPOIL=Spoilage
|
PHI-SA-SPOIL=Spoilage
|
||||||
PHI-SA-SPOIL-FREEZE-MULTIPLIER=Freeze spoilage
|
PHI-SA-SPOIL-FREEZE=Freeze spoilage
|
||||||
PHI-SA-QUALITY=Quality chance
|
|
||||||
PHI-SA-ROCKET-CAPACITY=Rocket capacity
|
PHI-SA-ROCKET-CAPACITY=Rocket capacity
|
||||||
|
PHI-SA-QUALITY=Quality chance
|
||||||
|
|
||||||
PHI-GM=Game Mode
|
PHI-GM=Game Mode
|
||||||
|
|
||||||
PHI-CT=Creative Tool
|
PHI-CT=Creative Tool
|
||||||
PHI-CT-STATUS=Entity Status Light
|
|
||||||
PHI-CT-TILE=Map generation world tile
|
PHI-CT-TILE=Map generation world tile
|
||||||
PHI-CT-TILE-CHOICE=Map generation tile choice
|
PHI-CT-TILE-CHOICE=Map generation tile choice
|
||||||
|
|
||||||
|
|||||||
@@ -51,19 +51,19 @@ PHI-MB-EQUIPMENT-SIZE=小さなアーマー設備
|
|||||||
|
|
||||||
PHI-MI=その他の変更
|
PHI-MI=その他の変更
|
||||||
PHI-MI-GENERIC=ジェネリック
|
PHI-MI-GENERIC=ジェネリック
|
||||||
|
PHI-MI-STATUS=エンティティ状態ランプ
|
||||||
PHI-MI-ROBOT-ENERGY=核融合ロボット
|
PHI-MI-ROBOT-ENERGY=核融合ロボット
|
||||||
PHI-MI-PIPE-EXTENT=パイプ範囲
|
PHI-MI-PIPE-EXTENT=パイプ範囲
|
||||||
|
|
||||||
PHI-SA=Space Age
|
PHI-SA=Space Age
|
||||||
PHI-SA-SPOIL=変質
|
PHI-SA-SPOIL=変質
|
||||||
PHI-SA-SPOIL-FREEZE-MULTIPLIER=変質凍結
|
PHI-SA-SPOIL-FREEZE=変質凍結
|
||||||
PHI-SA-QUALITY=品質確率
|
|
||||||
PHI-SA-ROCKET-CAPACITY=ロケット容量
|
PHI-SA-ROCKET-CAPACITY=ロケット容量
|
||||||
|
PHI-SA-QUALITY=品質確率
|
||||||
|
|
||||||
PHI-GM=ゲームモード
|
PHI-GM=ゲームモード
|
||||||
|
|
||||||
PHI-CT=クリエイティブテストツール
|
PHI-CT=クリエイティブテストツール
|
||||||
PHI-CT-STATUS=エンティティ状態ランプ
|
|
||||||
PHI-CT-TILE=マップ生成ワールドタイル
|
PHI-CT-TILE=マップ生成ワールドタイル
|
||||||
PHI-CT-TILE-CHOICE=マップ生成ドタイル選択
|
PHI-CT-TILE-CHOICE=マップ生成ドタイル選択
|
||||||
|
|
||||||
|
|||||||
@@ -51,19 +51,19 @@ PHI-MB-EQUIPMENT-SIZE=小型裝甲裝備
|
|||||||
|
|
||||||
PHI-MI=雜項變更
|
PHI-MI=雜項變更
|
||||||
PHI-MI-GENERIC=通用優化
|
PHI-MI-GENERIC=通用優化
|
||||||
|
PHI-MI-STATUS=實體狀態指示燈
|
||||||
PHI-MI-ROBOT-ENERGY=核融合無人機
|
PHI-MI-ROBOT-ENERGY=核融合無人機
|
||||||
PHI-MI-PIPE-EXTENT=管道長度
|
PHI-MI-PIPE-EXTENT=管道長度
|
||||||
|
|
||||||
PHI-SA=太空時代
|
PHI-SA=太空時代
|
||||||
PHI-SA-SPOIL=變質
|
PHI-SA-SPOIL=變質
|
||||||
PHI-SA-SPOIL-FREEZE-MULTIPLIER=變質凍結
|
PHI-SA-SPOIL-FREEZE=變質凍結
|
||||||
PHI-SA-QUALITY=品質概率
|
|
||||||
PHI-SA-ROCKET-CAPACITY=火箭容量
|
PHI-SA-ROCKET-CAPACITY=火箭容量
|
||||||
|
PHI-SA-QUALITY=品質概率
|
||||||
|
|
||||||
PHI-GM=遊戲模式
|
PHI-GM=遊戲模式
|
||||||
|
|
||||||
PHI-CT=創意工具
|
PHI-CT=創意工具
|
||||||
PHI-CT-STATUS=實體狀態指示燈
|
|
||||||
PHI-CT-TILE=地圖生成世界地磚
|
PHI-CT-TILE=地圖生成世界地磚
|
||||||
PHI-CT-TILE-CHOICE=地圖生成世界地磚選擇
|
PHI-CT-TILE-CHOICE=地圖生成世界地磚選擇
|
||||||
|
|
||||||
|
|||||||
@@ -51,19 +51,19 @@ PHI-MB-EQUIPMENT-SIZE=小型裝甲裝備
|
|||||||
|
|
||||||
PHI-MI=雜項變更
|
PHI-MI=雜項變更
|
||||||
PHI-MI-GENERIC=通用優化
|
PHI-MI-GENERIC=通用優化
|
||||||
|
PHI-MI-STATUS=實體狀態指示燈
|
||||||
PHI-MI-ROBOT-ENERGY=核融合無人機
|
PHI-MI-ROBOT-ENERGY=核融合無人機
|
||||||
PHI-MI-PIPE-EXTENT=管道長度
|
PHI-MI-PIPE-EXTENT=管道長度
|
||||||
|
|
||||||
PHI-SA=太空時代
|
PHI-SA=太空時代
|
||||||
PHI-SA-SPOIL=變質
|
PHI-SA-SPOIL=變質
|
||||||
PHI-SA-SPOIL-FREEZE-MULTIPLIER=變質凍結
|
PHI-SA-SPOIL-FREEZE=變質凍結
|
||||||
PHI-SA-QUALITY=品質概率
|
|
||||||
PHI-SA-ROCKET-CAPACITY=火箭容量
|
PHI-SA-ROCKET-CAPACITY=火箭容量
|
||||||
|
PHI-SA-QUALITY=品質概率
|
||||||
|
|
||||||
PHI-GM=遊戲模式
|
PHI-GM=遊戲模式
|
||||||
|
|
||||||
PHI-CT=創意工具
|
PHI-CT=創意工具
|
||||||
PHI-CT-STATUS=實體狀態指示燈
|
|
||||||
PHI-CT-TILE=地圖生成世界地磚
|
PHI-CT-TILE=地圖生成世界地磚
|
||||||
PHI-CT-TILE-CHOICE=地圖生成世界地磚選擇
|
PHI-CT-TILE-CHOICE=地圖生成世界地磚選擇
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -119,12 +119,12 @@ data:extend({
|
|||||||
order = 'C01'
|
order = 'C01'
|
||||||
}, {
|
}, {
|
||||||
type = 'int-setting',
|
type = 'int-setting',
|
||||||
name = 'PHI-SA-SPOIL-FREEZE-MULTIPLIER',
|
name = 'PHI-SA-SPOIL-FREEZE',
|
||||||
setting_type = 'startup',
|
setting_type = 'startup',
|
||||||
default_value = 50,
|
default_value = 50,
|
||||||
minimum_value = 0,
|
minimum_value = 0,
|
||||||
maximum_value = 1000,
|
maximum_value = 1000,
|
||||||
localised_name = {'phi-cl.setting-class-color', 'SA2', {'phi-cl.ratio'}, {'mod-setting-name.PHI-SA-SPOIL-FREEZE-MULTIPLIER'}},
|
localised_name = {'phi-cl.setting-class-color', 'SA2', {'phi-cl.ratio'}, {'mod-setting-name.PHI-SA-SPOIL-FREEZE'}},
|
||||||
localised_description = (mods['space-age'] and {'', '[item=ice][virtual-signal=signal-clock] x0.1', {'phi-cl.setting-change-color', '\n[55] A55'}}) or nil,
|
localised_description = (mods['space-age'] and {'', '[item=ice][virtual-signal=signal-clock] x0.1', {'phi-cl.setting-change-color', '\n[55] A55'}}) or nil,
|
||||||
order = 'C02'
|
order = 'C02'
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
Reference in New Issue
Block a user