From 0be8e955d421b953a670482b5fcf8ed8b50ce928 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 9 Aug 2024 23:56:37 +0900 Subject: [PATCH] . --- PHI-CL/data-updates.lua | 7 +- PHI-CL/data.lua | 143 ++++++++++++++++--------------- PHI-CL/info.json | 2 +- PHI-CL/locale/en/locale.cfg | 2 + PHI-CL/locale/ja/locale.cfg | 2 + PHI-CL/locale/zh-CN/locale.cfg | 2 + PHI-CL/locale/zh-TW/locale.cfg | 2 + PHI-CL/main.lua | 32 ++++--- PHI-CL/migrations/migrations.lua | 10 ++- PHI-CL/settings.lua | 6 ++ 10 files changed, 122 insertions(+), 86 deletions(-) diff --git a/PHI-CL/data-updates.lua b/PHI-CL/data-updates.lua index 060cba7..76a151b 100644 --- a/PHI-CL/data-updates.lua +++ b/PHI-CL/data-updates.lua @@ -87,6 +87,7 @@ if settings.startup['PHI-CT'].value then local entity = table.deepcopy(data.raw['container']['steel-chest']) entity.name = 'trash-chest' entity.minable.result = 'trash-chest' + entity.inventory_type = 'with_filters_and_bar' entity.inventory_size = 1 entity.type = 'infinity-container' entity.gui_mode = 'none' @@ -166,7 +167,7 @@ if settings.startup['PHI-CT'].value then entity.minable.result = 'large-area-electric-mining-drill' entity.max_health = entity.max_health * 16 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.energy_source.emissions_per_minute = entity.energy_source.emissions_per_minute * 16 entity.module_specification.module_slots = 8 @@ -189,6 +190,10 @@ if settings.startup['PHI-CT'].value then data:extend({item}) 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.gui_mode = 'all' data:extend({entity}) diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua index 69c30c4..ac1a5db 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -3,80 +3,82 @@ local main = require 'main' local file_stage = 1 if settings.startup['PHI-CT'].value then - data:extend({{ - type = 'recipe', - name = 'wood-production', - energy_required = 10, - enabled = true, - icon = '__base__/graphics/icons/wood.png', - icon_size = 64, - icon_mipmaps = 4, - subgroup = 'intermediate-product', - order = 'za', - ingredients = {{'wood', 10}}, - results = { - { - name = 'wood', - probability = 0.5, - amount = 10 - }, - { - name = 'wood', - probability = 0.5, - amount = 10 - }, - { - name = 'wood', - probability = 0.5, - amount = 10 - }, - { - name = 'wood', - probability = 0.5, - amount = 10 + if settings.startup['PHI-CT-RECIPE'].value then + data:extend({{ + type = 'recipe', + name = 'wood-production', + energy_required = 10, + enabled = true, + icon = '__base__/graphics/icons/wood.png', + icon_size = 64, + icon_mipmaps = 4, + subgroup = 'intermediate-product', + order = 'za', + ingredients = {{'wood', 10}}, + results = { + { + name = 'wood', + probability = 0.5, + amount = 10 + }, + { + name = 'wood', + probability = 0.5, + amount = 10 + }, + { + name = 'wood', + probability = 0.5, + amount = 10 + }, + { + name = 'wood', + probability = 0.5, + amount = 10 + } } - } - }}) + }}) - data:extend({{ - type = 'recipe', - name = 'fish-production', - energy_required = 10, - enabled = true, - icon = '__base__/graphics/icons/fish.png', - icon_size = 64, - icon_mipmaps = 4, - subgroup = 'intermediate-product', - order = 'zb', - ingredients = {{'raw-fish', 10}}, - results = { - { - name = 'raw-fish', - probability = 0.5, - amount = 10 - }, - { - name = 'raw-fish', - probability = 0.5, - amount = 10 - }, - { - name = 'raw-fish', - probability = 0.5, - amount = 10 - }, - { - name = 'raw-fish', - probability = 0.5, - amount = 10 + data:extend({{ + type = 'recipe', + name = 'fish-production', + energy_required = 10, + enabled = true, + icon = '__base__/graphics/icons/fish.png', + icon_size = 64, + icon_mipmaps = 4, + subgroup = 'intermediate-product', + order = 'zb', + ingredients = {{'raw-fish', 10}}, + results = { + { + name = 'raw-fish', + probability = 0.5, + amount = 10 + }, + { + name = 'raw-fish', + probability = 0.5, + amount = 10 + }, + { + name = 'raw-fish', + probability = 0.5, + amount = 10 + }, + { + name = 'raw-fish', + probability = 0.5, + amount = 10 + } } - } - }}) + }}) - for k, v in pairs(data.raw.module) do - if v.limitation and string.find(v.name, 'productivity', 1, true) then - table.insert(v.limitation, 'wood-production') - table.insert(v.limitation, 'fish-production') + for k, v in pairs(data.raw.module) do + if v.limitation and string.find(v.name, 'productivity', 1, true) then + table.insert(v.limitation, 'wood-production') + table.insert(v.limitation, 'fish-production') + end end end end @@ -262,6 +264,7 @@ if settings.startup['PHI-MI'].value then item.order = 'b[storage]-d[basic-' .. item.order .. ']' data:extend({item}) + entity.inventory_type = 'with_filters_and_bar' entity.inventory_size = 1 entity.name = 'basic-' .. chests[i] entity.minable.result = 'basic-' .. chests[i] diff --git a/PHI-CL/info.json b/PHI-CL/info.json index 5c89f1e..b91f4d8 100644 --- a/PHI-CL/info.json +++ b/PHI-CL/info.json @@ -1,6 +1,6 @@ { "name": "PHI-CL", - "version": "2.0.14", + "version": "2.0.15", "factorio_version": "1.1", "date": "2024-08-11", "title": "Phidias Collection", diff --git a/PHI-CL/locale/en/locale.cfg b/PHI-CL/locale/en/locale.cfg index 79e3e3a..84718e6 100644 --- a/PHI-CL/locale/en/locale.cfg +++ b/PHI-CL/locale/en/locale.cfg @@ -905,7 +905,9 @@ PHI-CT-TILE=World tile PHI-CT-TILE-CHOICE=Tile choice PHI-CT-TRASH=Trash chest PHI-CT-MINER=Large miner +PHI-CT-LINKED=Linked chest PHI-CT-LOADER=Loader enable +PHI-CT-RECIPE=Recipe [mod-setting-description] PHI-EN-SOLAR-TIER=Default 8 ; Disable 1 diff --git a/PHI-CL/locale/ja/locale.cfg b/PHI-CL/locale/ja/locale.cfg index e2a452e..b441053 100644 --- a/PHI-CL/locale/ja/locale.cfg +++ b/PHI-CL/locale/ja/locale.cfg @@ -905,7 +905,9 @@ PHI-CT-TILE=ワールドタイル PHI-CT-TILE-CHOICE=ドタイル選択 PHI-CT-TRASH=ごみチェスト PHI-CT-MINER=大型電動掘削機 +PHI-CT-LINKED=リンクされたチェスト PHI-CT-LOADER=ローダーを有効にする +PHI-CT-RECIPE=レシピ [mod-setting-description] PHI-EN-SOLAR-TIER=デフォルト 8 ; 止める 1 diff --git a/PHI-CL/locale/zh-CN/locale.cfg b/PHI-CL/locale/zh-CN/locale.cfg index 82cfc3d..6e97a67 100644 --- a/PHI-CL/locale/zh-CN/locale.cfg +++ b/PHI-CL/locale/zh-CN/locale.cfg @@ -905,7 +905,9 @@ PHI-CT-TILE=世界地磚 PHI-CT-TILE-CHOICE=地磚選擇 PHI-CT-TRASH=垃圾箱 PHI-CT-MINER=大型電能採礦機 +PHI-CT-LINKED=連結箱 PHI-CT-LOADER=裝卸機啟用 +PHI-CT-RECIPE=配方 [mod-setting-description] PHI-EN-SOLAR-TIER=預設 8 ; 停用 1 diff --git a/PHI-CL/locale/zh-TW/locale.cfg b/PHI-CL/locale/zh-TW/locale.cfg index 82cfc3d..6e97a67 100644 --- a/PHI-CL/locale/zh-TW/locale.cfg +++ b/PHI-CL/locale/zh-TW/locale.cfg @@ -905,7 +905,9 @@ PHI-CT-TILE=世界地磚 PHI-CT-TILE-CHOICE=地磚選擇 PHI-CT-TRASH=垃圾箱 PHI-CT-MINER=大型電能採礦機 +PHI-CT-LINKED=連結箱 PHI-CT-LOADER=裝卸機啟用 +PHI-CT-RECIPE=配方 [mod-setting-description] PHI-EN-SOLAR-TIER=預設 8 ; 停用 1 diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index d891cf6..9cb0a89 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -359,7 +359,7 @@ function main.ER(source, tier) result_name = result_name .. '-' .. tier 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 data:extend({{ type = 'recipe', @@ -371,14 +371,26 @@ function main.ER(source, tier) }}) else - data:extend({{ - type = 'recipe', - name = new_name , - energy_required = 2, - enabled = false, - ingredients = {{name=ingredient_name, amount=1}, {name=source.name, amount=1}}, - result = result_name, - }}) + if tier > 2 then + data:extend({{ + type = 'recipe', + name = new_name , + energy_required = 2, + enabled = false, + 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 else @@ -416,7 +428,7 @@ function main.ET(source, tier) }, prerequisites = prereq, unit = { - count = 100, + count = 200 * (tier - 1), ingredients = { {'automation-science-pack', 2}, {'logistic-science-pack', 2} diff --git a/PHI-CL/migrations/migrations.lua b/PHI-CL/migrations/migrations.lua index 1652f3b..b5e7009 100644 --- a/PHI-CL/migrations/migrations.lua +++ b/PHI-CL/migrations/migrations.lua @@ -88,10 +88,12 @@ for _, force in pairs(game.forces) do end if settings.startup['PHI-CT'].value then - recipes['wood-production'].enabled = true - recipes['wood-production'].reload() - recipes['fish-production'].enabled = true - recipes['fish-production'].reload() + if settings.startup['PHI-CT-RECIPE'].value then + recipes['wood-production'].enabled = true + recipes['wood-production'].reload() + recipes['fish-production'].enabled = true + recipes['fish-production'].reload() + end if settings.startup['PHI-CT-OIL'].value then recipes['oil-pump'].enabled = true diff --git a/PHI-CL/settings.lua b/PHI-CL/settings.lua index a2793cc..f79bbaa 100644 --- a/PHI-CL/settings.lua +++ b/PHI-CL/settings.lua @@ -490,6 +490,12 @@ data:extend({ setting_type = 'startup', default_value = true, order = 'JA06' + }, { + type = 'bool-setting', + name = 'PHI-CT-RECIPE', + setting_type = 'startup', + default_value = true, + order = 'JA07' }, { type = 'bool-setting', name = 'PHI-CT-TILE',