From 0b7661adaf547e1cd4ba7f4eb111f7e1652eccda Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 24 Sep 2024 23:10:26 +0900 Subject: [PATCH] . --- PHI-CL/config.lua | 10 ++++++ PHI-CL/data.lua | 54 ++++++++++++++++++++++++++++++-- PHI-CL/info.json | 4 +-- PHI-CL/locale/en/locale.cfg | 18 +++++++++++ PHI-CL/locale/ja/locale.cfg | 19 +++++++++++ PHI-CL/locale/zh-CN/locale.cfg | 18 +++++++++++ PHI-CL/locale/zh-TW/locale.cfg | 18 +++++++++++ PHI-CL/main.lua | 8 +++++ PHI-CL/migrations/migrations.lua | 17 +++++++--- 9 files changed, 156 insertions(+), 10 deletions(-) diff --git a/PHI-CL/config.lua b/PHI-CL/config.lua index c14a52d..9201a8b 100644 --- a/PHI-CL/config.lua +++ b/PHI-CL/config.lua @@ -186,6 +186,16 @@ local items = { min = 2, max = settings.startup['PHI-MB-CENTRIFUGE-TIER'].value }, + ['rocket-silo'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 1, + type = 'rocket-silo', + name = 'rocket-silo', + ref_name = 'rocket-silo', + tech = 'rocket-silo', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + }, ['lab'] = { enabled = settings.startup['PHI-MB'].value, stage = 1, diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua index dc87098..e9919cf 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -403,7 +403,6 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRAIN'].value t item.burnt_result = 'empty-train-battery' item.fuel_value = '1GJ' item.icon = graphics_location .. 'battery.png' - item.order = 'qb' item.stack_size = 10 data:extend({item}) @@ -416,7 +415,6 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRAIN'].value t icon_size = 64, icon_mipmaps = 4, subgroup = 'intermediate-product', - order = 'zd', ingredients = {{'empty-train-battery', 1}}, results = { { @@ -435,6 +433,54 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRAIN'].value t data.raw['locomotive']['locomotive'].burner.burnt_inventory_size = 1 end +if settings.startup['PHI-MB'].value then + local recipe_multiplier = {2, 4} + + for j=1, #recipe_multiplier, 1 do + item = table.deepcopy(data.raw['item']['satellite']) + item.name = 'satellite-' .. (j + 1) + item.rocket_launch_product = {type='item', name='space-science-pack', amount=1000 * recipe_multiplier[j]} + item.icons = { + { + icon = '__base__/graphics/icons/satellite.png', + tint = items['tint'][j + 1], + icon_size = 64, + icon_mipmaps = 4 + } + } + item.order = 'm[satellite]-' .. (j + 1) + + data:extend({item}) + + data:extend({{ + type = 'recipe', + name = 'satellite-' .. (j + 1), + energy_required = 5 * recipe_multiplier[j], + enabled = false, + icon = '__base__/graphics/icons/satellite.png', + icon_size = 64, + icon_mipmaps = 4, + category = 'crafting', + ingredients = { + {'low-density-structure', 100 * recipe_multiplier[j]}, + {'solar-panel', 100 * recipe_multiplier[j]}, + {'accumulator', 100 * recipe_multiplier[j]}, + {'radar', 5 * recipe_multiplier[j]}, + {'processing-unit', 100 * recipe_multiplier[j]}, + {'rocket-fuel', 50 * recipe_multiplier[j]} + }, + results = { + { + name = 'satellite-' .. (j + 1), + amount = 1 + } + } + }}) + + table.insert(data.raw.technology['space-science-pack'].effects, {type='unlock-recipe', recipe='satellite-' .. (j + 1)}) + end +end + if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-REPAIR'].value then data.raw['repair-tool']['repair-pack'].speed = 2 * settings.startup['PHI-MI-REPAIR'].value data.raw['repair-tool']['repair-pack'].durability = 300 * settings.startup['PHI-MI-REPAIR'].value @@ -474,8 +520,9 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ROBOT'].value t data.raw['roboport']['roboport'].energy_usage = 50 * settings.startup['PHI-MI-ROBOT'].value .. 'kW' data.raw['roboport']['roboport'].energy_source.input_flow_limit = (10 * settings.startup['PHI-MI-ROBOT'].value) .. 'MW' data.raw['roboport']['roboport'].energy_source.buffer_capacity = (200 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ' - data.raw['roboport']['roboport'].recharge_minimum = (80 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ' + data.raw['roboport']['roboport'].recharge_minimum = (40 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ' data.raw['roboport']['roboport'].charging_energy = (5 * settings.startup['PHI-MI-ROBOT'].value) .. 'MW' + data.raw['roboport']['roboport'].material_slots_count = 2 -- data.raw['roboport']['roboport'].logistics_radius = 25 -- data.raw['roboport']['roboport'].construction_radius = 55 data.raw['roboport']['roboport'].charging_offsets = { @@ -591,6 +638,7 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-CHEST'].value t entity.inventory_type = 'with_filters_and_bar' entity.inventory_size = 1 + entity.max_logistic_slots = 1 entity.name = 'basic-' .. chests[i] entity.minable.result = 'basic-' .. chests[i] data:extend({entity}) diff --git a/PHI-CL/info.json b/PHI-CL/info.json index 549a979..4d2ca19 100644 --- a/PHI-CL/info.json +++ b/PHI-CL/info.json @@ -1,8 +1,8 @@ { "name": "PHI-CL", - "version": "2.0.36", + "version": "2.0.38", "factorio_version": "1.1", - "date": "2024-09-19", + "date": "2024-09-25", "title": "Phidias Collection", "author": "PHIDIAS0303", "contributers": "", diff --git a/PHI-CL/locale/en/locale.cfg b/PHI-CL/locale/en/locale.cfg index b162a09..22850ac 100644 --- a/PHI-CL/locale/en/locale.cfg +++ b/PHI-CL/locale/en/locale.cfg @@ -330,6 +330,12 @@ empty-train-battery=Empty train battery charged-train-battery=Charged train battery +rocket-silo-2=Rocket silo 2 +rocket-silo-3=Rocket silo 3 + +satellite-2=Satellite 2 +satellite-3=Satellite 3 + [item-description] solar-panel-mk2-equipment=Provides power for equipment modules. solar-panel-mk3-equipment=Provides power for equipment modules. @@ -382,6 +388,9 @@ exoskeleton-mk2-equipment=Inserted into armor to increase movement speed. You ca power-armor-mk3=Armor with a huge equipment grid and inventory size bonus. +satellite-2=The satellite should be put into the rocket. +satellite-3=The satellite should be put into the rocket. + [entity-name] accumulator-2=Accumulator 2 accumulator-3=Accumulator 3 @@ -659,6 +668,9 @@ large-area-electric-mining-drill=Large area electric mining drill passive-energy-void=Passive energy void +rocket-silo-2=Rocket silo 2 +rocket-silo-3=Rocket silo 3 + [entity-description] accumulator-2=Stores a limited amount of energy when available production exceeds demand, and releases it in the opposite case. accumulator-3=Stores a limited amount of energy when available production exceeds demand, and releases it in the opposite case. @@ -919,6 +931,9 @@ super-radar=Scans the nearby sectors, and actively reveals an area around it. large-area-electric-mining-drill=Large area electric mining drill +rocket-silo-2=Allows you to launch a rocket into space and win the game. +rocket-silo-3=Allows you to launch a rocket into space and win the game. + [equipment-name] solar-panel-mk2-equipment=Portable solar panel MK2 solar-panel-mk3-equipment=Portable solar panel MK3 @@ -1002,6 +1017,9 @@ empty-train-battery=Empty train battery charged-train-battery=Charged train battery +satellite-2=Satellite 2 +satellite-3=Satellite 3 + [technology-name] compound-energy=Compound energy compound-energy-1=Compound energy diff --git a/PHI-CL/locale/ja/locale.cfg b/PHI-CL/locale/ja/locale.cfg index c2441ec..f8eca27 100644 --- a/PHI-CL/locale/ja/locale.cfg +++ b/PHI-CL/locale/ja/locale.cfg @@ -330,6 +330,12 @@ empty-train-battery=空の列車バッテリー charged-train-battery=充電済み列車用バッテリー +rocket-silo-2=ロケットサイロ 2 +rocket-silo-3=ロケットサイロ 3 + +satellite-2=衛星 2 +satellite-3=衛星 3 + [item-description] solar-panel-mk2-equipment=装備用モジュールに電力を供給します。 solar-panel-mk3-equipment=装備用モジュールに電力を供給します。 @@ -382,6 +388,9 @@ exoskeleton-equipment-mk2=プレイヤーの移動速度を上昇させます。 power-armor-mk3=巨大な装備グリッドとインベントリサイズボーナス付きアーマー。 +satellite-2=衛星はロケットに積んでください。 +satellite-3=衛星はロケットに積んでください。 + [entity-name] accumulator-2=蓄電池 2 accumulator-3=蓄電池 3 @@ -659,6 +668,9 @@ large-area-electric-mining-drill=大型電動掘削機 passive-energy-void=パッシブエネルギーボイド +rocket-silo-2=ロケットサイロ 2 +rocket-silo-3=ロケットサイロ 3 + [entity-description] accumulator-2=供給可能な電力が需要量を上回っている時に電力を貯蔵します。需要量が上回っている場合は放電します。 accumulator-3=供給可能な電力が需要量を上回っている時に電力を貯蔵します。需要量が上回っている場合は放電します。 @@ -919,6 +931,9 @@ super-radar=近隣の領域をスキャンし、その周囲のエリアを探 large-area-electric-mining-drill=大型電動掘削機 +rocket-silo-2=ロケットを打ち上げればゲームクリアです。 +rocket-silo-3=ロケットを打ち上げればゲームクリアです。 + [equipment-name] solar-panel-mk2-equipment=携帯ソーラーパネルモジュール2代目 solar-panel-mk3-equipment=携帯ソーラーパネルモジュール3代目 @@ -1002,6 +1017,10 @@ empty-train-battery=空の列車バッテリー charged-train-battery=充電済み列車用バッテリー +satellite-2=衛星 2 +satellite-3=衛星 3 +satellite-4=衛星 4 + [technology-name] compound-energy=複合発電 compound-energy-1=複合発電 diff --git a/PHI-CL/locale/zh-CN/locale.cfg b/PHI-CL/locale/zh-CN/locale.cfg index 9bf1d64..c3abfe9 100644 --- a/PHI-CL/locale/zh-CN/locale.cfg +++ b/PHI-CL/locale/zh-CN/locale.cfg @@ -330,6 +330,12 @@ empty-train-battery=空火車電池 charged-train-battery=已充電火車電池 +rocket-silo-2=火箭發射井 2 +rocket-silo-3=火箭發射井 3 + +satellite-2=衛星 2 +satellite-3=衛星 3 + [item-description] solar-panel-mk2-equipment=替裝備的模組供電。 solar-panel-mk3-equipment=替裝備的模組供電。 @@ -382,6 +388,9 @@ exoskeleton-equipment-mk2=用於插入模組化裝甲,可提高玩家的移動 power-armor-mk3=具有巨大模組化插槽和背包容量加成的裝甲。 +satellite-2=此衛星應放入火箭內。 +satellite-3=此衛星應放入火箭內。 + [entity-name] accumulator-2=蓄電池 2 accumulator-3=蓄電池 3 @@ -659,6 +668,9 @@ large-area-electric-mining-drill=大型電能採礦機 passive-energy-void=被動能量消除器 +rocket-silo-2=火箭發射井 2 +rocket-silo-3=火箭發射井 3 + [entity-description] accumulator-2=在發電超出用電量時,可儲存有限電力;反之則會釋放電力。 accumulator-3=在發電超出用電量時,可儲存有限電力;反之則會釋放電力。 @@ -919,6 +931,9 @@ super-radar=掃描並顯示附近的未知區域。 large-area-electric-mining-drill=大型電能採礦機 +rocket-silo-2=用來製造及發射火箭。發射火箭將獲勝。 +rocket-silo-3=用來製造及發射火箭。發射火箭將獲勝。 + [equipment-name] solar-panel-mk2-equipment=攜帶式太陽能板2代 solar-panel-mk3-equipment=攜帶式太陽能板3代 @@ -1002,6 +1017,9 @@ empty-train-battery=空火車電池 charged-train-battery=已充電火車電池 +satellite-2=衛星 2 +satellite-3=衛星 3 + [technology-name] compound-energy=複合發電 compound-energy-1=複合發電 diff --git a/PHI-CL/locale/zh-TW/locale.cfg b/PHI-CL/locale/zh-TW/locale.cfg index 9bf1d64..c3abfe9 100644 --- a/PHI-CL/locale/zh-TW/locale.cfg +++ b/PHI-CL/locale/zh-TW/locale.cfg @@ -330,6 +330,12 @@ empty-train-battery=空火車電池 charged-train-battery=已充電火車電池 +rocket-silo-2=火箭發射井 2 +rocket-silo-3=火箭發射井 3 + +satellite-2=衛星 2 +satellite-3=衛星 3 + [item-description] solar-panel-mk2-equipment=替裝備的模組供電。 solar-panel-mk3-equipment=替裝備的模組供電。 @@ -382,6 +388,9 @@ exoskeleton-equipment-mk2=用於插入模組化裝甲,可提高玩家的移動 power-armor-mk3=具有巨大模組化插槽和背包容量加成的裝甲。 +satellite-2=此衛星應放入火箭內。 +satellite-3=此衛星應放入火箭內。 + [entity-name] accumulator-2=蓄電池 2 accumulator-3=蓄電池 3 @@ -659,6 +668,9 @@ large-area-electric-mining-drill=大型電能採礦機 passive-energy-void=被動能量消除器 +rocket-silo-2=火箭發射井 2 +rocket-silo-3=火箭發射井 3 + [entity-description] accumulator-2=在發電超出用電量時,可儲存有限電力;反之則會釋放電力。 accumulator-3=在發電超出用電量時,可儲存有限電力;反之則會釋放電力。 @@ -919,6 +931,9 @@ super-radar=掃描並顯示附近的未知區域。 large-area-electric-mining-drill=大型電能採礦機 +rocket-silo-2=用來製造及發射火箭。發射火箭將獲勝。 +rocket-silo-3=用來製造及發射火箭。發射火箭將獲勝。 + [equipment-name] solar-panel-mk2-equipment=攜帶式太陽能板2代 solar-panel-mk3-equipment=攜帶式太陽能板3代 @@ -1002,6 +1017,9 @@ empty-train-battery=空火車電池 charged-train-battery=已充電火車電池 +satellite-2=衛星 2 +satellite-3=衛星 3 + [technology-name] compound-energy=複合發電 compound-energy-1=複合發電 diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index ec5dd82..5e10cb1 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -164,6 +164,7 @@ function main.EEE(source, tier) elseif (source.type == 'heat-pipe') then item.heat_buffer.max_temperature = source.temp * (tier + 1) item.heat_buffer.max_transfer = source.temp * (tier + 1) * 0.01 .. 'GW' + end end @@ -176,6 +177,13 @@ function main.EEE(source, tier) elseif source.type == 'radar' then item.max_distance_of_sector_revealed = item.max_distance_of_sector_revealed + (2 * tier) item.max_distance_of_nearby_sector_revealed = item.max_distance_of_nearby_sector_revealed + (2 * tier) + + elseif (source.type == 'rocket-silo') then + local eu = tonumber(string.match(item.active_energy_usage, '[%d%.]+')) + local euu = string.match(item.active_energy_usage, '%a+') + item.active_energy_usage = eu * (2 ^ (tier - source.min + 1)) .. euu + item.rocket_parts_required = 200 * (tier - source.min + 1) + item.rocket_result_inventory_size = math.ceil(data.raw['item']['satellite'].rocket_launch_product[2] * 3 * (tier - source.min + 1) / data.raw['tool']['space-science-pack'].stack_size) end if item.crafting_speed then diff --git a/PHI-CL/migrations/migrations.lua b/PHI-CL/migrations/migrations.lua index f000952..e4d4b6f 100644 --- a/PHI-CL/migrations/migrations.lua +++ b/PHI-CL/migrations/migrations.lua @@ -146,11 +146,18 @@ for _, force in pairs(game.forces) do recipes['electric-filter-furnace'].reload() end - if settings.startup['PHI-MB'].value and script.active_mods['space-exploration'] then - if technologies['se-core-miner'].researched then - for i=2, settings.startup['PHI-MB-MINING-TIER'].value do - recipes['se-core-miner-' .. i].enabled = true - recipes['se-core-miner-' .. i].reload() + if settings.startup['PHI-MB'].value then + recipes['satellite-2'].enabled = true + recipes['satellite-2'].reload() + recipes['satellite-3'].enabled = true + recipes['satellite-3'].reload() + + 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 + recipes['se-core-miner-' .. i].enabled = true + recipes['se-core-miner-' .. i].reload() + end end end end