This commit is contained in:
2024-08-09 23:56:37 +09:00
parent b26149a1bc
commit 0be8e955d4
10 changed files with 122 additions and 86 deletions

View File

@@ -87,6 +87,7 @@ if settings.startup['PHI-CT'].value then
local entity = table.deepcopy(data.raw['container']['steel-chest']) local entity = table.deepcopy(data.raw['container']['steel-chest'])
entity.name = 'trash-chest' entity.name = 'trash-chest'
entity.minable.result = 'trash-chest' entity.minable.result = 'trash-chest'
entity.inventory_type = 'with_filters_and_bar'
entity.inventory_size = 1 entity.inventory_size = 1
entity.type = 'infinity-container' entity.type = 'infinity-container'
entity.gui_mode = 'none' entity.gui_mode = 'none'
@@ -166,7 +167,7 @@ if settings.startup['PHI-CT'].value then
entity.minable.result = 'large-area-electric-mining-drill' entity.minable.result = 'large-area-electric-mining-drill'
entity.max_health = entity.max_health * 16 entity.max_health = entity.max_health * 16
entity.energy_usage = (tonumber(string.match(entity.energy_usage, '%d+')) * 16) .. 'kW' entity.energy_usage = (tonumber(string.match(entity.energy_usage, '%d+')) * 16) .. 'kW'
entity.resource_searching_radius = 12.49 entity.resource_searching_radius = 9.99
entity.mining_speed = entity.mining_speed * 16 entity.mining_speed = entity.mining_speed * 16
entity.energy_source.emissions_per_minute = entity.energy_source.emissions_per_minute * 16 entity.energy_source.emissions_per_minute = entity.energy_source.emissions_per_minute * 16
entity.module_specification.module_slots = 8 entity.module_specification.module_slots = 8
@@ -189,6 +190,10 @@ if settings.startup['PHI-CT'].value then
data:extend({item}) data:extend({item})
local entity = table.deepcopy(data.raw['linked-container']['linked-chest']) local entity = table.deepcopy(data.raw['linked-container']['linked-chest'])
entity.circuit_wire_connection_point = data.raw['container']['steel-chest'].circuit_wire_connection_point
entity.circuit_connector_sprites = data.raw['container']['steel-chest'].circuit_connector_sprites
entity.circuit_wire_max_distance = data.raw['container']['steel-chest'].circuit_wire_max_distance
entity.inventory_type = 'with_filters_and_bar'
entity.inventory_size = 48 entity.inventory_size = 48
entity.gui_mode = 'all' entity.gui_mode = 'all'
data:extend({entity}) data:extend({entity})

View File

@@ -3,80 +3,82 @@ local main = require 'main'
local file_stage = 1 local file_stage = 1
if settings.startup['PHI-CT'].value then if settings.startup['PHI-CT'].value then
data:extend({{ if settings.startup['PHI-CT-RECIPE'].value then
type = 'recipe', data:extend({{
name = 'wood-production', type = 'recipe',
energy_required = 10, name = 'wood-production',
enabled = true, energy_required = 10,
icon = '__base__/graphics/icons/wood.png', enabled = true,
icon_size = 64, icon = '__base__/graphics/icons/wood.png',
icon_mipmaps = 4, icon_size = 64,
subgroup = 'intermediate-product', icon_mipmaps = 4,
order = 'za', subgroup = 'intermediate-product',
ingredients = {{'wood', 10}}, order = 'za',
results = { ingredients = {{'wood', 10}},
{ results = {
name = 'wood', {
probability = 0.5, name = 'wood',
amount = 10 probability = 0.5,
}, amount = 10
{ },
name = 'wood', {
probability = 0.5, name = 'wood',
amount = 10 probability = 0.5,
}, amount = 10
{ },
name = 'wood', {
probability = 0.5, name = 'wood',
amount = 10 probability = 0.5,
}, amount = 10
{ },
name = 'wood', {
probability = 0.5, name = 'wood',
amount = 10 probability = 0.5,
amount = 10
}
} }
} }})
}})
data:extend({{ data:extend({{
type = 'recipe', type = 'recipe',
name = 'fish-production', name = 'fish-production',
energy_required = 10, energy_required = 10,
enabled = true, enabled = true,
icon = '__base__/graphics/icons/fish.png', icon = '__base__/graphics/icons/fish.png',
icon_size = 64, icon_size = 64,
icon_mipmaps = 4, icon_mipmaps = 4,
subgroup = 'intermediate-product', subgroup = 'intermediate-product',
order = 'zb', order = 'zb',
ingredients = {{'raw-fish', 10}}, ingredients = {{'raw-fish', 10}},
results = { results = {
{ {
name = 'raw-fish', name = 'raw-fish',
probability = 0.5, probability = 0.5,
amount = 10 amount = 10
}, },
{ {
name = 'raw-fish', name = 'raw-fish',
probability = 0.5, probability = 0.5,
amount = 10 amount = 10
}, },
{ {
name = 'raw-fish', name = 'raw-fish',
probability = 0.5, probability = 0.5,
amount = 10 amount = 10
}, },
{ {
name = 'raw-fish', name = 'raw-fish',
probability = 0.5, probability = 0.5,
amount = 10 amount = 10
}
} }
} }})
}})
for k, v in pairs(data.raw.module) do for k, v in pairs(data.raw.module) do
if v.limitation and string.find(v.name, 'productivity', 1, true) then if v.limitation and string.find(v.name, 'productivity', 1, true) then
table.insert(v.limitation, 'wood-production') table.insert(v.limitation, 'wood-production')
table.insert(v.limitation, 'fish-production') table.insert(v.limitation, 'fish-production')
end
end end
end end
end end
@@ -262,6 +264,7 @@ if settings.startup['PHI-MI'].value then
item.order = 'b[storage]-d[basic-' .. item.order .. ']' item.order = 'b[storage]-d[basic-' .. item.order .. ']'
data:extend({item}) data:extend({item})
entity.inventory_type = 'with_filters_and_bar'
entity.inventory_size = 1 entity.inventory_size = 1
entity.name = 'basic-' .. chests[i] entity.name = 'basic-' .. chests[i]
entity.minable.result = 'basic-' .. chests[i] entity.minable.result = 'basic-' .. chests[i]

View File

@@ -1,6 +1,6 @@
{ {
"name": "PHI-CL", "name": "PHI-CL",
"version": "2.0.14", "version": "2.0.15",
"factorio_version": "1.1", "factorio_version": "1.1",
"date": "2024-08-11", "date": "2024-08-11",
"title": "Phidias Collection", "title": "Phidias Collection",

View File

@@ -905,7 +905,9 @@ PHI-CT-TILE=World tile
PHI-CT-TILE-CHOICE=Tile choice PHI-CT-TILE-CHOICE=Tile choice
PHI-CT-TRASH=Trash chest PHI-CT-TRASH=Trash chest
PHI-CT-MINER=Large miner PHI-CT-MINER=Large miner
PHI-CT-LINKED=Linked chest
PHI-CT-LOADER=Loader enable PHI-CT-LOADER=Loader enable
PHI-CT-RECIPE=Recipe
[mod-setting-description] [mod-setting-description]
PHI-EN-SOLAR-TIER=Default 8 ; Disable 1 PHI-EN-SOLAR-TIER=Default 8 ; Disable 1

View File

@@ -905,7 +905,9 @@ PHI-CT-TILE=ワールドタイル
PHI-CT-TILE-CHOICE=ドタイル選択 PHI-CT-TILE-CHOICE=ドタイル選択
PHI-CT-TRASH=ごみチェスト PHI-CT-TRASH=ごみチェスト
PHI-CT-MINER=大型電動掘削機 PHI-CT-MINER=大型電動掘削機
PHI-CT-LINKED=リンクされたチェスト
PHI-CT-LOADER=ローダーを有効にする PHI-CT-LOADER=ローダーを有効にする
PHI-CT-RECIPE=レシピ
[mod-setting-description] [mod-setting-description]
PHI-EN-SOLAR-TIER=デフォルト 8 ; 止める 1 PHI-EN-SOLAR-TIER=デフォルト 8 ; 止める 1

View File

@@ -905,7 +905,9 @@ PHI-CT-TILE=世界地磚
PHI-CT-TILE-CHOICE=地磚選擇 PHI-CT-TILE-CHOICE=地磚選擇
PHI-CT-TRASH=垃圾箱 PHI-CT-TRASH=垃圾箱
PHI-CT-MINER=大型電能採礦機 PHI-CT-MINER=大型電能採礦機
PHI-CT-LINKED=連結箱
PHI-CT-LOADER=裝卸機啟用 PHI-CT-LOADER=裝卸機啟用
PHI-CT-RECIPE=配方
[mod-setting-description] [mod-setting-description]
PHI-EN-SOLAR-TIER=預設 8 ; 停用 1 PHI-EN-SOLAR-TIER=預設 8 ; 停用 1

View File

@@ -905,7 +905,9 @@ PHI-CT-TILE=世界地磚
PHI-CT-TILE-CHOICE=地磚選擇 PHI-CT-TILE-CHOICE=地磚選擇
PHI-CT-TRASH=垃圾箱 PHI-CT-TRASH=垃圾箱
PHI-CT-MINER=大型電能採礦機 PHI-CT-MINER=大型電能採礦機
PHI-CT-LINKED=連結箱
PHI-CT-LOADER=裝卸機啟用 PHI-CT-LOADER=裝卸機啟用
PHI-CT-RECIPE=配方
[mod-setting-description] [mod-setting-description]
PHI-EN-SOLAR-TIER=預設 8 ; 停用 1 PHI-EN-SOLAR-TIER=預設 8 ; 停用 1

View File

@@ -359,7 +359,7 @@ function main.ER(source, tier)
result_name = result_name .. '-' .. tier result_name = result_name .. '-' .. tier
end end
if (source.tech == 'compound-energy') and (tier > 2) then if (source.tech == 'compound-energy') then
if (source.type == 'solar-panel') or (source.type == 'accumulator') then if (source.type == 'solar-panel') or (source.type == 'accumulator') then
data:extend({{ data:extend({{
type = 'recipe', type = 'recipe',
@@ -371,14 +371,26 @@ function main.ER(source, tier)
}}) }})
else else
data:extend({{ if tier > 2 then
type = 'recipe', data:extend({{
name = new_name , type = 'recipe',
energy_required = 2, name = new_name ,
enabled = false, energy_required = 2,
ingredients = {{name=ingredient_name, amount=1}, {name=source.name, amount=1}}, enabled = false,
result = result_name, ingredients = {{name=ingredient_name, amount=1}, {name=source.name, amount=1}},
}}) result = result_name,
}})
else
data:extend({{
type = 'recipe',
name = new_name ,
energy_required = 2,
enabled = false,
ingredients = {{name=ingredient_name, amount=2}},
result = result_name,
}})
end
end end
else else
@@ -416,7 +428,7 @@ function main.ET(source, tier)
}, },
prerequisites = prereq, prerequisites = prereq,
unit = { unit = {
count = 100, count = 200 * (tier - 1),
ingredients = { ingredients = {
{'automation-science-pack', 2}, {'automation-science-pack', 2},
{'logistic-science-pack', 2} {'logistic-science-pack', 2}

View File

@@ -88,10 +88,12 @@ for _, force in pairs(game.forces) do
end end
if settings.startup['PHI-CT'].value then if settings.startup['PHI-CT'].value then
recipes['wood-production'].enabled = true if settings.startup['PHI-CT-RECIPE'].value then
recipes['wood-production'].reload() recipes['wood-production'].enabled = true
recipes['fish-production'].enabled = true recipes['wood-production'].reload()
recipes['fish-production'].reload() recipes['fish-production'].enabled = true
recipes['fish-production'].reload()
end
if settings.startup['PHI-CT-OIL'].value then if settings.startup['PHI-CT-OIL'].value then
recipes['oil-pump'].enabled = true recipes['oil-pump'].enabled = true

View File

@@ -490,6 +490,12 @@ data:extend({
setting_type = 'startup', setting_type = 'startup',
default_value = true, default_value = true,
order = 'JA06' order = 'JA06'
}, {
type = 'bool-setting',
name = 'PHI-CT-RECIPE',
setting_type = 'startup',
default_value = true,
order = 'JA07'
}, { }, {
type = 'bool-setting', type = 'bool-setting',
name = 'PHI-CT-TILE', name = 'PHI-CT-TILE',