From aab3bf5849380c2578c512ab55e92a1bb69cfc58 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 10 Jul 2025 19:32:46 +0900 Subject: [PATCH] . --- PHI-CL/data-updates.lua | 52 +++++++++++++++++++++++++++++++++++++++++ PHI-CL/data.lua | 48 ------------------------------------- 2 files changed, 52 insertions(+), 48 deletions(-) diff --git a/PHI-CL/data-updates.lua b/PHI-CL/data-updates.lua index deba44f..61f1ad2 100644 --- a/PHI-CL/data-updates.lua +++ b/PHI-CL/data-updates.lua @@ -8,6 +8,58 @@ if settings.startup['PHI-MB'].value and settings.startup['PHI-MB-MACHINE'].value end end +if (settings.startup['PHI-MI'].value and settings.startup['PHI-MI-GENERIC'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value ~= '') then + if data.raw['constant-combinator']['constant-combinator'] then + local item = table.deepcopy(data.raw['item']['constant-combinator']) + item.name = 'super-combinator' + item.place_result = item.name + item.order = 'c[combinators]-e[super-combinator]' + item.icons = {{icon = '__base__/graphics/icons/constant-combinator.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.super-entity'}, {'entity-name.constant-combinator'}} + data:extend({item}) + + local entity = table.deepcopy(data.raw['constant-combinator']['constant-combinator']) + entity.name = item.name + entity.minable.result = item.name + entity.localised_name = {'', {'name.super-entity'}, {'entity-name.constant-combinator'}} + data:extend({entity}) + + data:extend({{ + type = 'recipe', + name = item.name, + energy_required = 2, + enabled = true, + ingredients = {{type = 'item', name = 'electronic-circuit', amount = 5}, {type = 'item', name = 'copper-cable', amount = 5}}, + results = {{type = 'item', name = item.name, amount = 1}}, + main_product = item.name, + localised_name = {'', {'name.super-entity'}, {'entity-name.constant-combinator'}} + }}) + + local s = {} + + for _, v in pairs(data.raw['technology']) do + if (v.max_level and v.max_level == 'infinite') and (v.hidden and v.hidden == false) then + table.insert(s, { + type = 'virtual-signal', + name = 'signal-' .. v.name, + icon = (v.icon and v.icon) or (v.icons and v.icons[1].icon), + icon_size = ((v.icons and v.icons[1].icon_size and v.icons[1].icon_size) or (v.icon_size and v.icon_size)) or 64, + subgroup = 'pictographs', + order = 'z[tech]-[' .. v.name .. ']', + localised_name = {'technology-name.' .. v.name:gsub('-%d+$', '')} + }) + end + end + + if #s > 0 then + data:extend(s) + end + end +end + if mods['space-exploration'] and settings.startup['PHI-MB'].value and settings.startup['PHI-MB-MACHINE'].value and settings.startup['PHI-MB-MACHINE-TIER'].value > 1 then data.raw['mining-drill']['se-core-miner-drill'].fast_replaceable_group = 'se-core-miner-drill' diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua index fdb8890..0bcef31 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -288,54 +288,6 @@ if (settings.startup['PHI-MI'].value and settings.startup['PHI-MI-GENERIC'].valu }}) end - if data.raw['constant-combinator']['constant-combinator'] then - local item = table.deepcopy(data.raw['item']['constant-combinator']) - item.name = 'super-combinator' - item.place_result = item.name - item.order = 'c[combinators]-e[super-combinator]' - item.icons = {{icon = '__base__/graphics/icons/constant-combinator.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.super-entity'}, {'entity-name.constant-combinator'}} - data:extend({item}) - - local entity = table.deepcopy(data.raw['constant-combinator']['constant-combinator']) - entity.name = item.name - entity.minable.result = item.name - entity.localised_name = {'', {'name.super-entity'}, {'entity-name.constant-combinator'}} - data:extend({entity}) - - data:extend({{ - type = 'recipe', - name = item.name, - energy_required = 2, - enabled = true, - ingredients = {{type = 'item', name = 'electronic-circuit', amount = 5}, {type = 'item', name = 'copper-cable', amount = 5}}, - results = {{type = 'item', name = item.name, amount = 1}}, - main_product = item.name, - localised_name = {'', {'name.super-entity'}, {'entity-name.constant-combinator'}} - }}) - - local s = {} - - for _, v in pairs(data.raw['technology']) do - if (v.max_level and v.max_level == 'infinite') and (v.hidden and v.hidden == false) then - table.insert(s, { - type = 'virtual-signal', - name = 'signal-' .. v.name, - icon = (v.icon and v.icon) or (v.icons and v.icons[1].icon), - icon_size = ((v.icons and v.icons[1].icon_size and v.icons[1].icon_size) or (v.icon_size and v.icon_size)) or 64, - subgroup = 'pictographs', - order = 'z[tech]-[' .. v.name .. ']', - localised_name = {'technology-name.' .. v.name:gsub('-%d+$', '')} - }) - end - end - - data:extend(s) - end - for _, v in pairs(data.raw['inserter']) do if v.energy_source and (v.energy_source == 'electric' or v.energy_source == 'void' or v.energy_source == 'burner') then v.allow_custom_vectors = true