diff --git a/PHI-CL/data-updates.lua b/PHI-CL/data-updates.lua index 7a0b0a7..3b134c4 100644 --- a/PHI-CL/data-updates.lua +++ b/PHI-CL/data-updates.lua @@ -2,6 +2,64 @@ local items = require 'config' local main = require 'main' local file_stage = 2 +if mods['space-age'] then + if settings.startup['PHI-CT'].value then + if not settings.startup['PHI-CT-SPOIL'].value then + local function spoil_handle(i) + i.spoil_ticks = nil + i.spoil_result = nil + i.spoil_to_trigger_result = nil + end + + -- spoil_handle(data.raw['item']['iron-bacteria']) + -- spoil_handle(data.raw['item']['copper-bacteria']) + spoil_handle(data.raw['item']['nutrients']) + spoil_handle(data.raw['item']['captive-biter-spawner']) + spoil_handle(data.raw['item']['biter-egg']) + spoil_handle(data.raw['item']['pentapod-egg']) + spoil_handle(data.raw['capsule']['raw-fish']) + spoil_handle(data.raw['capsule']['yumako-mash']) + spoil_handle(data.raw['capsule']['yumako']) + spoil_handle(data.raw['capsule']['jelly']) + spoil_handle(data.raw['capsule']['jellynut']) + spoil_handle(data.raw['capsule']['bioflux']) + spoil_handle(data.raw['tool']['agricultural-science-pack']) + + data:extend({{ + type = 'recipe', + name = 'spoilage-from-nutrients', + energy_required = 1, + enabled = false, + ingredients = {{type='item', name='nutrients', amount=1}}, + results = {{type='item', name='spoilage', amount=10}}, + main_product = 'spoilage', + localised_name = {'phi-cl.combine', data.raw['item']['spoilage'].localised_name, ''} + }}) + + table.insert(data.raw.technology['agriculture'].effects, {type='unlock-recipe', recipe='spoilage-from-nutrients'}) + end + + if settings.startup['PHI-CT-SA'].value then + data:extend({{ + type = 'recipe', + name = 'cliff-explosives-o', + energy_required = 1, + enabled = false, + ingredients = { + {type='item', name='explosives', amount=10}, + {type='item', name='grenade', amount=1}, + {type='item', name='barrel', amount=1} + }, + results = {{type='item', name='cliff-explosives', amount=1}}, + main_product = 'cliff-explosives', + localised_name = data.raw['recipe']['cliff-explosives'].localised_name + }}) + + table.insert(data.raw.technology['cliff-explosives'].effects, {type='unlock-recipe', recipe='cliff-explosives-o'}) + end + 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.lua b/PHI-CL/data.lua index d0bbc9b..0360f53 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -644,41 +644,6 @@ if settings.startup['PHI-CT'].value then end end -if settings.startup['PHI-CT'].value and mods['space-age'] and (not settings.startup['PHI-CT-SPOIL'].value) then - local function spoil_handle(i) - i.spoil_ticks = nil - i.spoil_result = nil - i.spoil_to_trigger_result = nil - end - - -- spoil_handle(data.raw['item']['iron-bacteria']) - -- spoil_handle(data.raw['item']['copper-bacteria']) - spoil_handle(data.raw['item']['nutrients']) - spoil_handle(data.raw['item']['captive-biter-spawner']) - spoil_handle(data.raw['item']['biter-egg']) - spoil_handle(data.raw['item']['pentapod-egg']) - spoil_handle(data.raw['capsule']['raw-fish']) - spoil_handle(data.raw['capsule']['yumako-mash']) - spoil_handle(data.raw['capsule']['yumako']) - spoil_handle(data.raw['capsule']['jelly']) - spoil_handle(data.raw['capsule']['jellynut']) - spoil_handle(data.raw['capsule']['bioflux']) - spoil_handle(data.raw['tool']['agricultural-science-pack']) - - data:extend({{ - type = 'recipe', - name = 'spoilage-from-nutrients', - energy_required = 1, - enabled = false, - ingredients = {{type='item', name='nutrients', amount=1}}, - results = {{type='item', name='spoilage', amount=10}}, - main_product = 'spoilage', - localised_name = {'phi-cl.combine', '', ''} - }}) - - table.insert(data.raw.technology['agriculture'].effects, {type='unlock-recipe', recipe='spoilage-from-nutrients'}) -end - for _, v in pairs(data.raw['active-defense-equipment']) do v.automatic = true end diff --git a/PHI-CL/locale/en/locale.cfg b/PHI-CL/locale/en/locale.cfg index e448832..43f7ce5 100644 --- a/PHI-CL/locale/en/locale.cfg +++ b/PHI-CL/locale/en/locale.cfg @@ -128,8 +128,9 @@ PHI-CT-HIDDEN=CT3 Hidden PHI-CT-ROCKET-CAPACITY=CT4 Rocket capacity PHI-CT-CARGO-WEIGHT=CT5 Rocket cargo weight PHI-CT-SPOIL=CT6 Spoil -PHI-CT-TILE=CT7 World tile -PHI-CT-TILE-CHOICE=CT8 Tile choice +PHI-CT-SA=CT7 Space Age +PHI-CT-TILE=CT8 World tile +PHI-CT-TILE-CHOICE=CT9 Tile choice [mod-setting-description] PHI-EN-SOLAR-TIER=Default 8 ; Disable 1 diff --git a/PHI-CL/locale/ja/locale.cfg b/PHI-CL/locale/ja/locale.cfg index c858e6e..7547abe 100644 --- a/PHI-CL/locale/ja/locale.cfg +++ b/PHI-CL/locale/ja/locale.cfg @@ -127,8 +127,9 @@ PHI-CT-HIDDEN=CT3 非表示 PHI-CT-ROCKET-CAPACITY=CT4 ロケット容量 PHI-CT-CARGO-WEIGHT=CT5 ロケット積載重量 PHI-CT-SPOIL=CT6 変質 -PHI-CT-TILE=CT7 ワールドタイル -PHI-CT-TILE-CHOICE=CT8 ドタイル選択 +PHI-CT-SA=CT7 Space Age +PHI-CT-TILE=CT8 ワールドタイル +PHI-CT-TILE-CHOICE=CT9 ドタイル選択 [mod-setting-description] PHI-EN-SOLAR-TIER=デフォルト 8 ; 止める 1 diff --git a/PHI-CL/locale/zh-CN/locale.cfg b/PHI-CL/locale/zh-CN/locale.cfg index 9c3b85a..2b6d687 100644 --- a/PHI-CL/locale/zh-CN/locale.cfg +++ b/PHI-CL/locale/zh-CN/locale.cfg @@ -127,8 +127,9 @@ PHI-CT-HIDDEN=CT3 隱藏 PHI-CT-ROCKET-CAPACITY=CT4 火箭容量 PHI-CT-CARGO-WEIGHT=CT5 火箭貨物重量 PHI-CT-SPOIL=CT6 變質 -PHI-CT-TILE=CT7 世界地磚 -PHI-CT-TILE-CHOICE=CT8 地磚選擇 +PHI-CT-SA=CT7 Space Age +PHI-CT-TILE=CT8 世界地磚 +PHI-CT-TILE-CHOICE=CT9 地磚選擇 [mod-setting-description] PHI-EN-SOLAR-TIER=預設 8 ; 停用 1 diff --git a/PHI-CL/locale/zh-TW/locale.cfg b/PHI-CL/locale/zh-TW/locale.cfg index 9c3b85a..2b6d687 100644 --- a/PHI-CL/locale/zh-TW/locale.cfg +++ b/PHI-CL/locale/zh-TW/locale.cfg @@ -127,8 +127,9 @@ PHI-CT-HIDDEN=CT3 隱藏 PHI-CT-ROCKET-CAPACITY=CT4 火箭容量 PHI-CT-CARGO-WEIGHT=CT5 火箭貨物重量 PHI-CT-SPOIL=CT6 變質 -PHI-CT-TILE=CT7 世界地磚 -PHI-CT-TILE-CHOICE=CT8 地磚選擇 +PHI-CT-SA=CT7 Space Age +PHI-CT-TILE=CT8 世界地磚 +PHI-CT-TILE-CHOICE=CT9 地磚選擇 [mod-setting-description] PHI-EN-SOLAR-TIER=預設 8 ; 停用 1 diff --git a/PHI-CL/note.lua b/PHI-CL/note.lua index 00fe205..d0ff999 100644 --- a/PHI-CL/note.lua +++ b/PHI-CL/note.lua @@ -862,14 +862,14 @@ end name = 'PHI-CT-TILE', setting_type = 'startup', default_value = true, - order = 'F07' + order = 'F08' }, { type = 'string-setting', name = 'PHI-CT-TILE-CHOICE', setting_type = 'startup', default_value = 'grass-1', allowed_values = {'concrete', 'deepwater', 'deepwater-green', 'dirt-1', 'dirt-2', 'dirt-3', 'dirt-4', 'dirt-5', 'dirt-6', 'dirt-7', 'dry-dirt', 'grass-1', 'grass-2', 'grass-3', 'grass-4', 'hazard-concrete-left', 'hazard-concrete-right', 'lab-dark-1', 'lab-dark-2', 'lab-white', 'landfill', 'out-of-map', 'red-desert-0', 'red-desert-1', 'red-desert-2', 'red-desert-3', 'refined-concrete', 'refined-hazard-concrete-left', 'refined-hazard-concrete-right', 'sand-1', 'sand-2', 'sand-3', 'stone-path', 'tutorial-grid', 'water', 'water-green', 'water-mud', 'water-shallow'}, - order = 'F08' + order = 'F09' } "? aai-industry >= 0.5.0", diff --git a/PHI-CL/settings.lua b/PHI-CL/settings.lua index 0fc948f..0b3c68c 100644 --- a/PHI-CL/settings.lua +++ b/PHI-CL/settings.lua @@ -197,5 +197,11 @@ data:extend({ setting_type = 'startup', default_value = true, order = 'F06' +}, { + type = 'bool-setting', + name = 'PHI-CT-SA', + setting_type = 'startup', + default_value = false, + order = 'F07' } })