From 49db2f466fb011b08abce6b128575ebafd70d21a Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 24 Oct 2024 17:29:23 +0900 Subject: [PATCH] . --- PHI-CL/config.lua | 986 +------------------------- PHI-CL/data-final-fixes.lua | 86 --- PHI-CL/data-updates.lua | 1180 -------------------------------- PHI-CL/data.lua | 599 ++++++++++++++++ PHI-CL/info.json | 17 +- PHI-CL/locale/en/locale.cfg | 39 -- PHI-CL/locale/ja/locale.cfg | 40 -- PHI-CL/locale/zh-CN/locale.cfg | 40 -- PHI-CL/locale/zh-TW/locale.cfg | 40 -- PHI-CL/main.lua | 111 ++- PHI-CL/note.lua | 1096 +++++++++++++++++++++++++++++ PHI-CL/settings.lua | 193 +----- 12 files changed, 1780 insertions(+), 2647 deletions(-) create mode 100644 PHI-CL/data.lua create mode 100644 PHI-CL/note.lua diff --git a/PHI-CL/config.lua b/PHI-CL/config.lua index d316506..608cb62 100644 --- a/PHI-CL/config.lua +++ b/PHI-CL/config.lua @@ -45,7 +45,7 @@ local items = { ['item'] = { ['solar-panel'] = { enabled = settings.startup['PHI-EN'].value, - stage = 2, + stage = 1, type = 'solar-panel', name = 'solar-panel', ref_name = 'solar-panel', @@ -55,7 +55,7 @@ local items = { }, ['accumulator'] = { enabled = settings.startup['PHI-EN'].value, - stage = 2, + stage = 1, type = 'accumulator', name = 'accumulator', ref_name = 'accumulator', @@ -65,7 +65,7 @@ local items = { }, ['boiler'] = { enabled = settings.startup['PHI-EN'].value, - stage = 2, + stage = 1, type = 'boiler', name = 'boiler', ref_name = 'boiler', @@ -75,7 +75,7 @@ local items = { }, ['steam-engine'] = { enabled = settings.startup['PHI-EN'].value, - stage = 2, + stage = 1, type = 'generator', name = 'steam-engine', ref_name = 'steam-engine', @@ -85,7 +85,7 @@ local items = { }, ['nuclear-reactor'] = { enabled = settings.startup['PHI-EN'].value, - stage = 2, + stage = 1, type = 'reactor', name = 'nuclear-reactor', ref_name = 'nuclear-reactor', @@ -95,7 +95,7 @@ local items = { }, ['heat-pipe'] = { enabled = settings.startup['PHI-EN'].value, - stage = 2, + stage = 1, type = 'heat-pipe', name = 'heat-pipe', ref_name = 'heat-pipe', @@ -105,7 +105,7 @@ local items = { }, ['heat-exchanger'] = { enabled = settings.startup['PHI-EN'].value, - stage = 2, + stage = 1, type = 'boiler', name = 'heat-exchanger', ref_name = 'heat-exchanger', @@ -115,7 +115,7 @@ local items = { }, ['steam-turbine'] = { enabled = settings.startup['PHI-EN'].value, - stage = 2, + stage = 1, type = 'generator', name = 'steam-turbine', ref_name = 'steam-turbine', @@ -125,7 +125,7 @@ local items = { }, ['assembling-machine'] = { enabled = settings.startup['PHI-MB'].value, - stage = 2, + stage = 1, type = 'assembling-machine', name = 'assembling-machine', ref_name = 'assembling-machine-3', @@ -135,7 +135,7 @@ local items = { }, ['electric-furnace'] = { enabled = settings.startup['PHI-MB'].value, - stage = 2, + stage = 1, type = 'furnace', name = 'electric-furnace', ref_name = 'electric-furnace', @@ -145,7 +145,7 @@ local items = { }, ['oil-refinery'] = { enabled = settings.startup['PHI-MB'].value, - stage = 2, + stage = 1, type = 'assembling-machine', name = 'oil-refinery', ref_name = 'oil-refinery', @@ -155,7 +155,7 @@ local items = { }, ['chemical-plant'] = { enabled = settings.startup['PHI-MB'].value, - stage = 2, + stage = 1, type = 'assembling-machine', name = 'chemical-plant', ref_name = 'chemical-plant', @@ -165,7 +165,7 @@ local items = { }, ['centrifuge'] = { enabled = settings.startup['PHI-MB'].value, - stage = 2, + stage = 1, type = 'assembling-machine', name = 'centrifuge', ref_name = 'centrifuge', @@ -173,19 +173,9 @@ local items = { min = 2, max = settings.startup['PHI-MB-CENTRIFUGE-TIER'].value }, - ['rocket-silo'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - 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 = 2, + stage = 1, type = 'lab', name = 'lab', ref_name = 'lab', @@ -195,7 +185,7 @@ local items = { }, ['electric-mining-drill'] = { enabled = settings.startup['PHI-MB'].value, - stage = 2, + stage = 1, type = 'mining-drill', name = 'electric-mining-drill', ref_name = 'electric-mining-drill', @@ -205,7 +195,7 @@ local items = { }, ['pumpjack'] = { enabled = settings.startup['PHI-MB'].value, - stage = 2, + stage = 1, type = 'mining-drill', name = 'pumpjack', ref_name = 'pumpjack', @@ -213,19 +203,9 @@ local items = { min = 2, max = settings.startup['PHI-MB-MINING-TIER'].value }, - ['electric-filter-furnace'] = { - enabled = settings.startup['PHI-MB'].value and settings.startup['PHI-RS'].value, - stage = 2, - type = 'assembling-machine', - name = 'electric-filter-furnace', - ref_name = 'electric-filter-furnace', - tech = 'advanced-material-processing-2', - min = 2, - max = settings.startup['PHI-MB-FURNACE-TIER'].value - }, ['laser-turret'] = { enabled = settings.startup['PHI-WE'].value, - stage = 2, + stage = 1, type = 'electric-turret', name = 'laser-turret', ref_name = 'laser-turret', @@ -235,7 +215,7 @@ local items = { }, ['flamethrower-turret'] = { enabled = settings.startup['PHI-WE'].value, - stage = 2, + stage = 1, type = 'fluid-turret', name = 'flamethrower-turret', ref_name = 'flamethrower-turret', @@ -245,7 +225,7 @@ local items = { }, ['gun-turret'] = { enabled = settings.startup['PHI-WE'].value, - stage = 2, + stage = 1, type = 'ammo-turret', name = 'gun-turret', ref_name = 'gun-turret', @@ -255,7 +235,7 @@ local items = { }, ['radar'] = { enabled = settings.startup['PHI-WE'].value, - stage = 2, + stage = 1, type = 'radar', name = 'radar', ref_name = 'radar', @@ -267,7 +247,7 @@ local items = { ['equipment'] = { ['solar-panel-equipment'] = { enabled = settings.startup['PHI-EQ'].value, - stage = 2, + stage = 1, type = 'solar-panel-equipment', name = 'solar-panel', ref_name = 'solar-panel-equipment', @@ -279,7 +259,7 @@ local items = { }, ['fusion-reactor-equipment'] = { enabled = settings.startup['PHI-EQ'].value, - stage = 2, + stage = 1, type = 'generator-equipment', name = 'fusion-reactor', ref_name = 'fusion-reactor-equipment', @@ -289,17 +269,17 @@ local items = { }, ['battery-equipment'] = { enabled = settings.startup['PHI-EQ'].value, - stage = 2, + stage = 1, type = 'battery-equipment', name = 'battery', - ref_name = 'battery-mk2-equipment', - tech = 'battery-mk2-equipment', - min = 3, + ref_name = 'battery-mk3-equipment', + tech = 'battery-mk3-equipment', + min = 4, max = settings.startup['PHI-EQ-BATTERY-TIER'].value }, ['personal-laser-defense-equipment'] = { enabled = settings.startup['PHI-EQ'].value, - stage = 2, + stage = 1, type = 'active-defense-equipment', name = 'personal-laser-defense', ref_name = 'personal-laser-defense-equipment', @@ -309,7 +289,7 @@ local items = { }, ['energy-shield-equipment'] = { enabled = settings.startup['PHI-EQ'].value, - stage = 2, + stage = 1, type = 'energy-shield-equipment', name = 'energy-shield', ref_name = 'energy-shield-mk2-equipment', @@ -319,7 +299,7 @@ local items = { }, ['personal-roboport-equipment'] = { enabled = settings.startup['PHI-EQ'].value, - stage = 2, + stage = 1, type = 'roboport-equipment', name = 'personal-roboport', ref_name = 'personal-roboport-mk2-equipment', @@ -329,7 +309,7 @@ local items = { }, ['night-vision-equipment'] = { enabled = settings.startup['PHI-EQ'].value, - stage = 2, + stage = 1, type = 'night-vision-equipment', name = 'night-vision', ref_name = 'night-vision-equipment', @@ -339,7 +319,7 @@ local items = { }, ['exoskeleton-equipment'] = { enabled = settings.startup['PHI-EQ'].value, - stage = 2, + stage = 1, type = 'movement-bonus-equipment', name = 'exoskeleton', ref_name = 'exoskeleton-equipment', @@ -373,914 +353,10 @@ local items = { } } } - }, - ['recipe'] = { - ['iron-plate'] = { - enabled = true, - tech = 'automation' - }, - ['copper-plate'] = { - enabled = true, - tech = 'automation' - }, - ['stone-brick'] = { - enabled = true, - tech = 'automation' - }, - ['steel-plate'] = { - enabled = true, - tech = 'steel-processing' - }, - ['electronic-circuit'] = { - enabled = true, - tech = 'automation' - }, - ['advanced-circuit'] = { - enabled = true, - tech = 'advanced-electronics' - }, - ['processing-unit'] = { - enabled = true, - tech = 'advanced-electronics-2' - }, - ['copper-cable'] = { - enabled = true, - tech = 'automation' - }, - ['iron-stick'] = { - enabled = true, - tech = 'automation' - }, - ['iron-gear-wheel'] = { - enabled = true, - tech = 'automation' - }, - ['pipe'] = { - enabled = true, - tech = 'automation' - }, - ['engine-unit'] = { - enabled = true, - tech = 'engine' - }, - ['electric-engine-unit'] = { - enabled = true, - tech = 'electric-engine' - }, - ['flying-robot-frame'] = { - enabled = true, - tech = 'robotics' - }, - ['low-density-structure'] = { - enabled = true, - tech = 'low-density-structure' - }, - ['rocket-fuel'] = { - enabled = true, - tech = 'rocket-fuel' - }, - ['rocket-control-unit'] = { - enabled = true, - tech = 'rocket-control-unit' - }, - ['basic-oil-processing'] = { - enabled = true, - tech = 'oil-processing' - }, - ['advanced-oil-processing'] = { - enabled = true, - tech = 'advanced-oil-processing' - }, - ['heavy-oil-cracking'] = { - enabled = true, - tech = 'advanced-oil-processing' - }, - ['light-oil-cracking'] = { - enabled = true, - tech = 'advanced-oil-processing' - }, - ['solid-fuel-from-light-oil'] = { - enabled = true, - tech = 'advanced-oil-processing' - }, - ['solid-fuel-from-heavy-oil'] = { - enabled = true, - tech = 'advanced-oil-processing' - }, - ['solid-fuel-from-petroleum-gas'] = { - enabled = true, - tech = 'oil-processing' - }, - ['coal-liquefaction'] = { - enabled = true, - tech = 'coal-liquefaction' - }, - ['sulfur'] = { - enabled = true, - tech = 'sulfur-processing' - }, - ['sulfuric-acid'] = { - enabled = true, - tech = 'sulfur-processing' - }, - ['lubricant'] = { - enabled = true, - tech = 'lubricant' - }, - ['plastic-bar'] = { - enabled = true, - tech = 'plastics' - }, - ['battery'] = { - enabled = true, - tech = 'battery' - }, - ['explosives'] = { - enabled = true, - tech = 'explosives' - }, - ['cliff-explosives'] = { - enabled = true, - tech = 'cliff-explosives' - }, - ['empty-barrel'] = { - enabled = true, - tech = 'fluid-handling' - }, - ['automation-science-pack'] = { - enabled = true, - tech = 'automation' - }, - ['logistic-science-pack'] = { - enabled = true, - tech = 'logistic-science-pack' - }, - ['chemical-science-pack'] = { - enabled = true, - tech = 'chemical-science-pack' - }, - ['military-science-pack'] = { - enabled = true, - tech = 'military-science-pack' - }, - ['production-science-pack'] = { - enabled = true, - tech = 'production-science-pack' - }, - ['utility-science-pack'] = { - enabled = true, - tech = 'utility-science-pack' - }, - ['fast-inserter'] = { - enabled = false, - tech = 'fast-inserter' - }, - ['filter-inserter'] = { - enabled = false, - tech = 'fast-inserter' - }, - ['long-handed-inserter'] = { - enabled = false, - tech = 'automation' - }, - ['stack-inserter'] = { - enabled = false, - tech = 'stack-inserter' - }, - ['stack-filter-inserter'] = { - enabled = false, - tech = 'stack-inserter' - }, - ['inserter'] = { - enabled = true, - tech = 'automation' - }, - ['transport-belt'] = { - enabled = true, - tech = 'automation' - }, - ['grenade'] = { - enabled = true, - tech = 'military-2' - }, - ['firearm-magazine'] = { - enabled = true, - tech = 'automation' - }, - ['piercing-rounds-magazine'] = { - enabled = true, - tech = 'military-2' - }, - ['stone-wall'] = { - enabled = true, - tech = 'stone-wall' - }, - ['rail'] = { - enabled = true, - tech = 'railway' - }, - ['electric-furnace'] = { - enabled = true, - tech = 'advanced-material-processing-2' - }, - ['concrete'] = { - enabled = true, - tech = 'concrete' - }, - ['uranium-processing'] = { - enabled = true, - tech = 'uranium-processing' - }, - ['uranium-fuel-cell'] = { - enabled = true, - tech = 'uranium-processing' - }, - ['nuclear-fuel-reprocessing'] = { - enabled = true, - tech = 'nuclear-fuel-reprocessing' - }, - ['kovarex-enrichment-process'] = { - enabled = true, - tech = 'kovarex-enrichment-process' - }, - ['nuclear-fuel'] = { - enabled = true, - tech = 'kovarex-enrichment-process' - }, - ['uranium-rounds-magazine'] = { - enabled = true, - tech = 'uranium-ammo' - }, - ['explosive-cannon-shell'] = { - enabled = true, - tech = 'tank' - }, - ['artillery-shell'] = { - enabled = true, - tech = 'artillery' - }, - ['rocket'] = { - enabled = true, - tech = 'rocketry' - }, - ['explosive-rocket'] = { - enabled = true, - tech = 'explosive-rocketry' - }, - ['solar-panel'] = { - enabled = true, - tech = 'solar-energy' - }, - ['accumulator'] = { - enabled = true, - tech = 'electric-energy-accumulators' - }, - ['radar'] = { - enabled = true, - tech = 'automation' - }, - ['speed-module'] = { - enabled = false, - tech = 'speed-module' - }, - ['speed-module-2'] = { - enabled = false, - tech = 'speed-module-2' - }, - ['speed-module-3'] = { - enabled = false, - tech = 'speed-module-3' - }, - ['productivity-module'] = { - enabled = false, - tech = 'productivity-module' - }, - ['productivity-module-2'] = { - enabled = false, - tech = 'productivity-module-2' - }, - ['productivity-module-3'] = { - enabled = false, - tech = 'productivity-module-3' - }, - ['effectivity-module'] = { - enabled = false, - tech = 'effectivity-module' - }, - ['effectivity-module-2'] = { - enabled = false, - tech = 'effectivity-module-2' - }, - ['effectivity-module-3'] = { - enabled = false, - tech = 'effectivity-module-3' - } } } if mods then - if mods['aai-industry'] then - items['item']['industrial-furnace'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'industrial-furnace', - ref_name = 'industrial-furnace', - tech = 'industrial-furnace', - min = 2, - max = settings.startup['PHI-MB-FURNACE-TIER'].value - } - - items['item']['fuel-processor'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'fuel-processor', - ref_name = 'fuel-processor', - tech = 'fuel-processing', - min = 2, - max = settings.startup['PHI-MB-OIL-TIER'].value - } - end - - if mods['aai-industry'] or mods['big-mining-drill'] then - items['item']['area-mining-drill'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'mining-drill', - name = 'area-mining-drill', - ref_name = 'area-mining-drill', - tech = 'area-mining-drill', - min = 2, - max = settings.startup['PHI-MB-MINING-TIER'].value - } - end - - if mods['Krastorio2'] then - items['item']['kr-mineral-water-pumpjack'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'mining-drill', - name = 'kr-mineral-water-pumpjack', - ref_name = 'kr-mineral-water-pumpjack', - tech = 'kr-mineral-water-gathering', - min = 2, - max = settings.startup['PHI-MB-MINING-TIER'].value - } - - items['item']['kr-gas-power-station'] = { - enabled = settings.startup['PHI-EN'].value, - stage = 2, - type = 'generator', - name = 'kr-gas-power-station', - ref_name = 'kr-gas-power-station', - tech = 'compound-energy', - min = 2, - max = settings.startup['PHI-EN-STEAM-TIER'].value - } - - items['item']['kr-crusher'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'furnace', - name = 'kr-crusher', - ref_name = 'kr-crusher', - tech = 'kr-crusher', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-fluid-burner'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'furnace', - name = 'kr-fluid-burner', - ref_name = 'kr-fluid-burner', - tech = 'kr-fluid-excess-handling', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-air-purifier'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'furnace', - name = 'kr-air-purifier', - ref_name = 'kr-air-purifier', - tech = 'kr-air-purification', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-advanced-furnace'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-advanced-furnace', - ref_name = 'kr-advanced-furnace', - tech = 'kr-advanced-furnace', - min = 2, - max = settings.startup['PHI-MB-FURNACE-TIER'].value - } - - items['item']['kr-advanced-chemical-plant'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-advanced-chemical-plant', - ref_name = 'kr-advanced-chemical-plant', - tech = 'kr-advanced-chemical-plant', - min = 2, - max = settings.startup['PHI-MB-OIL-TIER'].value - } - - items['item']['kr-advanced-assembling-machine'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-advanced-assembling-machine', - ref_name = 'kr-advanced-assembling-machine', - tech = 'kr-automation', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-greenhouse'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-greenhouse', - ref_name = 'kr-greenhouse', - tech = 'kr-greenhouse', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-bio-lab'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-bio-lab', - ref_name = 'kr-bio-lab', - tech = 'kr-bio-processing', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-electrolysis-plant'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-electrolysis-plant', - ref_name = 'kr-electrolysis-plant', - tech = 'kr-fluids-chemistry', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-filtration-plant'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-filtration-plant', - ref_name = 'kr-filtration-plant', - tech = 'kr-fluids-chemistry', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-fuel-refinery'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-fuel-refinery', - ref_name = 'kr-fuel-refinery', - tech = 'kr-fuel', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-atmospheric-condenser'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-atmospheric-condenser', - ref_name = 'kr-atmospheric-condenser', - tech = 'kr-atmosphere-condensation', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-advanced-lab'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'lab', - name = 'biusart-lab', - ref_name = 'biusart-lab', - tech = 'kr-advanced-lab', - min = 2, - max = settings.startup['PHI-MB-LAB-TIER'].value - } - - items['item']['kr-singularity-lab'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'lab', - name = 'kr-singularity-lab', - ref_name = 'kr-singularity-lab', - tech = 'kr-singularity-lab', - min = 2, - max = settings.startup['PHI-MB-LAB-TIER'].value - } - - items['item']['kr-research-server'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-research-server', - ref_name = 'kr-research-server', - tech = 'kr-research-server', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-quantum-computer'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-quantum-computer', - ref_name = 'kr-quantum-computer', - tech = 'kr-quantum-computer', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-matter-plant'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-matter-plant', - ref_name = 'kr-matter-plant', - tech = 'kr-matter-processing', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-matter-assembler'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'kr-matter-assembler', - ref_name = 'kr-matter-assembler', - tech = 'kr-matter-processing', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['kr-quarry-drill'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'mining-drill', - name = 'kr-quarry-drill', - ref_name = 'kr-quarry-drill', - tech = 'kr-quarry-minerals-extraction', - min = 2, - max = settings.startup['PHI-MB-MINING-TIER'].value - } - end - - if mods['space-exploration'] then - items['item']['se-space-solar-panel'] = { - enabled = settings.startup['PHI-EN'].value, - stage = 2, - type = 'solar-panel', - name = 'se-space-solar-panel', - ref_name = 'se-space-solar-panel', - tech = 'compound-energy', - min = 4, - max = settings.startup['PHI-EN-SOLAR-TIER'].value - } - - items['item']['se-space-assembling-machine'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-assembling-machine', - ref_name = 'se-space-assembling-machine', - tech = 'se-space-assembling', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-manufactory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-manufactory', - ref_name = 'se-space-manufactory', - tech = 'se-space-manufactory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-casting-machine'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-casting-machine', - ref_name = 'se-casting-machine', - tech = 'se-pyroflux-smelting', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-pulveriser'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-pulveriser', - ref_name = 'se-pulveriser', - tech = 'se-pulveriser', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-lifesupport-facility'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-lifesupport-facility', - ref_name = 'se-lifesupport-facility', - tech = 'se-lifesupport-facility', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-fuel-refinery'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-fuel-refinery', - ref_name = 'se-fuel-refinery', - tech = 'se-fuel-refining', - min = 2, - max = settings.startup['PHI-MB-OIL-TIER'].value - } - - items['item']['se-space-decontamination-facility'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-decontamination-facility', - ref_name = 'se-space-decontamination-facility', - tech = 'se-space-decontamination-facility', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-genetics-laboratory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-genetics-laboratory', - ref_name = 'se-space-genetics-laboratory', - tech = 'se-space-genetics-laboratory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-growth-facility'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-growth-facility', - ref_name = 'se-space-growth-facility', - tech = 'se-space-growth-facility', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-biochemical-laboratory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-biochemical-laboratory', - ref_name = 'se-space-biochemical-laboratory', - tech = 'se-space-biochemical-laboratory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-radiation-laboratory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-radiation-laboratory', - ref_name = 'se-space-radiation-laboratory', - tech = 'se-space-radiation-laboratory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-electromagnetics-laboratory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-electromagnetics-laboratory', - ref_name = 'se-space-electromagnetics-laboratory', - tech = 'se-space-electromagnetics-laboratory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-laser-laboratory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-laser-laboratory', - ref_name = 'se-space-laser-laboratory', - tech = 'se-space-laser-laboratory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-astrometrics-laboratory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-astrometrics-laboratory', - ref_name = 'se-space-astrometrics-laboratory', - tech = 'se-space-astrometrics-laboratory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-gravimetrics-laboratory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-gravimetrics-laboratory', - ref_name = 'se-space-gravimetrics-laboratory', - tech = 'se-space-gravimetrics-laboratory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-mechanical-laboratory'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-mechanical-laboratory', - ref_name = 'se-space-mechanical-laboratory', - tech = 'se-space-mechanical-laboratory', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-material-fabricator'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-material-fabricator', - ref_name = 'se-space-material-fabricator', - tech = 'se-space-material-fabricator', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-particle-accelerator'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-particle-accelerator', - ref_name = 'se-space-particle-accelerator', - tech = 'se-space-particle-accelerator', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-particle-collider'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-particle-collider', - ref_name = 'se-space-particle-collider', - tech = 'se-space-particle-collider', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-plasma-generator'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-plasma-generator', - ref_name = 'se-space-plasma-generator', - tech = 'se-space-plasma-generator', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-hypercooler'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-hypercooler', - ref_name = 'se-space-hypercooler', - tech = 'se-space-hypercooling-1', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-radiator'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-radiator', - ref_name = 'se-space-radiator-2', - tech = 'se-space-radiator-2', - min = 3, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + 1 - } - - items['item']['se-space-telescope'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-telescope', - ref_name = 'se-space-telescope', - tech = 'se-space-telescope', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-telescope-gammaray'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-telescope-gammaray', - ref_name = 'se-space-telescope-gammaray', - tech = 'se-space-telescope-gammaray', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-telescope-microwave'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-telescope-microwave', - ref_name = 'se-space-telescope-microwave', - tech = 'se-space-telescope-microwave', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-telescope-radio'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-telescope-radio', - ref_name = 'se-space-telescope-radio', - tech = 'se-space-telescope-radio', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-telescope-xray'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'assembling-machine', - name = 'se-space-telescope-xray', - ref_name = 'se-space-telescope-xray', - tech = 'se-space-telescope-xray', - min = 2, - max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value - } - - items['item']['se-space-science-lab'] = { - enabled = settings.startup['PHI-MB'].value, - stage = 2, - type = 'lab', - name = 'se-space-science-lab', - ref_name = 'se-space-science-lab', - tech = 'se-space-science-lab', - min = 2, - max = settings.startup['PHI-MB-LAB-TIER'].value - } - - items['equipment']['fusion-reactor-equipment'].tech = 'se-rtg-equipment' - items['equipment']['fusion-reactor-equipment'].base_name = 'se-rtg' - - items['equipment']['battery-equipment'].tech = 'battery-equipment' - items['equipment']['battery-equipment'].min = 2 - - items['equipment']['energy-shield-equipment'].tech = 'energy-shield-equipment' - items['equipment']['energy-shield-equipment'].min = 2 - - items['equipment']['personal-roboport-equipment'].tech = 'personal-roboport-equipment' - items['equipment']['personal-roboport-equipment'].min = 2 - end end return items diff --git a/PHI-CL/data-final-fixes.lua b/PHI-CL/data-final-fixes.lua index 0340523..5116d31 100644 --- a/PHI-CL/data-final-fixes.lua +++ b/PHI-CL/data-final-fixes.lua @@ -2,92 +2,6 @@ local items = require 'config' local main = require 'main' local file_stage = 3 -data.raw['utility-constants'].default.zoom_to_world_effect_strength = 0 -data.raw['utility-constants'].default.zoom_to_world_can_use_nightvision = true -data.raw['utility-constants'].default.train_inactivity_wait_condition_default = 60 - -data.raw['arithmetic-combinator']['arithmetic-combinator'].energy_source.usage_priority = 'primary-input' -data.raw['decider-combinator']['decider-combinator'].energy_source.usage_priority = 'primary-input' - -data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true - --- data.raw['utility-constants'].select_group_row_count - -for _, t in pairs(data.raw['tree']) do - t.collision_box = {{-0.05, -0.05}, {0.05, 0.05}} -end - -for _,name in pairs({'furnace', 'lab', 'beacon'}) do - local entities = {} - - for _, entity in pairs(data.raw[name]) do - table.insert(entities, entity.name) - end - - for _, entity in pairs(data.raw[name]) do - entity.additional_pastable_entities = entities - end -end - -if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ARTILLERY'].value then - for _, t in pairs({data.raw['artillery-turret'], data.raw['artillery-wagon']}) do - for _, v in pairs(t) do - v.manual_range_modifier = 1 - end - end - - -- data.raw['artillery-projectile']['artillery-projectile'].reveal_map = false -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TILE'].value then - for _, tile in pairs (data.raw.tile) do - tile.autoplace = nil - end - - data.raw.tile[settings.startup['PHI-CT-TILE-CHOICE'].value].autoplace = {} - - for _, t in pairs({data.raw['simple-entity'], data.raw['optimized-decorative'], data.raw['fish']}) do - for _, e in pairs(t) do - e.autoplace = nil - end - end - - local autoplace_controls = {} - - for k, _ in pairs (data.raw['autoplace-control']) do - autoplace_controls[k] = { - size = 'none' - } - end - - data.raw['map-gen-presets']['default']['empty-world'] = { - order = 'zz', - basic_settings = { - autoplace_controls = autoplace_controls, - water = 'none', - cliff_settings = { - name = 'none', - cliff_elevation_interval = 100, - cliff_elevation_0 = 100, - richness = 0 - } - }, - advanced_settings = { - pollution = {enabled = false}, - enemy_evolution = {enabled = false}, - enemy_expansion = {enabled = false} - } - } -end - -if settings.startup['PHI-RS'].value then - data.raw['assembling-machine']['electric-filter-furnace'].crafting_categories = {} - - for i=1, #data.raw['furnace']['electric-furnace'].crafting_categories do - table.insert(data.raw['assembling-machine']['electric-filter-furnace'].crafting_categories, data.raw['furnace']['electric-furnace'].crafting_categories[i]) - 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' diff --git a/PHI-CL/data-updates.lua b/PHI-CL/data-updates.lua index 9e81438..7a0b0a7 100644 --- a/PHI-CL/data-updates.lua +++ b/PHI-CL/data-updates.lua @@ -2,1186 +2,6 @@ local items = require 'config' local main = require 'main' local file_stage = 2 -if settings.startup['PHI-EN'].value and settings.startup['PHI-EN-SOLAR-TIER'].value and settings.startup['PHI-EN-STEAM-TIER'].value and settings.startup['PHI-EN-NUCLEAR-TIER'].value then - local ml = math.max(settings.startup['PHI-EN-SOLAR-TIER'].value, settings.startup['PHI-EN-STEAM-TIER'].value, settings.startup['PHI-EN-NUCLEAR-TIER'].value) - - for i=1, 7 do - local tn = 'compound-energy-' .. i - local prereq - local e = true - - if i > 1 then - prereq = {'compound-energy-' .. (i - 1)} - - else - prereq = {'solar-energy', 'advanced-electronics', 'electric-energy-accumulators'} - end - - if i > ml then - e = false - end - - data:extend({{ - type = 'technology', - name = tn, - enabled = e, - prerequisites = prereq, - effects = {}, - unit = { - count = math.floor(100 * (i ^ 1.6)), - ingredients = { - {'automation-science-pack', 1}, - {'logistic-science-pack', 1} - }, - time = 60 - }, - icons = { - { - icon = '__base__/graphics/technology/solar-energy.png', - icon_size = 256, - tint = items['tint'][i] - } - }, - order = 'a-h-' .. i, - localised_name = {'phi-cl.combine', {'technology-name.compound-energy'}, i}, - localised_description = {'technology-description.compound-energy'} - }}) - end -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-RADAR'].value then - local item = table.deepcopy(data.raw['item']['radar']) - item.name = 'super-radar' - item.place_result = 'super-radar' - item.order = 'd[radar]-b[radar]' - - item.icons = { - { - icon = item.icon or '__base__/graphics/icons/radar.png', - tint = items['tint'][8], - icon_size = item.icon_size or 64, - icon_mipmaps = item.icon_mipmaps or 4 - } - } - - item.icon = nil - item.icon_size = nil - item.icon_mipmaps = nil - item.localised_name = {'name.super-radar'} - item.localised_description = {'description.super-radar'} - data:extend({item}) - - local entity = table.deepcopy(data.raw['radar']['radar']) - entity.name = 'super-radar' - entity.minable.result = 'super-radar' - entity.max_distance_of_sector_revealed = 35 - entity.max_distance_of_nearby_sector_revealed = 35 - entity.pictures.layers[1].tint = items['tint'][8] - entity.pictures.layers[1].hr_version.tint = items['tint'][8] - entity.se_allow_in_space = true - entity.localised_name = {'name.super-radar'} - entity.localised_description = {'description.super-radar'} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'super-radar', - energy_required = 2, - enabled = true, - ingredients = {{'electronic-circuit', 5}, {'iron-gear-wheel', 5}, {'iron-plate', 10}}, - result = 'super-radar', - localised_name = {'name.super-radar'}, - localised_description = {'description.super-radar'} - }}) -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRASH'].value then - local item = table.deepcopy(data.raw['item']['steel-chest']) - item.name = 'trash-chest' - item.place_result = 'trash-chest' - item.order = 'b[storage]-h[trash-chest]' - - item.icons = { - { - icon = item.icon or '__base__/graphics/icons/steel-chest.png', - tint = items['tint'][8], - icon_size = item.icon_size or 64, - icon_mipmaps = item.icon_mipmaps or 4 - } - } - - item.icon = nil - item.icon_size = nil - item.icon_mipmaps = nil - item.localised_name = {'name.trash-chest'} - item.localised_description = {'description.trash-chest'} - data:extend({item}) - - 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' - entity.erase_contents_when_mined = true - entity.logistic_mode = nil - entity.next_upgrade = nil - entity.fast_replaceable_group = nil - entity.picture.layers[1].tint = items['tint'][8] - entity.picture.layers[1].hr_version.tint = items['tint'][8] - entity.se_allow_in_space = true - entity.localised_name = {'name.trash-chest'} - entity.localised_description = {'description.trash-chest'} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'trash-chest', - energy_required = 2, - enabled = false, - ingredients = {{'steel-chest', 1}}, - result = 'trash-chest', - localised_name = {'name.trash-chest'}, - localised_description = {'description.trash-chest'} - }}) - - table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='trash-chest'}) - - item = table.deepcopy(data.raw['item']['pipe']) - item.name = 'trash-pipe' - item.place_result = 'trash-pipe' - item.order = 'a[pipe]-c[trash-pipe]' - - item.icons = { - { - icon = item.icon or '__base__/graphics/icons/pipe.png', - tint = items['tint'][8], - icon_size = item.icon_size or 64, - icon_mipmaps = item.icon_mipmaps or 4 - } - } - - item.icon = nil - item.icon_size = nil - item.icon_mipmaps = nil - item.localised_name = {'name.trash-pipe'} - item.localised_description = {'description.trash-pipe'} - data:extend({item}) - - entity = table.deepcopy(data.raw['pipe']['pipe']) - entity.name = 'trash-pipe' - entity.minable.result = 'trash-pipe' - entity.inventory_size = 1 - entity.type = 'infinity-pipe' - entity.gui_mode = 'none' - entity.erase_contents_when_mined = true - entity.next_upgrade = nil - entity.fast_replaceable_group = nil - - for _, v in pairs(entity.pictures) do - v.tint = items['tint'][8] - - if v.hr_version then - v.hr_version.tint = items['tint'][8] - end - end - - entity.se_allow_in_space = true - entity.localised_name = {'name.trash-pipe'} - entity.localised_description = {'description.trash-pipe'} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'trash-pipe', - energy_required = 2, - enabled = false, - ingredients = {{'iron-plate', 1}}, - result = 'trash-pipe', - localised_name = {'name.trash-pipe'}, - localised_description = {'description.trash-pipe'} - }}) - - table.insert(data.raw.technology['automation'].effects, {type='unlock-recipe', recipe='trash-pipe'}) -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-MINER'].value then - local item = table.deepcopy(data.raw['item']['electric-mining-drill']) - item.name = 'large-area-electric-mining-drill' - item.place_result = 'large-area-electric-mining-drill' - item.order = 'zc' - item.localised_name = {'name.large-area-electric-mining-drill'} - item.localised_description = {'description.large-area-electric-mining-drill'} - data:extend({item}) - - local entity = table.deepcopy(data.raw['mining-drill']['electric-mining-drill']) - entity.name = 'large-area-electric-mining-drill' - 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 = 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 - entity.se_allow_in_space = true - entity.localised_name = {'name.large-area-electric-mining-drill'} - entity.localised_description = {'description.large-area-electric-mining-drill'} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'large-area-electric-mining-drill', - energy_required = 2, - enabled = true, - ingredients = {{'electric-mining-drill', 16}}, - result = 'large-area-electric-mining-drill', - localised_name = {'name.large-area-electric-mining-drill'}, - localised_description = {'description.large-area-electric-mining-drill'} - }}) -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-LINKED'].value then - local item = table.deepcopy(data.raw['item']['linked-chest']) - item.supgroup = 'storage' - item.order = 'a[items]-d[linked-chest]' - 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' - entity.se_allow_in_space = true - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'linked-chest', - energy_required = 2, - enabled = false, - ingredients = {{'steel-chest', 1}}, - result = 'linked-chest' - }}) - - table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='linked-chest'}) -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-LOADER'].value then - data.raw.recipe['loader'].hidden = false - data.raw.recipe['fast-loader'].hidden = false - data.raw.recipe['express-loader'].hidden = false - - table.insert(data.raw.technology['logistics'].effects, {type='unlock-recipe', recipe='loader'}) - table.insert(data.raw.technology['logistics-2'].effects, {type='unlock-recipe', recipe='fast-loader'}) - table.insert(data.raw.technology['logistics-3'].effects, {type='unlock-recipe', recipe='express-loader'}) -end - -if settings.startup['PHI-CT'].value and 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', - amount_min = 5, - amount_max = 40 - } - } - }}) - - 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', - amount_min = 5, - amount_max = 40 - } - } - }}) - - for _, 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 - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-ENERGY'].value then - local item = table.deepcopy(data.raw['item']['electric-energy-interface']) - item.name = 'passive-energy-void' - item.place_result = 'passive-energy-void' - item.localised_name = {'name.passive-energy-void'} - item.localised_description = {'description.passive-energy-void'} - data:extend({item}) - - local entity = table.deepcopy(data.raw['electric-energy-interface']['electric-energy-interface']) - entity.name = 'passive-energy-void' - entity.minable.result = 'passive-energy-void' - entity.energy_source.usage_priority = 'tertiary' - entity.energy_source.emissions_per_minute = 0 - entity.energy_source.input_flow_limit = '1TW' - entity.energy_source.output_flow_limit = '0W' - entity.energy_production = '0W' - entity.energy_usage = '1TW' - entity.gui_mode = 'none' - entity.se_allow_in_space = true - entity.localised_name = {'name.passive-energy-void'} - entity.localised_description = {'description.passive-energy-void'} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'passive-energy-void', - energy_required = 2, - enabled = false, - ingredients = {{'accumulator', 1}}, - result = 'passive-energy-void', - localised_name = {'name.passive-energy-void'}, - localised_description = {'description.passive-energy-void'} - }}) - - table.insert(data.raw.technology['electric-energy-accumulators'].effects, {type='unlock-recipe', recipe='passive-energy-void'}) -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-LAMP'].value then - data.raw['lamp']['small-lamp'].darkness_for_all_lamps_on = 0 - data.raw['lamp']['small-lamp'].darkness_for_all_lamps_off = 0 - data.raw['lamp']['small-lamp'].always_on = true - table.insert(data.raw['lamp']['small-lamp'].signal_to_color_mapping, {type='virtual', name='signal-grey', color={r=128, g=128, b=128}}) - table.insert(data.raw['lamp']['small-lamp'].signal_to_color_mapping, {type='virtual', name='signal-black', color={r=0, g=0, b=0}}) -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRAIN'].value then - local item = table.deepcopy(data.raw['item']['used-up-uranium-fuel-cell']) - item.name = 'empty-train-battery' - item.icon = items['general']['graphics_location'] .. 'battery.png' - item.order = 'qa' - item.stack_size = 100 - item.localised_name = {'name.empty-train-battery'} - item.localised_description = {'description.empty-train-battery'} - data:extend({item}) - - data:extend({{ - type = 'recipe', - name = 'empty-train-battery', - energy_required = 30, - enabled = true, - icon = items['general']['graphics_location'] .. 'battery.png', - icon_size = 64, - icon_mipmaps = 4, - subgroup = 'intermediate-product', - order = 'zc', - ingredients = {{'battery', 50}}, - results = { - { - name = 'empty-train-battery', - amount = 1 - } - }, - localised_name = {'name.empty-train-battery'}, - localised_description = {'description.empty-train-battery'} - }}) - - for _, v in pairs(data.raw.module) do - if v.limitation and string.find(v.name, 'productivity', 1, true) then - table.insert(v.limitation, 'empty-train-battery') - end - end - - item = table.deepcopy(data.raw['item']['nuclear-fuel']) - item.name = 'charged-train-battery' - item.burnt_result = 'empty-train-battery' - item.fuel_value = '1GJ' - item.icon = items['general']['graphics_location'] .. 'battery.png' - item.stack_size = 10 - item.localised_name = {'name.charged-train-battery'} - item.localised_description = {'description.charged-train-battery'} - data:extend({item}) - - data:extend({{ - type = 'recipe', - name = 'charged-train-battery', - energy_required = 60, - enabled = true, - icon = items['general']['graphics_location'] .. 'battery.png', - icon_size = 64, - icon_mipmaps = 4, - subgroup = 'intermediate-product', - ingredients = {{'empty-train-battery', 1}}, - results = { - { - name = 'charged-train-battery', - probability = 0.995, - amount = 1 - }, - { - name = 'battery', - probability = 0.005, - amount = 5 - } - }, - localised_name = {'name.charged-train-battery'}, - localised_description = {'description.charged-train-battery'} - }}) - - data.raw['locomotive']['locomotive'].burner.burnt_inventory_size = 1 -end - -if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-BOILER'].value then - local item = table.deepcopy(data.raw['item']['boiler']) - item.name = 'electric-boiler' - item.place_result = 'electric-boiler' - item.order = 'b[steam-power]-a[electric-boiler]' - item.localised_name = {'name.electric-boiler'} - item.localised_description = {'description.electric-boiler'} - data:extend({item}) - - local entity = table.deepcopy(data.raw['boiler']['boiler']) - entity.name = 'electric-boiler' - entity.energy_consumption = '7200kW' - entity.buffer_capacity = '14400kJ' - entity.target_temperature = 165 - entity.emissions_per_minute = 0 - - entity.minable = { - hardness = 0.2, - mining_time = 0.5, - result = 'electric-boiler' - } - - entity.energy_source = { - type = 'electric', - usage_priority = 'secondary-input', - buffer_capacity = '14400kJ', - light_flicker = { - color = {r=0.5, g=1, b=1, a=0.5}, - minimum_light_size = 0.1, - light_intensity_to_size_coefficient = 1 - } - } - - entity.fire_flicker_enabled = false - entity.fire_glow_flicker_enabled = false - entity.fire = {} - entity.localised_name = {'name.electric-boiler'} - entity.localised_description = {'description.electric-boiler'} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'electric-boiler', - energy_required = 2, - enabled = true, - ingredients = {{name='boiler', amount=1}, {name='electronic-circuit', amount=1}}, - result = 'electric-boiler', - localised_name = {'name.electric-boiler'}, - localised_description = {'description.electric-boiler'} - }}) - - -- electric boiler - data.raw['boiler']['boiler'].fast_replaceable_group = 'boiler' - data.raw['boiler']['electric-boiler'].fast_replaceable_group = data.raw['boiler']['electric-boiler'].fast_replaceable_group -end - -if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-CHEST'].value then - local chests = { - 'steel-chest', - 'logistic-chest-passive-provider', - 'logistic-chest-active-provider', - 'logistic-chest-storage', - 'logistic-chest-buffer', - 'logistic-chest-requester' - } - - for _, c in pairs(chests) do - local item = table.deepcopy(data.raw['item'][c]) - local entity - - if c == 'steel-chest' then - entity = table.deepcopy(data.raw['container'][c]) - - else - entity = table.deepcopy(data.raw['logistic-container'][c]) - end - - item.name = 'basic-' .. c - item.place_result = 'basic-' .. c - item.order = 'b[storage]-h[basic-' .. c .. ']' - item.localised_name = {'name.basic-'.. c} - item.localised_description = {'description.basic-'.. c} - data:extend({item}) - - entity.inventory_type = 'with_filters_and_bar' - entity.inventory_size = 1 - entity.max_logistic_slots = 1 - entity.name = 'basic-' .. c - entity.minable.result = 'basic-' .. c - entity.localised_name = {'name.basic-'.. c} - entity.localised_description = {'description.basic-'.. c} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'basic-' .. c, - energy_required = 2, - enabled = false, - ingredients = {{c, 1}}, - results = {{name = 'basic-' .. c, amount = 1}}, - localised_name = {'name.basic-'.. c}, - localised_description = {'description.basic-'.. c} - }}) - end - - table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='basic-steel-chest'}) - - for _, t in pairs({'construction', 'logistic'}) do - for _, r in pairs({'passive-provider', 'storage'}) do - table.insert(data.raw.technology[t .. '-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-' .. r}) - end - end - - for _, r in pairs({'active-provider', 'buffer', 'requester'}) do - table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-' .. r}) - end -end -if settings.startup['PHI-EN'].value and settings.startup['PHI-EN-NUCLEAR-TIER'].value > 1 then - data.raw['fluid']['steam'].max_temperature = 5000 -end - -if settings.startup['PHI-MB'].value then - for i=2, 3 do - item = table.deepcopy(data.raw['item']['satellite']) - item.name = 'satellite-' .. i - - if mods['space-exploration'] then - item.rocket_launch_product = {'se-satellite-telemetry', 100 * (2 ^ (i - 1))} - - else - item.rocket_launch_product[2] = item.rocket_launch_product[2] * (2 ^ (i - 1)) - end - - item.icons = { - { - icon = '__base__/graphics/icons/satellite.png', - tint = items['tint'][i], - icon_size = 64, - icon_mipmaps = 4 - } - } - item.order = 'm[satellite]-' .. i - item.localised_name = {'name.satellite'} - item.localised_description = {'description.satellite'} - data:extend({item}) - - local inn - - if i == 2 then - inn = 'satellite' - - else - inn = 'satellite-' .. (i - 1) - end - - data:extend({{ - type = 'recipe', - name = 'satellite-' .. i, - energy_required = 5, - enabled = false, - icon = '__base__/graphics/icons/satellite.png', - icon_size = 64, - icon_mipmaps = 4, - category = 'crafting', - ingredients = {{inn, 2}}, - results = {{name = 'satellite-' .. i, amount = 1}}, - localised_name = {'name.satellite'}, - localised_description = {'description.satellite'} - }}) - - table.insert(data.raw.technology['space-science-pack'].effects, {type='unlock-recipe', recipe='satellite-' .. i}) - end -end - -if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-REPAIR'].value then - for _, v in pairs(data.raw['repair-tool']) do - v.speed = v.speed * settings.startup['PHI-MI-REPAIR'].value - v.durability = v.durability * settings.startup['PHI-MI-REPAIR'].value - end -end - -if settings.startup['PHI-MI'].value and (tonumber(settings.startup['PHI-MI-LANDFILL'].value) ~= 20) then - data.raw.recipe['landfill'].ingredients = { - {'stone', tonumber(settings.startup['PHI-MI-LANDFILL'].value)} - } -end - -if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-EFFCY'].value then - data.raw['module']['effectivity-module'].effect = {consumption = {bonus = -0.5}, pollution = {bonus = -0.1}} - data.raw['module']['effectivity-module-2'].effect = {consumption = {bonus = -1.0}, pollution = {bonus = -0.15}} - data.raw['module']['effectivity-module-3'].effect = {consumption = {bonus = -1.5}, pollution = {bonus = -0.2}} -end - -if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-NUCLEAR'].value then - 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['pipe'], data.raw['pipe-to-ground']}) do - for _, v in pairs(t) do - if v.fluid_box.height then - v.fluid_box.height = v.fluid_box.height * s - - else - v.fluid_box.height = s - end - end - end - - for _, v in pairs(data.raw['pump']) do - if v.fluid_box.height then - v.fluid_box.height = v.fluid_box.height * s - - else - v.fluid_box.height = s - end - - 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 - - for _, t in pairs({data.raw['locomotive'], data.raw['cargo-wagon'], data.raw['fluid-wagon'], data.raw['artillery-wagon']}) do - for _, v in pairs(t) do - v.max_health = v.max_health * s - v.max_speed = v.max_speed * s - v.braking_force = v.braking_force * s - - if v.max_power then - v.max_power = tostring(tonumber(string.match(v.max_power, '[%d%.]+')) * s) .. string.match(v.max_power, '%a+') - v.reversing_power_modifier = 1 - end - end - end -end - -if settings.startup['PHI-MB'].value and mods['space-exploration'] and settings.startup['PHI-MB-MINING-TIER'].value > 1 then - data.raw['mining-drill']['se-core-miner-drill'].fast_replaceable_group = 'se-core-miner-drill' - - local se = { - type = 'mining-drill', - name = 'se-core-miner-drill', - ref_name = 'se-core-miner-drill', - min = 2, - max = 3 - } - - for i=2, settings.startup['PHI-MB-MINING-TIER'].value do - local miner_name = 'se-core-miner-' .. i - local drill_name = 'se-core-miner-drill-' .. i - - main.EEE(se, i) - data.raw['mining-drill'][drill_name].minable.result = miner_name - data.raw['mining-drill'][drill_name].placeable_by.item = miner_name - - local item = table.deepcopy(data.raw['item']['se-core-miner']) - item.name = 'se-core-miner-' .. i - item.place_result = drill_name - item.order = 'zzzz-core-miner-' .. i - - item.icons = { - { - icon = '__space-exploration-graphics__/graphics/icons/core-miner.png', - tint = items['tint'][i], - icon_size = 64, - } - } - - item.icon = nil - item.icon_size = nil - item.localised_name = {'name.se-core-miner-drill'} - item.localised_description = {'description.se-core-miner-drill'} - data:extend({item}) - - if i > 2 then - data:extend({{ - type = 'recipe', - name = miner_name, - energy_required = 2, - enabled = false, - ingredients = {{name='se-core-miner-' .. (i - 1), amount=1}, {name='se-core-miner', amount=1}}, - result = miner_name, - localised_name = {'name.se-core-miner-drill'}, - localised_description = {'description.se-core-miner-drill'} - }}) - - else - data:extend({{ - type = 'recipe', - name = miner_name, - energy_required = 2, - enabled = false, - ingredients = {{name='se-core-miner', amount=2}}, - result = miner_name, - localised_name = {'name.se-core-miner-drill'}, - localised_description = {'description.se-core-miner-drill'} - }}) - end - - data.raw['mining-drill'][drill_name].fast_replaceable_group = data.raw['mining-drill']['se-core-miner-drill'].fast_replaceable_group - table.insert(data.raw.technology['se-core-miner'].effects, {type='unlock-recipe', recipe=miner_name}) - end -end - -if settings.startup['PHI-EQ'].value and settings.startup['PHI-EQ-ARMOR'].value then - data:extend({ - { - type = 'equipment-grid', - name = 'equipment-grid-14x14', - width = 14, - height = 14, - equipment_categories = {'armor'} - }, - { - type = 'armor', - name = 'power-armor-mk3', - icons = { - { - icon = '__base__/graphics/icons/power-armor-mk2.png', - tint = items['tint'][2], - icon_size = 64, - icon_mipmaps = 4 - } - }, - resistances = { - { - type = 'physical', - decrease = 20, - percent = 50 - }, - { - type = 'acid', - decrease = 20, - percent = 80 - }, - { - type = 'explosion', - decrease = 70, - percent = 60 - }, - { - type = 'fire', - decrease = 20, - percent = 80 - }, - { - type = 'laser', - decrease = 20, - percent = 50 - }, - { - type = 'electric', - decrease = 20, - percent = 50 - }, - { - type = 'impact', - decrease = 20, - percent = 50 - }, - { - type = 'poison', - decrease = 20, - percent = 50 - } - }, - subgroup = 'armor', - order = 'eb[power-armor-mk3]', - stack_size = 1, - infinite = true, - equipment_grid = 'equipment-grid-14x14', - inventory_size_bonus = 40, - open_sound = {filename = '__base__/sound/armor-open.ogg', volume = 1}, - close_sound = {filename = '__base__/sound/armor-close.ogg', volume = 1}, - localised_name = {'phi-cl.combine-gen', {'name.power-armor-mk2'}, 3}, - localised_description = {'description.power-armor-mk2'} - } - }) - - data:extend({{ - type = 'recipe', - name = 'power-armor-mk3', - energy_required = 2, - enabled = false, - ingredients = {{name='power-armor-mk2', amount=2}}, - result = 'power-armor-mk3', - localised_name = {'phi-cl.combine-gen', {'name.power-armor-mk2'}, 3}, - localised_description = {'description.power-armor-mk2'} - }}) - - for _, animation in ipairs(data.raw['character']['character']['animations']) do - if animation.armors then - for _, armor in ipairs(animation.armors) do - if armor == 'power-armor-mk2' then - animation.armors[#animation.armors + 1] = 'power-armor-mk3' - break - end - end - end - end - - table.insert(data.raw.technology['power-armor-mk2'].effects, {type='unlock-recipe', recipe='power-armor-mk3'}) -end - -if settings.startup['PHI-RS'].value then - local other_recipe_name = { - ['basic-oil-processing'] = true, - ['advanced-oil-processing'] = true, - ['light-oil-cracking'] = true, - ['heavy-oil-cracking'] = true, - ['uranium-processing'] = true, - ['kovarex-enrichment-process'] = true, - ['nuclear-fuel-reprocessing'] = true, - ['coal-liquefaction'] = true - } - - local item = table.deepcopy(data.raw.item['electric-furnace']) - item.name = 'electric-filter-furnace' - item.place_result = 'electric-filter-furnace' - item.order = item.order .. '2' - item.localised_name = {'name.electric-filter-furnace'} - item.localised_description = {'description.electric-filter-furnace'} - data:extend({item}) - - local entity = table.deepcopy(data.raw['furnace']['electric-furnace']) - entity.name = 'electric-filter-furnace' - entity.minable.result = 'electric-filter-furnace' - entity.type = 'assembling-machine' - entity.localised_name = {'name.electric-filter-furnace'} - entity.localised_description = {'description.electric-filter-furnace'} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'electric-filter-furnace', - energy_required = 2, - enabled = false, - ingredients = {{name='electric-furnace', amount=1}}, - result = 'electric-filter-furnace', - localised_name = {'name.electric-filter-furnace'}, - localised_description = {'description.electric-filter-furnace'} - }}) - - table.insert(data.raw.technology[items['item']['electric-filter-furnace'].tech].effects, {type='unlock-recipe', recipe='electric-filter-furnace'}) - data.raw['furnace']['electric-furnace'].fast_replaceable_group = 'electric-furnace' - data.raw['assembling-machine']['electric-filter-furnace'].fast_replaceable_group = data.raw['furnace']['electric-furnace'].fast_replaceable_group - data.raw['assembling-machine']['electric-filter-furnace'].crafting_categories = data.raw['furnace']['electric-furnace'].crafting_categories - - if settings.startup['PHI-RS-RECIPE-DROF'].value == 1 then - data.raw['utility-constants'].default.dynamic_recipe_overload_factor = 1.17 - - else - data.raw['utility-constants'].default.dynamic_recipe_overload_factor = settings.startup['PHI-RS-RECIPE-DROF'].value - end - - data.raw['utility-constants'].default.minimum_recipe_overload_multiplier = settings.startup['PHI-RS-RECIPE-MINROM'].value - data.raw['utility-constants'].default.maximum_recipe_overload_multiplier = settings.startup['PHI-RS-RECIPE-MAXROM'].value - - if settings.startup['PHI-RS-MODULE'].value then - items['recipe']['speed-module'].enabled = true - items['recipe']['speed-module-2'].enabled = true - items['recipe']['speed-module-3'].enabled = true - items['recipe']['productivity-module'].enabled = true - items['recipe']['productivity-module-2'].enabled = true - items['recipe']['productivity-module-3'].enabled = true - items['recipe']['effectivity-module'].enabled = true - items['recipe']['effectivity-module-2'].enabled = true - items['recipe']['effectivity-module-3'].enabled = true - end - - local recipe_multiplier = {} - - if settings.startup['PHI-RS-RECIPE-1'].value > 1 then - table.insert(recipe_multiplier, settings.startup['PHI-RS-RECIPE-1'].value) - end - - if settings.startup['PHI-RS-RECIPE-2'].value > 1 then - if settings.startup['PHI-RS-RECIPE-1'].value ~= settings.startup['PHI-RS-RECIPE-2'].value then - table.insert(recipe_multiplier, settings.startup['PHI-RS-RECIPE-2'].value) - end - end - - if #recipe_multiplier > 0 then - local prod_module_list = {} - - for k, v in pairs(data.raw.module) do - if v.limitation and string.find(v.name, 'productivity', 1, true) then - table.insert(prod_module_list, k) - end - end - - for k, v in pairs(items['recipe']) do - if v.enabled and data.raw.recipe[k] then - for j=1, #recipe_multiplier, 1 do - item = table.deepcopy(data.raw.recipe[k]) - item.enabled = false - item.name = k .. '-s' .. j - - if other_recipe_name[k] then - item.localised_name = {'phi-cl.combine', {'name.' .. k}, j} - item.localised_description = {'description.' .. k} - end - - if item.normal then - item.normal.hide_from_player_crafting = true - - if item.normal.ingredients then - for ik, iv in pairs(item.normal.ingredients) do - if iv[1] and iv[2] then - item.normal.ingredients[ik][2] = iv[2] * recipe_multiplier[j] - - else - item.normal.ingredients[ik].amount = iv.amount * recipe_multiplier[j] - end - end - end - - if item.normal.results then - for rk, rv in pairs(item.normal.results) do - if rv[1] and rv[2] then - item.normal.results[rk][2] = rv[2] * recipe_multiplier[j] - - else - item.normal.results[rk].amount = rv.amount * recipe_multiplier[j] - end - end - - else - if item.normal.result_count then - item.normal.result_count = item.normal.result_count * recipe_multiplier[j] - - else - item.normal.result_count = recipe_multiplier[j] - end - end - - if item.normal.energy_required then - item.normal.energy_required = item.normal.energy_required * recipe_multiplier[j] - - else - item.normal.energy_required = recipe_multiplier[j] - end - - else - item.hide_from_player_crafting = true - - if item.energy_required then - item.energy_required = item.energy_required * recipe_multiplier[j] - - else - item.energy_required = recipe_multiplier[j] - end - end - - if item.expensive then - item.expensive.hide_from_player_crafting = true - - if item.expensive.ingredients then - for ik, iv in pairs(item.expensive.ingredients) do - if iv[1] and iv[2] then - item.expensive.ingredients[ik][2] = iv[2] * recipe_multiplier[j] - - else - item.expensive.ingredients[ik].amount = iv.amount * recipe_multiplier[j] - end - end - end - - if item.expensive.results then - for rk, rv in pairs(item.expensive.results) do - if rv[1] and rv[2] then - item.expensive.results[rk][2] = rv[2] * recipe_multiplier[j] - - else - item.expensive.results[rk].amount = rv.amount * recipe_multiplier[j] - end - end - - else - if item.expensive.result_count then - item.expensive.result_count = item.expensive.result_count * recipe_multiplier[j] - - else - item.expensive.result_count = recipe_multiplier[j] - end - end - - if item.expensive.energy_required then - item.expensive.energy_required = item.expensive.energy_required * recipe_multiplier[j] - - else - item.expensive.energy_required = recipe_multiplier[j] - end - end - - if item.ingredients then - for ik, iv in pairs(item.ingredients) do - if iv[1] and iv[2] then - item.ingredients[ik][2] = iv[2] * recipe_multiplier[j] - - else - item.ingredients[ik].amount = iv.amount * recipe_multiplier[j] - end - end - end - - if item.results then - for rk, rv in pairs(item.results) do - if rv[1] and rv[2] then - item.results[rk][2] = rv[2] * recipe_multiplier[j] - - else - item.results[rk].amount = rv.amount * recipe_multiplier[j] - end - end - - else - if item.result_count then - item.result_count = item.result_count * recipe_multiplier[j] - - else - item.result_count = recipe_multiplier[j] - end - end - - data:extend({item}) - table.insert(data.raw.technology[v.tech].effects, {type='unlock-recipe', recipe=item.name}) - - for l=1, #prod_module_list, 1 do - table.insert(data.raw.module[prod_module_list[l]].limitation, item.name) - end - end - end - end - end -end - -if settings.startup['PHI-XW-WATER'].value > 0 then - local ocfs = 'offshore-pump' - - data.raw[ocfs][ocfs].pumping_speed = settings.startup['PHI-XW-WATER'].value * 20 - data.raw[ocfs][ocfs].flags = {'placeable-neutral', 'player-creation'} - data.raw[ocfs][ocfs].adjacent_tile_collision_box = {{-0.5, -0.25}, {0.5, 0.25}} - data.raw[ocfs][ocfs].adjacent_tile_collision_test = {'ground-tile', 'water-tile', 'object-layer'} - data.raw[ocfs][ocfs].adjacent_tile_collision_mask = nil - data.raw[ocfs][ocfs].placeable_position_visualization = nil - data.raw[ocfs][ocfs].se_allow_in_space = true - - if mods['angelsrefining'] then - local ofs = 'seafloor-pump' - - data.raw[ocfs][ofs].pumping_speed = settings.startup['PHI-XW-WATER'].value * 2 - data.raw[ocfs][ofs].flags = {'placeable-neutral', 'player-creation', 'filter-directions'} - data.raw[ocfs][ofs].adjacent_tile_collision_box = {{-2, -3}, {2, -2}} - data.raw[ocfs][ofs].adjacent_tile_collision_test = {'ground-tile', 'water-tile', 'object-layer'} - data.raw[ocfs][ofs].adjacent_tile_collision_mask = nil - data.raw[ocfs][ofs].placeable_position_visualization = nil - end - - if mods['exotic-industries'] then - local ofs = 'ei_gaia-pump' - - data.raw[ocfs][ofs].pumping_speed = settings.startup['PHI-XW-WATER'].value * 20 - data.raw[ocfs][ofs].flags = {'placeable-neutral', 'player-creation'} - data.raw[ocfs][ofs].adjacent_tile_collision_box = {{-0.5, -0.25}, {0.5, 0.25}} - data.raw[ocfs][ofs].adjacent_tile_collision_test = {'ground-tile', 'water-tile', 'object-layer'} - data.raw[ocfs][ofs].adjacent_tile_collision_mask = nil - data.raw[ocfs][ofs].placeable_position_visualization = nil - end -end - -if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-OIL'].value then - local item = table.deepcopy(data.raw['item']['offshore-pump']) - - item.name = 'oil-pump' - item.place_result = 'oil-pump' - item.order = 'b[fluids]-a[offshore-pump]-o' - - item.icons = { - { - icon = '__base__/graphics/icons/offshore-pump.png', - tint = items['tint'][2], - icon_size = 64, - icon_mipmaps = 4 - } - } - - item.icon = nil - item.icon_size = nil - item.icon_mipmaps = nil - item.localised_name = {'name.oil-pump'} - item.localised_description = {'description.oil-pump'} - data:extend({item}) - - local entity = table.deepcopy(data.raw['offshore-pump']['offshore-pump']) - entity.name = 'oil-pump' - entity.minable.result = 'oil-pump' - entity.fluid = 'crude-oil' - entity.fluid_box.filter = 'crude-oil' - entity.se_allow_in_space = true - entity.localised_name = {'name.oil-pump'} - entity.localised_description = {'description.oil-pump'} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = 'oil-pump', - energy_required = 2, - enabled = true, - ingredients = {{'electronic-circuit', 2}, {'pipe', 1}, {'iron-gear-wheel', 1}}, - result = 'oil-pump', - localised_name = {'name.oil-pump'}, - localised_description = {'description.oil-pump'} - }}) -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' diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua new file mode 100644 index 0000000..3677852 --- /dev/null +++ b/PHI-CL/data.lua @@ -0,0 +1,599 @@ +local items = require 'config' +local main = require 'main' +local file_stage = 1 + +if settings.startup['PHI-EN'].value and settings.startup['PHI-EN-SOLAR-TIER'].value and settings.startup['PHI-EN-STEAM-TIER'].value and settings.startup['PHI-EN-NUCLEAR-TIER'].value then + local ml = math.max(settings.startup['PHI-EN-SOLAR-TIER'].value, settings.startup['PHI-EN-STEAM-TIER'].value, settings.startup['PHI-EN-NUCLEAR-TIER'].value) + + for i=1, 7 do + local tn = 'compound-energy-' .. i + local prereq + local e = true + + if i > 1 then + prereq = {'compound-energy-' .. (i - 1)} + + else + prereq = {'solar-energy', 'advanced-circuit', 'electric-energy-accumulators'} + end + + if i > ml then + e = false + end + + data:extend({{ + type = 'technology', + name = tn, + enabled = e, + prerequisites = prereq, + effects = {}, + unit = { + count = math.floor(100 * (i ^ 1.6)), + ingredients = { + {'automation-science-pack', 1}, + {'logistic-science-pack', 1} + }, + time = 60 + }, + icons = { + { + icon = '__base__/graphics/technology/solar-energy.png', + icon_size = 256, + tint = items['tint'][i] + } + }, + order = 'a-h-' .. i, + localised_name = {'phi-cl.combine', {'technology-name.compound-energy'}, tostring(i)}, + localised_description = {'technology-description.compound-energy'} + }}) + end +end + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-RADAR'].value then + local item = table.deepcopy(data.raw['item']['radar']) + item.name = 'super-radar' + item.place_result = 'super-radar' + item.order = 'd[radar]-b[radar]' + + item.icons = { + { + icon = item.icon or '__base__/graphics/icons/radar.png', + tint = items['tint'][8], + icon_size = item.icon_size or 64, + icon_mipmaps = item.icon_mipmaps or 4 + } + } + + item.icon = nil + item.icon_size = nil + item.icon_mipmaps = nil + item.localised_name = {'name.super-radar'} + item.localised_description = {'description.super-radar'} + data:extend({item}) + + local entity = table.deepcopy(data.raw['radar']['radar']) + entity.name = 'super-radar' + entity.minable.result = 'super-radar' + entity.max_distance_of_sector_revealed = 35 + entity.max_distance_of_nearby_sector_revealed = 35 + entity.pictures.layers[1].tint = items['tint'][8] + entity.localised_name = {'name.super-radar'} + entity.localised_description = {'description.super-radar'} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'super-radar', + energy_required = 2, + enabled = true, + ingredients = {{type='item', name='electronic-circuit', amount=5}, {type='item', name='iron-gear-wheel', amount=5}, {type='item', name='iron-plate', amount=10}}, + results = {{type='item', name='super-radar', amount=1}}, + main_product = 'super-radar', + localised_name = {'name.super-radar'}, + localised_description = {'description.super-radar'} + }}) +end + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRASH'].value then + local item = table.deepcopy(data.raw['item']['steel-chest']) + item.name = 'trash-chest' + item.place_result = 'trash-chest' + item.order = 'b[storage]-h[trash-chest]' + + item.icons = { + { + icon = item.icon or '__base__/graphics/icons/steel-chest.png', + tint = items['tint'][8], + icon_size = item.icon_size or 64, + icon_mipmaps = item.icon_mipmaps or 4 + } + } + + item.icon = nil + item.icon_size = nil + item.icon_mipmaps = nil + item.localised_name = {'name.trash-chest'} + item.localised_description = {'description.trash-chest'} + data:extend({item}) + + 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' + entity.erase_contents_when_mined = true + entity.logistic_mode = nil + entity.next_upgrade = nil + entity.picture.layers[1].tint = items['tint'][8] + entity.localised_name = {'name.trash-chest'} + entity.localised_description = {'description.trash-chest'} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'trash-chest', + energy_required = 2, + enabled = false, + ingredients = {{type='item', name='steel-chest', amount=1}}, + results = {{type='item', name='trash-chest', amount=1}}, + main_product = 'trash-chest', + localised_name = {'name.trash-chest'}, + localised_description = {'description.trash-chest'} + }}) + + table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='trash-chest'}) + + item = table.deepcopy(data.raw['item']['pipe']) + item.name = 'trash-pipe' + item.place_result = 'trash-pipe' + item.order = 'a[pipe]-c[trash-pipe]' + + item.icons = { + { + icon = item.icon or '__base__/graphics/icons/pipe.png', + tint = items['tint'][8], + icon_size = item.icon_size or 64, + icon_mipmaps = item.icon_mipmaps or 4 + } + } + + item.icon = nil + item.icon_size = nil + item.icon_mipmaps = nil + item.localised_name = {'name.trash-pipe'} + item.localised_description = {'description.trash-pipe'} + data:extend({item}) + + entity = table.deepcopy(data.raw['pipe']['pipe']) + entity.name = 'trash-pipe' + entity.minable.result = 'trash-pipe' + entity.inventory_size = 1 + entity.type = 'infinity-pipe' + entity.gui_mode = 'none' + entity.erase_contents_when_mined = true + entity.next_upgrade = nil + + for _, v in pairs(entity.pictures) do + v.tint = items['tint'][8] + + if v.hr_version then + v.hr_version.tint = items['tint'][8] + end + end + + entity.se_allow_in_space = true + entity.localised_name = {'name.trash-pipe'} + entity.localised_description = {'description.trash-pipe'} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'trash-pipe', + energy_required = 2, + enabled = false, + ingredients = {{type='item', name='iron-plate', amount=1}}, + results = {{type='item', name='trash-pipe', amount=1}}, + main_product = 'trash-pipe', + localised_name = {'name.trash-pipe'}, + localised_description = {'description.trash-pipe'} + }}) + + table.insert(data.raw.technology['automation'].effects, {type='unlock-recipe', recipe='trash-pipe'}) +end + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-LINKED'].value then + local item = table.deepcopy(data.raw['item']['linked-chest']) + item.supgroup = 'storage' + item.order = 'a[items]-d[linked-chest]' + 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' + entity.se_allow_in_space = true + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'linked-chest', + energy_required = 2, + enabled = false, + ingredients = {{type='item', name='steel-chest', amount=1}}, + results = {{type='item', name='linked-chest', amount=1}}, + main_product = 'linked-chest' + }}) + + table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='linked-chest'}) +end + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-LOADER'].value then + data.raw.recipe['loader'].hidden = false + data.raw.recipe['fast-loader'].hidden = false + data.raw.recipe['express-loader'].hidden = false + + table.insert(data.raw.technology['logistics'].effects, {type='unlock-recipe', recipe='loader'}) + table.insert(data.raw.technology['logistics-2'].effects, {type='unlock-recipe', recipe='fast-loader'}) + table.insert(data.raw.technology['logistics-3'].effects, {type='unlock-recipe', recipe='express-loader'}) +end + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-ENERGY'].value then + local item = table.deepcopy(data.raw['item']['electric-energy-interface']) + item.name = 'passive-energy-void' + item.place_result = 'passive-energy-void' + item.localised_name = {'name.passive-energy-void'} + item.localised_description = {'description.passive-energy-void'} + data:extend({item}) + + local entity = table.deepcopy(data.raw['electric-energy-interface']['electric-energy-interface']) + entity.name = 'passive-energy-void' + entity.minable.result = 'passive-energy-void' + entity.energy_source.usage_priority = 'tertiary' + entity.energy_source.emissions_per_minute = {pollution = 0} + entity.energy_source.input_flow_limit = '1TW' + entity.energy_source.output_flow_limit = '0W' + entity.energy_production = '0W' + entity.energy_usage = '1TW' + entity.gui_mode = 'none' + entity.localised_name = {'name.passive-energy-void'} + entity.localised_description = {'description.passive-energy-void'} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'passive-energy-void', + energy_required = 2, + enabled = false, + ingredients = {{type='item', name='accumulator', amount=1}}, + results = {{type='item', name='passive-energy-void', amount=1}}, + main_product = 'passive-energy-void', + localised_name = {'name.passive-energy-void'}, + localised_description = {'description.passive-energy-void'} + }}) + + table.insert(data.raw.technology['electric-energy-accumulators'].effects, {type='unlock-recipe', recipe='passive-energy-void'}) +end + +if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-BOILER'].value then + local item = table.deepcopy(data.raw['item']['boiler']) + item.name = 'electric-boiler' + item.place_result = 'electric-boiler' + item.order = 'b[steam-power]-a[electric-boiler]' + item.localised_name = {'name.electric-boiler'} + item.localised_description = {'description.electric-boiler'} + data:extend({item}) + + local entity = table.deepcopy(data.raw['boiler']['boiler']) + entity.name = 'electric-boiler' + entity.energy_consumption = '7200kW' + entity.buffer_capacity = '14400kJ' + entity.target_temperature = 165 + entity.emissions_per_minute = {pollution = 0} + + entity.minable = { + hardness = 0.2, + mining_time = 0.5, + result = 'electric-boiler' + } + + entity.energy_source = { + type = 'electric', + usage_priority = 'secondary-input', + buffer_capacity = '14400kJ', + light_flicker = { + color = {r=0.5, g=1, b=1, a=0.5}, + minimum_light_size = 0.1, + light_intensity_to_size_coefficient = 1 + } + } + + entity.fire_flicker_enabled = false + entity.fire_glow_flicker_enabled = false + entity.fire = {} + entity.localised_name = {'name.electric-boiler'} + entity.localised_description = {'description.electric-boiler'} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'electric-boiler', + energy_required = 2, + enabled = true, + ingredients = {{type='item', name='boiler', amount=1}, {type='item', name='electronic-circuit', amount=1}}, + results = {{type='item', name='electric-boiler', amount=1}}, + main_product = 'electric-boiler', + localised_name = {'name.electric-boiler'}, + localised_description = {'description.electric-boiler'} + }}) + + -- electric boiler + data.raw['boiler']['boiler'].fast_replaceable_group = 'boiler' + data.raw['boiler']['electric-boiler'].fast_replaceable_group = data.raw['boiler']['electric-boiler'].fast_replaceable_group +end + +if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-CHEST'].value then + local chests = { + 'steel-chest', + 'passive-provider-chest', + 'active-provider-chest', + 'storage-chest', + 'buffer-chest', + 'requester-chest' + } + + for _, c in pairs(chests) do + local item = table.deepcopy(data.raw['item'][c]) + local entity + + if c == 'steel-chest' then + entity = table.deepcopy(data.raw['container'][c]) + + else + entity = table.deepcopy(data.raw['logistic-container'][c]) + end + + item.name = 'basic-' .. c + item.place_result = 'basic-' .. c + item.order = 'b[storage]-h[basic-' .. c .. ']' + item.localised_name = {'name.basic-'.. c} + item.localised_description = {'description.basic-'.. c} + data:extend({item}) + + entity.inventory_type = 'with_filters_and_bar' + entity.inventory_size = 1 + entity.max_logistic_slots = 1 + entity.name = 'basic-' .. c + entity.minable.result = 'basic-' .. c + entity.localised_name = {'name.basic-'.. c} + entity.localised_description = {'description.basic-'.. c} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'basic-' .. c, + energy_required = 2, + enabled = false, + ingredients = {{type='item', name=c, amount=1}}, + results = {{type='item', name='basic-' .. c, amount=1}}, + main_product = 'basic-' .. c, + localised_name = {'name.basic-' .. c}, + localised_description = {'description.basic-' .. c} + }}) + end + + table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='basic-steel-chest'}) + + for _, t in pairs({'construction', 'logistic'}) do + for _, r in pairs({'passive-provider', 'storage'}) do + table.insert(data.raw.technology[t .. '-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-' .. r}) + end + end + + for _, r in pairs({'active-provider', 'buffer', 'requester'}) do + table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-' .. r}) + end +end +if settings.startup['PHI-EN'].value and settings.startup['PHI-EN-NUCLEAR-TIER'].value > 1 then + data.raw['fluid']['steam'].max_temperature = 5000 +end + +if settings.startup['PHI-MI'].value and (settings.startup['PHI-MI-LANDFILL'].value ~= 50) then + data.raw.recipe['landfill'].ingredients = {{type='item', name='stone', amount=settings.startup['PHI-MI-LANDFILL'].value}} +end + +if settings.startup['PHI-EQ'].value and settings.startup['PHI-EQ-ARMOR'].value then + data:extend({ + { + type = 'equipment-grid', + name = 'equipment-grid-14x14', + width = 14, + height = 14, + equipment_categories = {'armor'} + }, + { + type = 'armor', + name = 'power-armor-mk3', + icons = { + { + icon = '__base__/graphics/icons/power-armor-mk2.png', + tint = items['tint'][2], + icon_size = 64, + icon_mipmaps = 4 + } + }, + resistances = { + { + type = 'physical', + decrease = 20, + percent = 50 + }, + { + type = 'acid', + decrease = 20, + percent = 80 + }, + { + type = 'explosion', + decrease = 70, + percent = 60 + }, + { + type = 'fire', + decrease = 20, + percent = 80 + }, + { + type = 'laser', + decrease = 20, + percent = 50 + }, + { + type = 'electric', + decrease = 20, + percent = 50 + }, + { + type = 'impact', + decrease = 20, + percent = 50 + }, + { + type = 'poison', + decrease = 20, + percent = 50 + } + }, + subgroup = 'armor', + order = 'eb[power-armor-mk3]', + stack_size = 1, + infinite = true, + equipment_grid = 'equipment-grid-14x14', + inventory_size_bonus = 40, + open_sound = {filename = '__base__/sound/armor-open.ogg', volume = 1}, + close_sound = {filename = '__base__/sound/armor-close.ogg', volume = 1}, + localised_name = {'phi-cl.combine-gen', {'name.power-armor-mk2'}, '3'}, + localised_description = {'description.power-armor-mk2'} + } + }) + + data:extend({{ + type = 'recipe', + name = 'power-armor-mk3', + energy_required = 2, + enabled = false, + ingredients = {{type='item', name='power-armor-mk2', amount=2}}, + results = {{type='item', name='power-armor-mk3', amount=1}}, + main_product = 'power-armor-mk3', + localised_name = {'phi-cl.combine-gen', {'name.power-armor-mk2'}, '3'}, + localised_description = {'description.power-armor-mk2'} + }}) + + for _, animation in ipairs(data.raw['character']['character']['animations']) do + if animation.armors then + for _, armor in ipairs(animation.armors) do + if armor == 'power-armor-mk2' then + animation.armors[#animation.armors + 1] = 'power-armor-mk3' + break + end + end + end + end + + table.insert(data.raw.technology['power-armor-mk2'].effects, {type='unlock-recipe', recipe='power-armor-mk3'}) +end + +if settings.startup['PHI-XW-WATER'].value > 0 then + local ocfs = 'offshore-pump' + + data.raw[ocfs][ocfs].pumping_speed = settings.startup['PHI-XW-WATER'].value * 20 + data.raw[ocfs][ocfs].flags = {'placeable-neutral', 'player-creation'} + data.raw[ocfs][ocfs].layers = { + item = true, + object = true, + player = true, + water_tile = true, + elevated_rail = true + } + data.raw[ocfs][ocfs].adjacent_tile_collision_mask = nil + data.raw[ocfs][ocfs].adjacent_tile_collision_test = {'ground-tile'} + data.raw[ocfs][ocfs].tile_buildability_rules = nil + data.raw[ocfs][ocfs].water_reflection = nil +end + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-OIL'].value then + local item = table.deepcopy(data.raw['item']['offshore-pump']) + + item.name = 'oil-pump' + item.place_result = 'oil-pump' + item.order = 'b[fluids]-a[offshore-pump]-o' + + item.icons = { + { + icon = '__base__/graphics/icons/offshore-pump.png', + tint = items['tint'][2], + icon_size = 64, + icon_mipmaps = 4 + } + } + + item.icon = nil + item.icon_size = nil + item.icon_mipmaps = nil + item.localised_name = {'name.oil-pump'} + item.localised_description = {'description.oil-pump'} + data:extend({item}) + + local entity = table.deepcopy(data.raw['offshore-pump']['offshore-pump']) + entity.name = 'oil-pump' + entity.minable.result = 'oil-pump' + entity.fluid = 'crude-oil' + entity.fluid_box.filter = 'crude-oil' + entity.localised_name = {'name.oil-pump'} + entity.localised_description = {'description.oil-pump'} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'oil-pump', + energy_required = 2, + enabled = true, + ingredients = {{type='item', name='electronic-circuit', amount=2}, {type='item', name='pipe', amount=1}, {type='item', name='iron-gear-wheel', amount=1}}, + results = {{type='item', name='oil-pump', amount=1}}, + main_product = 'oil-pump', + localised_name = {'name.oil-pump'}, + localised_description = {'description.oil-pump'} + }}) +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' + + for j=v.min, v.max, 1 do + main.EEE(v, j) + main.EI(v, j) + main.ER(v, j) + main.ET(v, j) + end + + main.EL(v) + end +end + +for _, v in pairs(items['equipment']) do + if (v.stage == file_stage) and v.enabled and (v.max >= v.min) then + v.category = 'equipment' + + for j=v.min, v.max, 1 do + main.EEQ(v, j) + main.EI(v, j) + main.ER(v, j) + main.ET(v, j) + end + end +end diff --git a/PHI-CL/info.json b/PHI-CL/info.json index 897831b..8952ddb 100644 --- a/PHI-CL/info.json +++ b/PHI-CL/info.json @@ -1,20 +1,17 @@ { "name": "PHI-CL", - "version": "2.0.52", - "factorio_version": "1.1", - "date": "2024-10-09", + "version": "3.0.0", + "factorio_version": "2.0", + "date": "2024-10-16", "title": "Phidias Collection", "author": "PHIDIAS0303", "contributers": "", "homepage": "", "description": "Additional compound entities and items to reduce the space needed\nSuch as better solar panel, accumulator\nAnd other feature such as water pump placement anywhere, large range radar, trash chest and pipe, passive power void, linked chest, empty world generation", "dependencies": [ - "base >= 1.1.0", - "? aai-industry >= 0.5.0", - "? Krastorio2 >= 1.3.0", - "? space-exploration >= 0.6.0", - "(?) big-mining-drill >= 0.1.0", - "(?) angelsrefining >= 0.12.0", - "(?) exotic-industries >= 0.6.0" + "base >= 2.0.0", + "? space-age", + "? quality >= 2.0.0", + "? elevated-rails > 2.0.0" ] } \ No newline at end of file diff --git a/PHI-CL/locale/en/locale.cfg b/PHI-CL/locale/en/locale.cfg index 3d4985c..a6a8019 100644 --- a/PHI-CL/locale/en/locale.cfg +++ b/PHI-CL/locale/en/locale.cfg @@ -40,7 +40,6 @@ large-area-electric-mining-drill=Large area electric mining drill passive-energy-void=Passive energy void empty-train-battery=Empty train battery charged-train-battery=Charged train battery -satellite=Satellite solar-panel-equipment=Portable solar panel battery-mk2-equipment=Personal battery @@ -52,17 +51,6 @@ night-vision-equipment=Nightvision equipment exoskeleton-equipment=Exoskeleton power-armor-mk2=Power armor -basic-oil-processing=Basic oil processing -advanced-oil-processing=Advanced oil processing -light-oil-cracking=Light oil cracking to petroleum gas -heavy-oil-cracking=Heavy oil cracking to light oil -uranium-processing=Uranium processing -kovarex-enrichment-process=Kovarex enrichment process -nuclear-fuel-reprocessing=Nuclear fuel reprocessing -coal-liquefaction=Coal liquefaction -wood-production=Wood production -fish-production=Fish production - industrial-furnace=Industrial furnace fuel-processor=Fuel processor area-mining-drill=Big mining drill @@ -153,11 +141,9 @@ oil-pump= super-radar=Scans the nearby sectors, and actively reveals an area around it. trash-chest= trash-pipe= -large-area-electric-mining-drill= passive-energy-void= empty-train-battery= charged-train-battery= -satellite=The satellite should be put into the rocket. solar-panel-equipment=Provides power for equipment modules. battery-mk2-equipment=Stores electric energy for equipment modules. @@ -169,17 +155,6 @@ night-vision-equipment=Allows you to see more clearly in darkness. exoskeleton-equipment=Inserted into armor to increase movement speed. You can equip multiple exoskeletons at once. power-armor-mk2=Armor with a huge equipment grid and inventory size bonus. -basic-oil-processing= -advanced-oil-processing= -light-oil-cracking= -heavy-oil-cracking= -uranium-processing= -kovarex-enrichment-process= -nuclear-fuel-reprocessing= -coal-liquefaction= -wood-production= -fish-production= - industrial-furnace=Can use advanced smelting and metallurgy recipes but not kiln recipes. fuel-processor=Process any chemical fuels into processed fuel. area-mining-drill=A larger electric mining drill with increased range, speed and an extra module slots. @@ -297,14 +272,6 @@ PHI-MI-ROBOT=MI8 Robot efficiency PHI-MI-TRAIN=MI9 Train efficiency PHI-MI-ARTILLERY=MI10 Artillery range -PHI-RS=RS Recipe scaling -PHI-RS-RECIPE-1=RS1 Recipe scale 1 -PHI-RS-RECIPE-2=RS2 Recipe scale 2 -PHI-RS-RECIPE-DROF=RS3 Dynamic Recipe Overload Factor -PHI-RS-RECIPE-MINROM=RS4 Minimum Recipe Overload Multiplier -PHI-RS-RECIPE-MAXROM=RS5 Maximum Recipe Overload Multiplier -PHI-RS-MODULE=RS6 Module - PHI-XW-WATER=XW Water anywhere PHI-XC=XC Clock GUI @@ -374,12 +341,6 @@ PHI-MI-PIPE=Default 1 PHI-MI-ROBOT=Default 1 PHI-MI-TRAIN=Default 1 -PHI-RS-RECIPE-1=Default 4 ; Disable 1 -PHI-RS-RECIPE-2=Default 8 ; Disable 1 -PHI-RS-RECIPE-DROF=Default 1 -PHI-RS-RECIPE-MINROM=Default 2 -PHI-RS-RECIPE-MAXROM=Default 100 - PHI-PB-CMMS=Default 2 PHI-PB-CRS=Default 1.5 PHI-PB-CCS=Default 5 diff --git a/PHI-CL/locale/ja/locale.cfg b/PHI-CL/locale/ja/locale.cfg index c257ed5..36e0fe7 100644 --- a/PHI-CL/locale/ja/locale.cfg +++ b/PHI-CL/locale/ja/locale.cfg @@ -36,11 +36,9 @@ oil-pump=オイルポンプ super-radar=スーパーレーダー trash-chest=ごみチェスト trash-pipe=ごみパイプ -large-area-electric-mining-drill=大型電動掘削機 passive-energy-void=パッシブエネルギーボイド empty-train-battery=空の列車バッテリー charged-train-battery=充電済み列車用バッテリー -satellite=衛星 solar-panel-equipment=携帯ソーラーパネルモジュール battery-mk2-equipment=個人用バッテリー @@ -52,17 +50,6 @@ night-vision-equipment=暗視モジュール exoskeleton-equipment=強化外骨格モジュール power-armor-mk2=パワーアーマー -basic-oil-processing=基本的な石油加工 -advanced-oil-processing=発展的な石油加工 -light-oil-cracking=軽油を石油ガスに分解 -heavy-oil-cracking=重油を軽油に分解 -uranium-processing=ウラン濃縮処理 -kovarex-enrichment-process=Kovarex濃縮プロセス -nuclear-fuel-reprocessing=核燃料再処理 -coal-liquefaction=石炭液化 -wood-production=木材生産 -fish-production=魚の生産 - industrial-furnace=工業炉 fuel-processor=燃料加工所 area-mining-drill=大型掘削機 @@ -153,11 +140,9 @@ oil-pump= super-radar=近隣の領域をスキャンし、その周囲のエリアを探索します。 trash-chest= trash-pipe= -large-area-electric-mining-drill= passive-energy-void= empty-train-battery= charged-train-battery= -satellite=衛星はロケットに積んでください。 solar-panel-equipment=装備用モジュールに電力を供給します。 battery-mk2-equipment=装備用モジュール向けに電力を貯蓄します。 @@ -169,17 +154,6 @@ night-vision-equipment=アーマーに挿入して使い、夜間の視界を改 exoskeleton-equipment=プレイヤーの移動速度を上昇させます。 power-armor-mk2=巨大な装備グリッドとインベントリサイズボーナス付きアーマー。 -basic-oil-processing= -advanced-oil-processing= -light-oil-cracking= -heavy-oil-cracking= -uranium-processing= -kovarex-enrichment-process= -nuclear-fuel-reprocessing= -coal-liquefaction= -wood-production= -fish-production= - industrial-furnace=高度な製錬と冶金のレシピを使用できますが、れんがなどを焼けません。 fuel-processor=通常の燃料を加工燃料へと処理します。 area-mining-drill=掘削範囲が広く高速でモジュールスロットを追加した、より大型の電動掘削機です。 @@ -297,14 +271,6 @@ PHI-MI-ROBOT=MI8 ロボット効率 PHI-MI-TRAIN=MI9 列車効率 PHI-MI-ARTILLERY=MI10 長距離砲射程 -PHI-RS=RS レシピ スケーリング -PHI-RS-RECIPE-1=RS1 レシピ規模 1 -PHI-RS-RECIPE-2=RS1 レシピ規模 2 -PHI-RS-RECIPE-DROF=RS3 動的レシピ過負荷係数 -PHI-RS-RECIPE-MINROM=RS4 最小レシピ過負荷乗数 -PHI-RS-RECIPE-MAXROM=RS5 最大レシピ過負荷乗数 -PHI-RS-MODULE=RS6 モジュール - PHI-XW-WATER=XW どこでも水 PHI-XC=XC 時計 GUI @@ -374,12 +340,6 @@ PHI-MI-PIPE=デフォルト 1 PHI-MI-ROBOT=デフォルト 1 PHI-MI-TRAIN=デフォルト 1 -PHI-RS-RECIPE-1=デフォルト 4 ; 止める 1 -PHI-RS-RECIPE-2=デフォルト 8 ; 止める 1 -PHI-RS-RECIPE-DROF=デフォルト 1 -PHI-RS-RECIPE-MINROM=デフォルト 2 -PHI-RS-RECIPE-MAXROM=デフォルト 100 - PHI-PB-CMMS=デフォルト 2 PHI-PB-CRS=デフォルト 1.5 PHI-PB-CCS=デフォルト 5 diff --git a/PHI-CL/locale/zh-CN/locale.cfg b/PHI-CL/locale/zh-CN/locale.cfg index 707bcd2..971dcd4 100644 --- a/PHI-CL/locale/zh-CN/locale.cfg +++ b/PHI-CL/locale/zh-CN/locale.cfg @@ -36,11 +36,9 @@ oil-pump=抽油泵 super-radar=超級雷達 trash-chest=垃圾箱 trash-pipe=垃圾管 -large-area-electric-mining-drill=大型電能採礦機 passive-energy-void=被動能量消除器 empty-train-battery=空火車電池 charged-train-battery=已充電火車電池 -satellite=衛星 solar-panel-equipment=攜帶式太陽能板 battery-mk2-equipment=電池設備 @@ -52,17 +50,6 @@ night-vision-equipment=夜視鏡 exoskeleton-equipment=動力外骨骼 power-armor-mk2=動力護甲 -basic-oil-processing=基礎石油加工 -advanced-oil-processing=高等石油加工 -light-oil-cracking=輕油裂解為石油氣 -heavy-oil-cracking=重油裂解為輕油 -uranium-processing=鈾濃縮加工 -kovarex-enrichment-process=鈾增殖加工 -nuclear-fuel-reprocessing=核燃料後加工 -coal-liquefaction=液化煤 -wood-production=木材生產 -fish-production=魚類生產 - industrial-furnace=工業熔爐 fuel-processor=燃料加工機 area-mining-drill=大型採礦機 @@ -153,11 +140,9 @@ oil-pump= super-radar=掃描並顯示附近的未知區域。 trash-chest= trash-pipe= -large-area-electric-mining-drill= passive-energy-void= empty-train-battery= charged-train-battery= -satellite=此衛星應放入火箭內。 solar-panel-equipment=替裝備的模組供電。 battery-mk2-equipment=為設備模組儲存電力。 @@ -169,17 +154,6 @@ night-vision-equipment=放入模組化裝甲可使玩家獲得夜視能力。 exoskeleton-equipment=用於插入模組化裝甲,可提高玩家的移動速度。你可以同時裝備多個外骨骼模組。 power-armor-mk2=具有巨大模組化插槽和背包容量加成的裝甲。 -basic-oil-processing= -advanced-oil-processing= -light-oil-cracking= -heavy-oil-cracking= -uranium-processing= -kovarex-enrichment-process= -nuclear-fuel-reprocessing= -coal-liquefaction= -wood-production= -fish-production= - industrial-furnace=與電爐相比,更大、速度快且具有更多插件插槽。需要選擇配方,但可以處理具有多種輸入和流體的高級的配方。 fuel-processor=將任何化學燃料製成成加工燃料。 area-mining-drill=具有更大作業範圍和額外插件插槽的礦機。 @@ -297,14 +271,6 @@ PHI-MI-ROBOT=MI8 無人機效率 PHI-MI-TRAIN=MI9 火車效率 PHI-MI-ARTILLERY=MI10 火炮炮彈射程 -PHI-RS=RS 配方規模 -PHI-RS-RECIPE-1=RS1 配方規模 1 -PHI-RS-RECIPE-2=RS2 配方規模 2 -PHI-RS-RECIPE-DROF=RS3 動態配方規模超載倍數 -PHI-RS-RECIPE-MINROM=RS4 配方規模超載下限倍數 -PHI-RS-RECIPE-MAXROM=RS5 配方規模超載上限倍數 -PHI-RS-MODULE=RS6 模組 - PHI-XW-WATER=XW 隨處水源 PHI-XC=XC 時鐘介面 @@ -374,12 +340,6 @@ PHI-MI-PIPE=預設 1 PHI-MI-ROBOT=預設 1 PHI-MI-TRAIN=預設 1 -PHI-RS-RECIPE-1=預設 4 ; 停用 1 -PHI-RS-RECIPE-2=預設 8 ; 停用 1 -PHI-RS-RECIPE-DROF=預設 1 -PHI-RS-RECIPE-MINROM=預設 2 -PHI-RS-RECIPE-MAXROM=預設 100 - PHI-PB-CMMS=預設 2 PHI-PB-CRS=預設 1.5 PHI-PB-CCS=預設 5 diff --git a/PHI-CL/locale/zh-TW/locale.cfg b/PHI-CL/locale/zh-TW/locale.cfg index 707bcd2..971dcd4 100644 --- a/PHI-CL/locale/zh-TW/locale.cfg +++ b/PHI-CL/locale/zh-TW/locale.cfg @@ -36,11 +36,9 @@ oil-pump=抽油泵 super-radar=超級雷達 trash-chest=垃圾箱 trash-pipe=垃圾管 -large-area-electric-mining-drill=大型電能採礦機 passive-energy-void=被動能量消除器 empty-train-battery=空火車電池 charged-train-battery=已充電火車電池 -satellite=衛星 solar-panel-equipment=攜帶式太陽能板 battery-mk2-equipment=電池設備 @@ -52,17 +50,6 @@ night-vision-equipment=夜視鏡 exoskeleton-equipment=動力外骨骼 power-armor-mk2=動力護甲 -basic-oil-processing=基礎石油加工 -advanced-oil-processing=高等石油加工 -light-oil-cracking=輕油裂解為石油氣 -heavy-oil-cracking=重油裂解為輕油 -uranium-processing=鈾濃縮加工 -kovarex-enrichment-process=鈾增殖加工 -nuclear-fuel-reprocessing=核燃料後加工 -coal-liquefaction=液化煤 -wood-production=木材生產 -fish-production=魚類生產 - industrial-furnace=工業熔爐 fuel-processor=燃料加工機 area-mining-drill=大型採礦機 @@ -153,11 +140,9 @@ oil-pump= super-radar=掃描並顯示附近的未知區域。 trash-chest= trash-pipe= -large-area-electric-mining-drill= passive-energy-void= empty-train-battery= charged-train-battery= -satellite=此衛星應放入火箭內。 solar-panel-equipment=替裝備的模組供電。 battery-mk2-equipment=為設備模組儲存電力。 @@ -169,17 +154,6 @@ night-vision-equipment=放入模組化裝甲可使玩家獲得夜視能力。 exoskeleton-equipment=用於插入模組化裝甲,可提高玩家的移動速度。你可以同時裝備多個外骨骼模組。 power-armor-mk2=具有巨大模組化插槽和背包容量加成的裝甲。 -basic-oil-processing= -advanced-oil-processing= -light-oil-cracking= -heavy-oil-cracking= -uranium-processing= -kovarex-enrichment-process= -nuclear-fuel-reprocessing= -coal-liquefaction= -wood-production= -fish-production= - industrial-furnace=與電爐相比,更大、速度快且具有更多插件插槽。需要選擇配方,但可以處理具有多種輸入和流體的高級的配方。 fuel-processor=將任何化學燃料製成成加工燃料。 area-mining-drill=具有更大作業範圍和額外插件插槽的礦機。 @@ -297,14 +271,6 @@ PHI-MI-ROBOT=MI8 無人機效率 PHI-MI-TRAIN=MI9 火車效率 PHI-MI-ARTILLERY=MI10 火炮炮彈射程 -PHI-RS=RS 配方規模 -PHI-RS-RECIPE-1=RS1 配方規模 1 -PHI-RS-RECIPE-2=RS2 配方規模 2 -PHI-RS-RECIPE-DROF=RS3 動態配方規模超載倍數 -PHI-RS-RECIPE-MINROM=RS4 配方規模超載下限倍數 -PHI-RS-RECIPE-MAXROM=RS5 配方規模超載上限倍數 -PHI-RS-MODULE=RS6 模組 - PHI-XW-WATER=XW 隨處水源 PHI-XC=XC 時鐘介面 @@ -374,12 +340,6 @@ PHI-MI-PIPE=預設 1 PHI-MI-ROBOT=預設 1 PHI-MI-TRAIN=預設 1 -PHI-RS-RECIPE-1=預設 4 ; 停用 1 -PHI-RS-RECIPE-2=預設 8 ; 停用 1 -PHI-RS-RECIPE-DROF=預設 1 -PHI-RS-RECIPE-MINROM=預設 2 -PHI-RS-RECIPE-MAXROM=預設 100 - PHI-PB-CMMS=預設 2 PHI-PB-CRS=預設 1.5 PHI-PB-CCS=預設 5 diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index 0420cc7..352cbfa 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -57,9 +57,7 @@ function main.EEE(source, tier) end if item.energy_usage then - local eu = tonumber(string.match(item.energy_usage, '[%d%.]+')) - local euu = string.match(item.energy_usage, '%a+') - item.energy_usage = eu * (2 ^ (tier - source.min + 1)) .. euu + item.energy_usage = tonumber(string.match(item.energy_usage, '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. string.match(item.energy_usage, '%a+') end if (source.type == 'electric-turret') or (source.type == 'ammo-turret') or (source.type == 'fluid-turret') then @@ -86,34 +84,20 @@ function main.EEE(source, tier) item.energy_source.input_flow_limit = tostring(tonumber(string.match(item.energy_source.input_flow_limit, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.energy_source.input_flow_limit, '%a+') item.energy_source.output_flow_limit = tostring(tonumber(string.match(item.energy_source.output_flow_limit, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.energy_source.output_flow_limit, '%a+') - for _, v in pairs({'charge_animation', 'discharge_animation'}) do - if item[v] and item[v].layers then - if item[v].layers[1] and item[v].layers[1].layers and item[v].layers[1].layers[1] then - item[v].layers[1].layers[1].tint = items['tint'][tier] + if item['chargable_graphics'] then + if item['chargable_graphics']['picture'].layers and item['chargable_graphics']['picture'].layers[1] then + item['chargable_graphics']['picture'].layers[1].tint = items['tint'][tier] + end - if item[v].layers[1].layers[1].hr_version then - item[v].layers[1].layers[1].hr_version.tint = items['tint'][tier] - end - end - - if item[v].layers[2] then - item[v].layers[2].tint = items['tint'][tier] - - if item[v].layers[2].hr_version then - item[v].layers[2].hr_version.tint = items['tint'][tier] - end + for _, v in pairs({item['chargable_graphics']['charge_animation'], item['chargable_graphics']['discharge_animation']}) do + if v.layers and v.layers[1] and v.layers[1].layers and v.layers[1].layers[1] then + v.layers[1].layers[1].tint = items['tint'][tier] end end end elseif (source.type == 'solar-panel') then - if (source.ref_name == 'solar-panel') then - item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.production, '%a+') - - - elseif (source.ref_name == 'se-space-solar-panel') then - item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 2))) .. string.match(item.production, '%a+') - end + item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.production, '%a+') elseif (source.type == 'boiler') then item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * tier) .. string.match(item.energy_consumption, '%a+') @@ -130,10 +114,7 @@ function main.EEE(source, tier) item.max_power_output = (tonumber(string.match(item.max_power_output, '[%d%.]+')) * (tier - source.min + 2)) .. string.match(item.max_power_output, '%a+') end - if source.name == 'kr-gas-power-station' then - item.fluid_usage_per_tick = item.fluid_usage_per_tick * (tier - source.min + 2) - - else + if item.maximum_temperature then item.maximum_temperature = 15 + ((item.maximum_temperature - 15) * tier) end @@ -195,40 +176,29 @@ function main.EEE(source, tier) 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 = item.rocket_parts_required * (tier - source.min + 2) - 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) - - tint_handle(item, tier, {'arm_01_back_animation', 'arm_02_right_animation', 'arm_03_front_animation', 'base_day_sprite', 'base_front_sprite', 'door_back_sprite', 'door_front_sprite', 'hole_sprite', 'rocket_glow_overlay_sprite', 'rocket_shadow_overlay_sprite', 'satellite_animation'}) end if item.crafting_speed then item.crafting_speed = item.crafting_speed * (2 ^ (tier - source.min + 1)) end + if item.energy_source then if item.energy_source.emissions_per_minute then if source.tech == 'compound-energy' then if (source.type == 'boiler') or (source.name == 'kr-gas-power-station') then - item.energy_source.emissions_per_minute = item.energy_source.emissions_per_minute * (tier - source.min + 2) + item.energy_source.emissions_per_minute.pollution = item.energy_source.emissions_per_minute.pollution * (tier - source.min + 2) else - item.energy_source.emissions_per_minute = item.energy_source.emissions_per_minute * (2 ^ (tier - source.min + 1)) + item.energy_source.emissions_per_minute.pollution = item.energy_source.emissions_per_minute.pollution * (2 ^ (tier - source.min + 1)) end else - item.energy_source.emissions_per_minute = item.energy_source.emissions_per_minute * (2 ^ (tier - source.min + 1)) + item.energy_source.emissions_per_minute.pollution = item.energy_source.emissions_per_minute.pollution * (2 ^ (tier - source.min + 1)) end end end - if source.name == 'electric-filter-furnace' then - item.type = 'assembling-machine' - end - - tint_handle(item, tier, {'picture', 'pictures', 'animation', 'horizontal_animation', 'vertical_animation', 'structure', 'integration_patch'}) + tint_handle(item, tier, {'picture', 'pictures', 'structure', 'frames', 'working_visualisations', 'animation', 'horizontal_animation', 'vertical_animation', 'structure', 'integration_patch'}) if item.idle_animation and item.idle_animation.layers then local i = 1 @@ -259,7 +229,7 @@ function main.EEE(source, tier) end if tier > 1 then - item.localised_name = {'phi-cl.combine', {'name.' .. source.ref_name}, tier} + item.localised_name = {'phi-cl.combine', {'name.' .. source.ref_name}, tostring(tier)} else item.localised_name = {'name.' .. source.ref_name} @@ -351,7 +321,7 @@ function main.EEQ(source, tier) end end - item.localised_name = {'phi-cl.combine-gen', {'name.' .. source.ref_name}, tier} + item.localised_name = {'phi-cl.combine-gen', {'name.' .. source.ref_name}, tostring(tier)} item.localised_description = {'description.' .. source.ref_name} data:extend({item}) @@ -393,17 +363,12 @@ function main.EI(source, tier) item.icons[1].icon_size = item.icon_size item.icon_size = nil end - - if item.icon_mipmaps then - item.icons[1].icon_mipmaps = item.icon_mipmaps - item.icon_mipmaps = nil - end end item.order = item.order .. tier if tier > 1 then - item.localised_name = {'phi-cl.combine', {'name.' .. source.ref_name}, tier} + item.localised_name = {'phi-cl.combine', {'name.' .. source.ref_name}, tostring(tier)} else item.localised_name = {'name.' .. source.ref_name} @@ -421,6 +386,12 @@ function main.ER(source, tier) local result_name = source.name local localised_name local localised_description = {'description.' .. source.ref_name} + local icons = { + { + icon = data.raw.item[source.ref_name].icon, + tint = items['tint'][tier] + } + } if source.category == 'equipment' then if (tier == 2) then @@ -433,7 +404,7 @@ function main.ER(source, tier) new_name = new_name .. '-mk' .. tier .. '-equipment' result_name = result_name .. '-mk' .. tier .. '-equipment' - localised_name = {'phi-cl.combine-gen', {'name.' .. source.ref_name}, tier} + localised_name = {'phi-cl.combine-gen', {'name.' .. source.ref_name}, tostring(tier)} else if tier > 2 then @@ -444,7 +415,7 @@ function main.ER(source, tier) result_name = result_name .. '-' .. tier if tier > 1 then - localised_name = {'phi-cl.combine', {'name.' .. source.ref_name}, tier} + localised_name = {'phi-cl.combine', {'name.' .. source.ref_name}, tostring(tier)} else localised_name = {'name.' .. source.ref_name} @@ -455,11 +426,13 @@ function main.ER(source, tier) if (source.type == 'solar-panel') or (source.type == 'accumulator') then data:extend({{ type = 'recipe', - name = new_name , + name = new_name, + icons = icons, energy_required = 2, enabled = false, - ingredients = {{name=ingredient_name, amount=4}}, - result = result_name, + ingredients = {{type='item', name=ingredient_name, amount=4}}, + results = {{type='item', name=result_name, amount=1}}, + main_product = result_name, localised_name = localised_name, localised_description = localised_description }}) @@ -468,11 +441,13 @@ function main.ER(source, tier) if tier > 2 then data:extend({{ type = 'recipe', - name = new_name , + name = new_name, + icons = icons, energy_required = 2, enabled = false, - ingredients = {{name=ingredient_name, amount=1}, {name=source.name, amount=1}}, - result = result_name, + ingredients = {{type='item', name=ingredient_name, amount=1}, {type='item', name=source.name, amount=1}}, + results = {{type='item', name=result_name, amount=1}}, + main_product = result_name, localised_name = localised_name, localised_description = localised_description }}) @@ -480,11 +455,13 @@ function main.ER(source, tier) else data:extend({{ type = 'recipe', - name = new_name , + name = new_name, + icons = icons, energy_required = 2, enabled = false, - ingredients = {{name=ingredient_name, amount=2}}, - result = result_name, + ingredients = {{type='item', name=ingredient_name, amount=2}}, + results = {{type='item', name=result_name, amount=1}}, + main_product = result_name, localised_name = localised_name, localised_description = localised_description }}) @@ -495,10 +472,12 @@ function main.ER(source, tier) data:extend({{ type = 'recipe', name = new_name, + icons = icons, energy_required = 2, enabled = false, - ingredients = {{name=ingredient_name, amount=2}}, - result = result_name, + ingredients = {{type='item', name=ingredient_name, amount=2}}, + results = {{type='item', name=result_name, amount=1}}, + main_product = result_name, localised_name = localised_name, localised_description = localised_description }}) diff --git a/PHI-CL/note.lua b/PHI-CL/note.lua new file mode 100644 index 0000000..f3cd9f9 --- /dev/null +++ b/PHI-CL/note.lua @@ -0,0 +1,1096 @@ +--[[ +** CONFIG + if mods['aai-industry'] then + items['item']['industrial-furnace'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'industrial-furnace', + ref_name = 'industrial-furnace', + tech = 'industrial-furnace', + min = 2, + max = settings.startup['PHI-MB-FURNACE-TIER'].value + } + + items['item']['fuel-processor'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'fuel-processor', + ref_name = 'fuel-processor', + tech = 'fuel-processing', + min = 2, + max = settings.startup['PHI-MB-OIL-TIER'].value + } + end + + if mods['aai-industry'] or mods['big-mining-drill'] then + items['item']['area-mining-drill'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'mining-drill', + name = 'area-mining-drill', + ref_name = 'area-mining-drill', + tech = 'area-mining-drill', + min = 2, + max = settings.startup['PHI-MB-MINING-TIER'].value + } + end + + if mods['Krastorio2'] then + items['item']['kr-mineral-water-pumpjack'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'mining-drill', + name = 'kr-mineral-water-pumpjack', + ref_name = 'kr-mineral-water-pumpjack', + tech = 'kr-mineral-water-gathering', + min = 2, + max = settings.startup['PHI-MB-MINING-TIER'].value + } + + items['item']['kr-gas-power-station'] = { + enabled = settings.startup['PHI-EN'].value, + stage = 2, + type = 'generator', + name = 'kr-gas-power-station', + ref_name = 'kr-gas-power-station', + tech = 'compound-energy', + min = 2, + max = settings.startup['PHI-EN-STEAM-TIER'].value + } + + items['item']['kr-crusher'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'furnace', + name = 'kr-crusher', + ref_name = 'kr-crusher', + tech = 'kr-crusher', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-fluid-burner'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'furnace', + name = 'kr-fluid-burner', + ref_name = 'kr-fluid-burner', + tech = 'kr-fluid-excess-handling', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-air-purifier'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'furnace', + name = 'kr-air-purifier', + ref_name = 'kr-air-purifier', + tech = 'kr-air-purification', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-advanced-furnace'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-advanced-furnace', + ref_name = 'kr-advanced-furnace', + tech = 'kr-advanced-furnace', + min = 2, + max = settings.startup['PHI-MB-FURNACE-TIER'].value + } + + items['item']['kr-advanced-chemical-plant'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-advanced-chemical-plant', + ref_name = 'kr-advanced-chemical-plant', + tech = 'kr-advanced-chemical-plant', + min = 2, + max = settings.startup['PHI-MB-OIL-TIER'].value + } + + items['item']['kr-advanced-assembling-machine'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-advanced-assembling-machine', + ref_name = 'kr-advanced-assembling-machine', + tech = 'kr-automation', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-greenhouse'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-greenhouse', + ref_name = 'kr-greenhouse', + tech = 'kr-greenhouse', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-bio-lab'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-bio-lab', + ref_name = 'kr-bio-lab', + tech = 'kr-bio-processing', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-electrolysis-plant'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-electrolysis-plant', + ref_name = 'kr-electrolysis-plant', + tech = 'kr-fluids-chemistry', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-filtration-plant'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-filtration-plant', + ref_name = 'kr-filtration-plant', + tech = 'kr-fluids-chemistry', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-fuel-refinery'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-fuel-refinery', + ref_name = 'kr-fuel-refinery', + tech = 'kr-fuel', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-atmospheric-condenser'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-atmospheric-condenser', + ref_name = 'kr-atmospheric-condenser', + tech = 'kr-atmosphere-condensation', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-advanced-lab'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'lab', + name = 'biusart-lab', + ref_name = 'biusart-lab', + tech = 'kr-advanced-lab', + min = 2, + max = settings.startup['PHI-MB-LAB-TIER'].value + } + + items['item']['kr-singularity-lab'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'lab', + name = 'kr-singularity-lab', + ref_name = 'kr-singularity-lab', + tech = 'kr-singularity-lab', + min = 2, + max = settings.startup['PHI-MB-LAB-TIER'].value + } + + items['item']['kr-research-server'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-research-server', + ref_name = 'kr-research-server', + tech = 'kr-research-server', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-quantum-computer'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-quantum-computer', + ref_name = 'kr-quantum-computer', + tech = 'kr-quantum-computer', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-matter-plant'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-matter-plant', + ref_name = 'kr-matter-plant', + tech = 'kr-matter-processing', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-matter-assembler'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'kr-matter-assembler', + ref_name = 'kr-matter-assembler', + tech = 'kr-matter-processing', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['kr-quarry-drill'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'mining-drill', + name = 'kr-quarry-drill', + ref_name = 'kr-quarry-drill', + tech = 'kr-quarry-minerals-extraction', + min = 2, + max = settings.startup['PHI-MB-MINING-TIER'].value + } + end + + if mods['space-exploration'] then + items['item']['se-space-solar-panel'] = { + enabled = settings.startup['PHI-EN'].value, + stage = 2, + type = 'solar-panel', + name = 'se-space-solar-panel', + ref_name = 'se-space-solar-panel', + tech = 'compound-energy', + min = 4, + max = settings.startup['PHI-EN-SOLAR-TIER'].value + } + + items['item']['se-space-assembling-machine'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-assembling-machine', + ref_name = 'se-space-assembling-machine', + tech = 'se-space-assembling', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-manufactory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-manufactory', + ref_name = 'se-space-manufactory', + tech = 'se-space-manufactory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-casting-machine'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-casting-machine', + ref_name = 'se-casting-machine', + tech = 'se-pyroflux-smelting', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-pulveriser'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-pulveriser', + ref_name = 'se-pulveriser', + tech = 'se-pulveriser', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-lifesupport-facility'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-lifesupport-facility', + ref_name = 'se-lifesupport-facility', + tech = 'se-lifesupport-facility', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-fuel-refinery'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-fuel-refinery', + ref_name = 'se-fuel-refinery', + tech = 'se-fuel-refining', + min = 2, + max = settings.startup['PHI-MB-OIL-TIER'].value + } + + items['item']['se-space-decontamination-facility'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-decontamination-facility', + ref_name = 'se-space-decontamination-facility', + tech = 'se-space-decontamination-facility', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-genetics-laboratory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-genetics-laboratory', + ref_name = 'se-space-genetics-laboratory', + tech = 'se-space-genetics-laboratory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-growth-facility'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-growth-facility', + ref_name = 'se-space-growth-facility', + tech = 'se-space-growth-facility', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-biochemical-laboratory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-biochemical-laboratory', + ref_name = 'se-space-biochemical-laboratory', + tech = 'se-space-biochemical-laboratory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-radiation-laboratory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-radiation-laboratory', + ref_name = 'se-space-radiation-laboratory', + tech = 'se-space-radiation-laboratory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-electromagnetics-laboratory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-electromagnetics-laboratory', + ref_name = 'se-space-electromagnetics-laboratory', + tech = 'se-space-electromagnetics-laboratory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-laser-laboratory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-laser-laboratory', + ref_name = 'se-space-laser-laboratory', + tech = 'se-space-laser-laboratory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-astrometrics-laboratory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-astrometrics-laboratory', + ref_name = 'se-space-astrometrics-laboratory', + tech = 'se-space-astrometrics-laboratory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-gravimetrics-laboratory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-gravimetrics-laboratory', + ref_name = 'se-space-gravimetrics-laboratory', + tech = 'se-space-gravimetrics-laboratory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-mechanical-laboratory'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-mechanical-laboratory', + ref_name = 'se-space-mechanical-laboratory', + tech = 'se-space-mechanical-laboratory', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-material-fabricator'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-material-fabricator', + ref_name = 'se-space-material-fabricator', + tech = 'se-space-material-fabricator', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-particle-accelerator'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-particle-accelerator', + ref_name = 'se-space-particle-accelerator', + tech = 'se-space-particle-accelerator', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-particle-collider'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-particle-collider', + ref_name = 'se-space-particle-collider', + tech = 'se-space-particle-collider', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-plasma-generator'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-plasma-generator', + ref_name = 'se-space-plasma-generator', + tech = 'se-space-plasma-generator', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-hypercooler'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-hypercooler', + ref_name = 'se-space-hypercooler', + tech = 'se-space-hypercooling-1', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-radiator'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-radiator', + ref_name = 'se-space-radiator-2', + tech = 'se-space-radiator-2', + min = 3, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + 1 + } + + items['item']['se-space-telescope'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-telescope', + ref_name = 'se-space-telescope', + tech = 'se-space-telescope', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-telescope-gammaray'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-telescope-gammaray', + ref_name = 'se-space-telescope-gammaray', + tech = 'se-space-telescope-gammaray', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-telescope-microwave'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-telescope-microwave', + ref_name = 'se-space-telescope-microwave', + tech = 'se-space-telescope-microwave', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-telescope-radio'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-telescope-radio', + ref_name = 'se-space-telescope-radio', + tech = 'se-space-telescope-radio', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-telescope-xray'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'assembling-machine', + name = 'se-space-telescope-xray', + ref_name = 'se-space-telescope-xray', + tech = 'se-space-telescope-xray', + min = 2, + max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value + } + + items['item']['se-space-science-lab'] = { + enabled = settings.startup['PHI-MB'].value, + stage = 2, + type = 'lab', + name = 'se-space-science-lab', + ref_name = 'se-space-science-lab', + tech = 'se-space-science-lab', + min = 2, + max = settings.startup['PHI-MB-LAB-TIER'].value + } + + items['equipment']['fusion-reactor-equipment'].tech = 'se-rtg-equipment' + items['equipment']['fusion-reactor-equipment'].base_name = 'se-rtg' + + items['equipment']['battery-equipment'].tech = 'battery-equipment' + items['equipment']['battery-equipment'].min = 2 + + items['equipment']['energy-shield-equipment'].tech = 'energy-shield-equipment' + items['equipment']['energy-shield-equipment'].min = 2 + + items['equipment']['personal-roboport-equipment'].tech = 'personal-roboport-equipment' + items['equipment']['personal-roboport-equipment'].min = 2 + 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] + + if item[ve][tc][1].hr_version then + item[ve][tc][1].hr_version.tint = items['tint'][tier] + end + end + + for _, v in pairs(item[ve]) do + if type(v) == 'table' then + if v[tc] then + if v[tc][1] then + v[tc][1].tint = items['tint'][tier] + + if v[tc][1].hr_version then + v[tc][1].hr_version.tint = items['tint'][tier] + end + end + 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] + + if v[i][tc][1].hr_version then + v[i][tc][1].hr_version.tint = items['tint'][tier] + end + 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) + + elseif (source.ref_name == 'se-space-solar-panel') then + item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 2))) .. string.match(item.production, '%a+') + end + +** DATA + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRAIN'].value then + local item = table.deepcopy(data.raw['item']['used-up-uranium-fuel-cell']) + item.name = 'empty-train-battery' + item.icon = items['general']['graphics_location'] .. 'battery.png' + item.order = 'qa' + item.stack_size = 100 + item.localised_name = {'name.empty-train-battery'} + item.localised_description = {'description.empty-train-battery'} + data:extend({item}) + + data:extend({{ + type = 'recipe', + name = 'empty-train-battery', + energy_required = 30, + enabled = true, + icon = items['general']['graphics_location'] .. 'battery.png', + icon_size = 64, + subgroup = 'intermediate-product', + order = 'zc', + allow_productivity = true, + ingredients = {{type='item', name='battery', amount=50}}, + results = {{type='item', name='empty-train-battery', amount=1}}, + main_product = 'empty-train-battery', + localised_name = {'name.empty-train-battery'}, + localised_description = {'description.empty-train-battery'} + }}) + + item = table.deepcopy(data.raw['item']['nuclear-fuel']) + item.name = 'charged-train-battery' + item.burnt_result = 'empty-train-battery' + item.fuel_value = '1GJ' + item.icon = items['general']['graphics_location'] .. 'battery.png' + item.stack_size = 10 + item.localised_name = {'name.charged-train-battery'} + item.localised_description = {'description.charged-train-battery'} + data:extend({item}) + + data:extend({{ + type = 'recipe', + name = 'charged-train-battery', + energy_required = 60, + enabled = true, + icon = items['general']['graphics_location'] .. 'battery.png', + icon_size = 64, + subgroup = 'intermediate-product', + ingredients = {{type='item', name='empty-train-battery', amount=1}}, + results = {{type='item', name='charged-train-battery', probability=0.995, amount=1}, {type='item', name='battery', probability=0.005, amount=5}}, + main_product = 'charged-train-battery', + localised_name = {'name.charged-train-battery'}, + localised_description = {'description.charged-train-battery'} + }}) + + data.raw['locomotive']['locomotive'].burner.burnt_inventory_size = 1 +end + +** DATA UPDATE +if settings.startup['PHI-MB'].value and mods['space-exploration'] and settings.startup['PHI-MB-MINING-TIER'].value > 1 then + data.raw['mining-drill']['se-core-miner-drill'].fast_replaceable_group = 'se-core-miner-drill' + + local se = { + type = 'mining-drill', + name = 'se-core-miner-drill', + ref_name = 'se-core-miner-drill', + min = 2, + max = 3 + } + + for i=2, settings.startup['PHI-MB-MINING-TIER'].value do + local miner_name = 'se-core-miner-' .. i + local drill_name = 'se-core-miner-drill-' .. i + + main.EEE(se, i) + data.raw['mining-drill'][drill_name].minable.result = miner_name + data.raw['mining-drill'][drill_name].placeable_by.item = miner_name + + local item = table.deepcopy(data.raw['item']['se-core-miner']) + item.name = 'se-core-miner-' .. i + item.place_result = drill_name + item.order = 'zzzz-core-miner-' .. i + + item.icons = { + { + icon = '__space-exploration-graphics__/graphics/icons/core-miner.png', + tint = items['tint'][i], + icon_size = 64, + } + } + + item.icon = nil + item.icon_size = nil + item.localised_name = {'name.se-core-miner-drill'} + item.localised_description = {'description.se-core-miner-drill'} + data:extend({item}) + + if i > 2 then + data:extend({{ + type = 'recipe', + name = miner_name, + energy_required = 2, + enabled = false, + ingredients = {{name='se-core-miner-' .. (i - 1), amount=1}, {name='se-core-miner', amount=1}}, + result = miner_name, + localised_name = {'name.se-core-miner-drill'}, + localised_description = {'description.se-core-miner-drill'} + }}) + + else + data:extend({{ + type = 'recipe', + name = miner_name, + energy_required = 2, + enabled = false, + ingredients = {{name='se-core-miner', amount=2}}, + result = miner_name, + localised_name = {'name.se-core-miner-drill'}, + localised_description = {'description.se-core-miner-drill'} + }}) + end + + data.raw['mining-drill'][drill_name].fast_replaceable_group = data.raw['mining-drill']['se-core-miner-drill'].fast_replaceable_group + table.insert(data.raw.technology['se-core-miner'].effects, {type='unlock-recipe', recipe=miner_name}) + end +end + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-MINER'].value then + local item = table.deepcopy(data.raw['item']['electric-mining-drill']) + item.name = 'large-area-electric-mining-drill' + item.place_result = 'large-area-electric-mining-drill' + item.order = 'zc' + item.localised_name = {'name.large-area-electric-mining-drill'} + item.localised_description = {'description.large-area-electric-mining-drill'} + data:extend({item}) + + local entity = table.deepcopy(data.raw['mining-drill']['electric-mining-drill']) + entity.name = 'large-area-electric-mining-drill' + 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 = 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 + entity.se_allow_in_space = true + entity.localised_name = {'name.large-area-electric-mining-drill'} + entity.localised_description = {'description.large-area-electric-mining-drill'} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = 'large-area-electric-mining-drill', + energy_required = 2, + enabled = true, + ingredients = {{'electric-mining-drill', 16}}, + result = 'large-area-electric-mining-drill', + localised_name = {'name.large-area-electric-mining-drill'}, + localised_description = {'description.large-area-electric-mining-drill'} + }}) +end + +if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-REPAIR'].value then + for _, v in pairs(data.raw['repair-tool']) do + v.speed = v.speed * settings.startup['PHI-MI-REPAIR'].value + v.durability = v.durability * settings.startup['PHI-MI-REPAIR'].value + end +end + +if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-EFFCY'].value then + data.raw['module']['efficiency-module'].effect = {consumption = {bonus = -0.5}, pollution = {bonus = -0.1}} + data.raw['module']['efficiency-module-2'].effect = {consumption = {bonus = -1.0}, pollution = {bonus = -0.15}} + data.raw['module']['efficiency-module-3'].effect = {consumption = {bonus = -1.5}, pollution = {bonus = -0.2}} +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['pipe'], data.raw['pipe-to-ground']}) do + for _, v in pairs(t) do + if v.fluid_box.height then + v.fluid_box.height = v.fluid_box.height * s + + else + v.fluid_box.height = s + end + end + end + + for _, v in pairs(data.raw['pump']) do + if v.fluid_box.height then + v.fluid_box.height = v.fluid_box.height * s + + else + v.fluid_box.height = s + end + + 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 + + for _, t in pairs({data.raw['locomotive'], data.raw['cargo-wagon'], data.raw['fluid-wagon'], data.raw['artillery-wagon']}) do + for _, v in pairs(t) do + v.max_health = v.max_health * s + v.max_speed = v.max_speed * s + v.braking_force = v.braking_force * s + + if v.max_power then + v.max_power = tostring(tonumber(string.match(v.max_power, '[%d%.]+')) * s) .. string.match(v.max_power, '%a+') + v.reversing_power_modifier = 1 + end + end + end +end + +** DATA FINAL FIXES +data.raw['utility-constants'].default.zoom_to_world_effect_strength = 0 +data.raw['utility-constants'].default.zoom_to_world_can_use_nightvision = true +data.raw['utility-constants'].default.train_inactivity_wait_condition_default = 60 + +data.raw['arithmetic-combinator']['arithmetic-combinator'].energy_source.usage_priority = 'primary-input' +data.raw['decider-combinator']['decider-combinator'].energy_source.usage_priority = 'primary-input' + +data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true + +data.raw['gui-style']['default'].machine_slots_scroll_pane.maximal_height = nil +data.raw['gui-style']['default'].machine_ingredients_scroll_pane.maximal_height = nil +data.raw['gui-style']['default'].machine_outputs_scroll_pane.maximal_height = nil +data.raw['gui-style']['default'].module_inventory_scroll_pane.maximal_height = nil +data.raw['utility-constants'].select_group_row_count + +for _,name in pairs({'furnace', 'lab', 'beacon'}) do + local entities = {} + + for _, entity in pairs(data.raw[name]) do + table.insert(entities, entity.name) + end + + for _, entity in pairs(data.raw[name]) do + entity.additional_pastable_entities = entities + end +end + + +for _, t in pairs(data.raw['tree']) do + t.collision_box = {{-0.05, -0.05}, {0.05, 0.05}} +end + +if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ARTILLERY'].value then + for _, t in pairs({data.raw['artillery-turret'], data.raw['artillery-wagon']}) do + for _, v in pairs(t) do + v.manual_range_modifier = 1 + end + end + + -- data.raw['artillery-projectile']['artillery-projectile'].reveal_map = false +end + +if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TILE'].value then + for _, tile in pairs (data.raw.tile) do + tile.autoplace = nil + end + + data.raw.tile[settings.startup['PHI-CT-TILE-CHOICE'].value].autoplace = {} + + for _, t in pairs({data.raw['simple-entity'], data.raw['optimized-decorative'], data.raw['fish']}) do + for _, e in pairs(t) do + e.autoplace = nil + end + end + + local autoplace_controls = {} + + for k, _ in pairs (data.raw['autoplace-control']) do + autoplace_controls[k] = { + size = 'none' + } + end + + data.raw['map-gen-presets']['default']['empty-world'] = { + order = 'zz', + basic_settings = { + autoplace_controls = autoplace_controls, + water = 'none', + cliff_settings = { + name = 'none', + cliff_elevation_interval = 100, + cliff_elevation_0 = 100, + richness = 0 + } + }, + advanced_settings = { + pollution = {enabled = false}, + enemy_evolution = {enabled = false}, + enemy_expansion = {enabled = false} + } + } +end + +** SETTING +, + --[[ { + type = 'int-setting', + name = 'PHI-PB-FMMS', + setting_type = 'startup', + default_value = 2, + minimum_value = 0, + maximum_value = 10, + order = 'IB01' + }, { + type = 'double-setting', + name = 'PHI-PB-FRS', + setting_type = 'startup', + default_value = 1.5, + minimum_value = 0, + maximum_value = 10, + order = 'IB02' + }, { + type = 'int-setting', + name = 'PHI-PB-FCS', + setting_type = 'startup', + default_value = 5, + minimum_value = 0, + maximum_value = 20, + order = 'IB03' + }, { + type = 'int-setting', + name = 'PHI-PB-FISB', + setting_type = 'startup', + default_value = 100, + minimum_value = 0, + maximum_value = 200, + order = 'IB04' + }, { + type = 'int-setting', + name = 'PHI-PB-FHB', + setting_type = 'startup', + default_value = 200, + minimum_value = 0, + maximum_value = 1000, + order = 'IB05' + }, { + type = 'double-setting', + name = 'PHI-PB-FWRSM', + setting_type = 'startup', + default_value = 1.3, + minimum_value = 0, + maximum_value = 20, + order = 'IB06' + }, { + type = 'double-setting', + name = 'PHI-PB-FWRBM', + setting_type = 'startup', + default_value = 1, + minimum_value = 0, + maximum_value = 20, + order = 'IB07' + }, { + type = 'int-setting', + name = 'PHI-PB-FWRSB', + setting_type = 'startup', + default_value = 1, + minimum_value = 0, + maximum_value = 40, + order = 'IB08' + }, { + type = 'int-setting', + name = 'PHI-PB-FFRLM', + setting_type = 'startup', + default_value = 1, + minimum_value = 0, + maximum_value = 20, + order = 'IB09' + }, + { + type = 'int-setting', + name = 'PHI-MI-REPAIR', + setting_type = 'startup', + default_value = 1, + allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, + order = 'E06' + }, { + type = 'int-setting', + name = 'PHI-MI-PIPE', + setting_type = 'startup', + default_value = 1, + allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, + order = 'E07' + }, { + type = 'int-setting', + name = 'PHI-MI-ROBOT', + setting_type = 'startup', + default_value = 1, + allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, + order = 'E08' + }, { + type = 'int-setting', + name = 'PHI-MI-TRAIN', + setting_type = 'startup', + default_value = 1, + allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, + order = 'E09' + }, { + type = 'bool-setting', + name = 'PHI-MI-ARTILLERY', + setting_type = 'startup', + default_value = true, + order = 'E10' + }, + , { + type = 'bool-setting', + name = 'PHI-MI-EFFCY', + setting_type = 'startup', + default_value = false, + order = 'E02' + }, { + type = 'bool-setting', + name = 'PHI-MI-NUCLEAR', + setting_type = 'startup', + default_value = false, + order = 'E03' + }, + + "? aai-industry >= 0.5.0", + "? Krastorio2 >= 1.3.0", + "? space-exploration >= 0.6.0", + "(?) big-mining-drill >= 0.1.0", + "(?) angelsrefining >= 0.12.0", + "(?) exotic-industries >= 0.6.0" +]] diff --git a/PHI-CL/settings.lua b/PHI-CL/settings.lua index abda759..5434ef0 100644 --- a/PHI-CL/settings.lua +++ b/PHI-CL/settings.lua @@ -186,22 +186,10 @@ data:extend({ type = 'int-setting', name = 'PHI-MI-LANDFILL', setting_type = 'startup', - default_value = 20, + default_value = 50, minimum_value = 1, - maximum_value = 40, + maximum_value = 100, order = 'E01' - }, { - type = 'bool-setting', - name = 'PHI-MI-EFFCY', - setting_type = 'startup', - default_value = false, - order = 'E02' - }, { - type = 'bool-setting', - name = 'PHI-MI-NUCLEAR', - setting_type = 'startup', - default_value = false, - order = 'E03' }, { type = 'bool-setting', name = 'PHI-MI-BOILER', @@ -214,90 +202,6 @@ data:extend({ setting_type = 'startup', default_value = false, order = 'E05' - }, { - type = 'int-setting', - name = 'PHI-MI-REPAIR', - setting_type = 'startup', - default_value = 1, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'E06' - }, { - type = 'int-setting', - name = 'PHI-MI-PIPE', - setting_type = 'startup', - default_value = 1, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'E07' - }, { - type = 'int-setting', - name = 'PHI-MI-ROBOT', - setting_type = 'startup', - default_value = 1, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'E08' - }, { - type = 'int-setting', - name = 'PHI-MI-TRAIN', - setting_type = 'startup', - default_value = 1, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8}, - order = 'E09' - }, { - type = 'bool-setting', - name = 'PHI-MI-ARTILLERY', - setting_type = 'startup', - default_value = true, - order = 'E10' - }, { - type = 'bool-setting', - name = 'PHI-RS', - setting_type = 'startup', - default_value = false, - order = 'F00' - }, { - type = 'int-setting', - name = 'PHI-RS-RECIPE-1', - setting_type = 'startup', - default_value = 4, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - order = 'F01' - }, { - type = 'int-setting', - name = 'PHI-RS-RECIPE-2', - setting_type = 'startup', - default_value = 8, - allowed_values = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, - order = 'F02' - }, { - type = 'int-setting', - name = 'PHI-RS-RECIPE-DROF', - setting_type = 'startup', - default_value = 1, - minimum_value = 1, - maximum_value = 100, - order = 'F03' - }, { - type = 'int-setting', - name = 'PHI-RS-RECIPE-MINROM', - setting_type = 'startup', - default_value = 2, - minimum_value = 1, - maximum_value = 100, - order = 'F04' - }, { - type = 'int-setting', - name = 'PHI-RS-RECIPE-MAXROM', - setting_type = 'startup', - default_value = 100, - minimum_value = 1, - maximum_value = 100, - order = 'F05' - }, { - type = 'bool-setting', - name = 'PHI-RS-MODULE', - setting_type = 'startup', - default_value = true, - order = 'F06' }, { type = 'int-setting', name = 'PHI-XW-WATER', @@ -365,82 +269,7 @@ data:extend({ minimum_value = 0, maximum_value = 20, order = 'IA06' - }, - --[[ { - type = 'int-setting', - name = 'PHI-PB-FMMS', - setting_type = 'startup', - default_value = 2, - minimum_value = 0, - maximum_value = 10, - order = 'IB01' }, { - type = 'double-setting', - name = 'PHI-PB-FRS', - setting_type = 'startup', - default_value = 1.5, - minimum_value = 0, - maximum_value = 10, - order = 'IB02' - }, { - type = 'int-setting', - name = 'PHI-PB-FCS', - setting_type = 'startup', - default_value = 5, - minimum_value = 0, - maximum_value = 20, - order = 'IB03' - }, { - type = 'int-setting', - name = 'PHI-PB-FISB', - setting_type = 'startup', - default_value = 100, - minimum_value = 0, - maximum_value = 200, - order = 'IB04' - }, { - type = 'int-setting', - name = 'PHI-PB-FHB', - setting_type = 'startup', - default_value = 200, - minimum_value = 0, - maximum_value = 1000, - order = 'IB05' - }, { - type = 'double-setting', - name = 'PHI-PB-FWRSM', - setting_type = 'startup', - default_value = 1.3, - minimum_value = 0, - maximum_value = 20, - order = 'IB06' - }, { - type = 'double-setting', - name = 'PHI-PB-FWRBM', - setting_type = 'startup', - default_value = 1, - minimum_value = 0, - maximum_value = 20, - order = 'IB07' - }, { - type = 'int-setting', - name = 'PHI-PB-FWRSB', - setting_type = 'startup', - default_value = 1, - minimum_value = 0, - maximum_value = 40, - order = 'IB08' - }, { - type = 'int-setting', - name = 'PHI-PB-FFRLM', - setting_type = 'startup', - default_value = 1, - minimum_value = 0, - maximum_value = 20, - order = 'IB09' - }, - ]] - { type = 'bool-setting', name = 'PHI-CT', setting_type = 'startup', @@ -477,12 +306,6 @@ data:extend({ setting_type = 'startup', default_value = true, order = 'J05' - }, { - type = 'bool-setting', - name = 'PHI-CT-MINER', - setting_type = 'startup', - default_value = true, - order = 'J06' }, { type = 'bool-setting', name = 'PHI-CT-LINKED', @@ -495,24 +318,12 @@ data:extend({ setting_type = 'startup', default_value = true, order = 'J08' - }, { - type = 'bool-setting', - name = 'PHI-CT-RECIPE', - setting_type = 'startup', - default_value = true, - order = 'J09' }, { type = 'bool-setting', name = 'PHI-CT-ENERGY', setting_type = 'startup', default_value = true, order = 'J10' - }, { - type = 'bool-setting', - name = 'PHI-CT-LAMP', - setting_type = 'startup', - default_value = true, - order = 'J11' }, { type = 'bool-setting', name = 'PHI-CT-TRAIN',