From 142fb23709d4063f7462cc51e31233433738c37b Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Tue, 27 Aug 2024 18:51:38 +0900 Subject: [PATCH] . --- PHI-CL/config.lua | 9 ++++ PHI-CL/data-updates.lua | 98 ++++++++++++++++++++++++++++------------- PHI-CL/data.lua | 31 ------------- PHI-CL/info.json | 4 +- PHI-CL/main.lua | 59 ++++++++++--------------- 5 files changed, 102 insertions(+), 99 deletions(-) diff --git a/PHI-CL/config.lua b/PHI-CL/config.lua index 67a4d66..b45957f 100644 --- a/PHI-CL/config.lua +++ b/PHI-CL/config.lua @@ -202,6 +202,15 @@ local items = { 'refined-flammables-7' } }, + ['tint'] = { + [2] = {r=140, g=142, b=200}, + [3] = {r=242, g=161, b=26}, + [4] = {r=255, g=254, b=42}, + [5] = {r=54, g=228, b=255}, + [6] = {r=253, g=0, b=97}, + [7] = {r=0, g=209, b=102}, + [8] = {r=233, g=63, b=233} + }, ['item'] = { ['solar-panel'] = { enabled = settings.startup['PHI-EN'].value, diff --git a/PHI-CL/data-updates.lua b/PHI-CL/data-updates.lua index a88a8cc..bcf75fd 100644 --- a/PHI-CL/data-updates.lua +++ b/PHI-CL/data-updates.lua @@ -45,7 +45,21 @@ if settings.startup['PHI-CT'].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]-2' + item.order = 'b[fluids]-a[offshore-pump]-o' + + item.icons = { + { + icon = item.icon, + tint = items['tint'][2], + icon_size = item.icon_size, + icon_mipmaps = item.icon_mipmaps + } + } + + item.icon = nil + item.icon_size = nil + item.icon_mipmaps = nil + data:extend({item}) local entity = table.deepcopy(data.raw['offshore-pump']['offshore-pump']) @@ -71,6 +85,19 @@ if settings.startup['PHI-CT'].value then item.name = 'super-radar' item.place_result = 'super-radar' item.order = 'd[radar]-b[radar]' + + item.icons = { + { + icon = item.icon, + tint = items['tint'][8], + icon_size = item.icon_size, + icon_mipmaps = item.icon_mipmaps + } + } + + item.icon = nil + item.icon_size = nil + item.icon_mipmaps = nil data:extend({item}) local entity = table.deepcopy(data.raw['radar']['radar']) @@ -78,6 +105,8 @@ if settings.startup['PHI-CT'].value then entity.minable.result = 'super-radar' entity.max_distance_of_sector_revealed = 30 entity.max_distance_of_nearby_sector_revealed = 30 + entity.pictures.layers[1].tint = items['tint'][8] + entity.pictures.layers[1].hr_version.tint = items['tint'][8] entity.se_allow_in_space = true data:extend({entity}) @@ -96,6 +125,19 @@ if settings.startup['PHI-CT'].value then item.name = 'trash-chest' item.place_result = 'trash-chest' item.order = 'b[storage]-e[trash-chest]' + + item.icons = { + { + icon = item.icon, + tint = items['tint'][8], + icon_size = item.icon_size, + icon_mipmaps = item.icon_mipmaps + } + } + + item.icon = nil + item.icon_size = nil + item.icon_mipmaps = nil data:extend({item}) local entity = table.deepcopy(data.raw['container']['steel-chest']) @@ -109,6 +151,8 @@ if settings.startup['PHI-CT'].value then 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 data:extend({entity}) @@ -121,22 +165,25 @@ if settings.startup['PHI-CT'].value then result = 'trash-chest' }}) - data:extend({{ - type = 'recipe', - name = 'trash-chest-return', - energy_required = 2, - enabled = true, - ingredients = {{'trash-chest', 1}}, - result = 'steel-chest' - }}) - table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='trash-chest'}) - table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='trash-chest-return'}) 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, + tint = items['tint'][8], + icon_size = item.icon_size, + icon_mipmaps = item.icon_mipmaps + } + } + + item.icon = nil + item.icon_size = nil + item.icon_mipmaps = nil data:extend({item}) entity = table.deepcopy(data.raw['pipe']['pipe']) @@ -148,6 +195,15 @@ if settings.startup['PHI-CT'].value then 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 data:extend({entity}) @@ -160,17 +216,7 @@ if settings.startup['PHI-CT'].value then result = 'trash-pipe' }}) - data:extend({{ - type = 'recipe', - name = 'trash-pipe-return', - energy_required = 2, - enabled = true, - ingredients = {{'trash-pipe', 1}}, - result = 'iron-plate' - }}) - table.insert(data.raw.technology['automation'].effects, {type='unlock-recipe', recipe='trash-pipe'}) - table.insert(data.raw.technology['automation'].effects, {type='unlock-recipe', recipe='trash-pipe-return'}) end if settings.startup['PHI-CT-MINER'].value then @@ -227,17 +273,7 @@ if settings.startup['PHI-CT'].value then result = 'linked-chest' }}) - data:extend({{ - type = 'recipe', - name = 'linked-chest-return', - energy_required = 2, - enabled = false, - ingredients = {{'linked-chest', 1}}, - result = 'steel-chest' - }}) - table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='linked-chest'}) - table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='linked-chest-return'}) end if settings.startup['PHI-CT-LOADER'].value then diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua index ac1a5db..8ee6abc 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -111,7 +111,6 @@ if settings.startup['PHI-MI'].value then data.raw['pump']['pump'].fluid_box.height = 4 * settings.startup['PHI-MI-PIPE'].value data.raw['pump']['pump'].pumping_speed = 200 * settings.startup['PHI-MI-PIPE'].value data.raw['storage-tank']['storage-tank'].fluid_box.height = settings.startup['PHI-MI-PIPE'].value - -- data.raw['storage-tank']['storage-tank'].fluid_box.base_area = 500 end if settings.startup['PHI-MI-ROBOT'].value then @@ -119,15 +118,11 @@ if settings.startup['PHI-MI'].value then data.raw['construction-robot']['construction-robot'].max_health = 100 * settings.startup['PHI-MI-ROBOT'].value data.raw['construction-robot']['construction-robot'].max_payload_size = settings.startup['PHI-MI-ROBOT'].value data.raw['construction-robot']['construction-robot'].max_energy = (1.5 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ' - data.raw['construction-robot']['construction-robot'].energy_per_move = '2kJ' - data.raw['construction-robot']['construction-robot'].speed_multiplier_when_out_of_energy = 0.2 + (0.05 * (settings.startup['PHI-MI-ROBOT'].value)) data.raw['logistic-robot']['logistic-robot'].speed = 0.06 * settings.startup['PHI-MI-ROBOT'].value data.raw['logistic-robot']['logistic-robot'].max_health = 100 * settings.startup['PHI-MI-ROBOT'].value data.raw['logistic-robot']['logistic-robot'].max_payload_size = settings.startup['PHI-MI-ROBOT'].value data.raw['logistic-robot']['logistic-robot'].max_energy = (1.5 * settings.startup['PHI-MI-ROBOT'].value) .. 'MJ' - data.raw['logistic-robot']['logistic-robot'].energy_per_move = '2kJ' - data.raw['logistic-robot']['logistic-robot'].speed_multiplier_when_out_of_energy = 0.2 + (0.05 * (settings.startup['PHI-MI-ROBOT'].value)) data.raw['roboport']['roboport'].max_health = 500 * settings.startup['PHI-MI-ROBOT'].value data.raw['roboport']['roboport'].energy_usage = 50 * settings.startup['PHI-MI-ROBOT'].value .. 'kW' @@ -224,15 +219,6 @@ if settings.startup['PHI-MI'].value then result = 'electric-boiler', }}) - data:extend({{ - type = 'recipe', - name = 'boiler-return', - energy_required = 2, - enabled = true, - ingredients = {{name='electric-boiler', amount=1}}, - result = '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 @@ -278,33 +264,16 @@ if settings.startup['PHI-MI'].value then ingredients = {{chests[i], 1}}, result = 'basic-' .. chests[i], }}) - - data:extend({{ - type = 'recipe', - name = 'basic-' .. chests[i] .. '-return', - energy_required = 2, - enabled = false, - ingredients = {{'basic-' .. chests[i], 1}}, - result = chests[i], - }}) end table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='basic-steel-chest'}) - table.insert(data.raw.technology['steel-processing'].effects, {type='unlock-recipe', recipe='basic-steel-chest-return'}) table.insert(data.raw.technology['construction-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-passive-provider'}) table.insert(data.raw.technology['construction-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-storage'}) - table.insert(data.raw.technology['construction-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-passive-provider-return'}) - table.insert(data.raw.technology['construction-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-storage-return'}) table.insert(data.raw.technology['logistic-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-passive-provider'}) table.insert(data.raw.technology['logistic-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-storage'}) - table.insert(data.raw.technology['logistic-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-passive-provider-return'}) - table.insert(data.raw.technology['logistic-robotics'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-storage-return'}) table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-active-provider'}) table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-buffer'}) table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-requester'}) - table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-active-provider-return'}) - table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-buffer-return'}) - table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-logistic-chest-requester-return'}) end end diff --git a/PHI-CL/info.json b/PHI-CL/info.json index 85847ef..b603f02 100644 --- a/PHI-CL/info.json +++ b/PHI-CL/info.json @@ -1,8 +1,8 @@ { "name": "PHI-CL", - "version": "2.0.25", + "version": "2.0.27", "factorio_version": "1.1", - "date": "2024-08-26", + "date": "2024-08-28", "title": "Phidias Collection", "author": "PHIDIAS0303", "contributers": "", diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index c121671..cb9d8f7 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -3,16 +3,6 @@ local alpha_order = {'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm'} local items = require 'config' local main = {} -local tint = { - [2] = {r=140, g=142, b=200}, - [3] = {r=242, g=161, b=26}, - [4] = {r=255, g=254, b=42}, - [5] = {r=54, g=228, b=255}, - [6] = {r=253, g=0, b=97}, - [7] = {r=0, g=209, b=102}, - [8] = {r=233, g=63, b=233} -} - local entity_tint = { 'picture', 'pictures', @@ -108,18 +98,18 @@ function main.EEE(source, tier) for _, v in pairs(entity_accumulator_tint) 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 = tint[tier] + item[v].layers[1].layers[1].tint = items['tint'][tier] if item[v].layers[1].layers[1].hr_version then - item[v].layers[1].layers[1].hr_version.tint = tint[tier] + 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 = tint[tier] + item[v].layers[2].tint = items['tint'][tier] if item[v].layers[2].hr_version then - item[v].layers[2].hr_version.tint = tint[tier] + item[v].layers[2].hr_version.tint = items['tint'][tier] end end end @@ -155,7 +145,6 @@ function main.EEE(source, tier) item.fluid_box.height = settings.startup['PHI-MI-PIPE'].value end - item.fluid_box.height = 4 item.maximum_temperature = 15 + (source.base * tier) item.fluid_usage_per_tick = source.fluid @@ -208,10 +197,10 @@ function main.EEE(source, tier) for _, ve in pairs(entity_tint) do if item[ve] then if item[ve].layers and item[ve].layers[1] then - item[ve].layers[1].tint = tint[tier] + item[ve].layers[1].tint = items['tint'][tier] if item[ve].layers[1].hr_version then - item[ve].layers[1].hr_version.tint = tint[tier] + item[ve].layers[1].hr_version.tint = items['tint'][tier] end end @@ -219,10 +208,10 @@ function main.EEE(source, tier) if type(v) == 'table' then if v.layers then if v.layers[1] then - v.layers[1].tint = tint[tier] + v.layers[1].tint = items['tint'][tier] if v.layers[1].hr_version then - v.layers[1].hr_version.tint = tint[tier] + v.layers[1].hr_version.tint = items['tint'][tier] end end end @@ -230,10 +219,10 @@ function main.EEE(source, tier) for i=1, #v, 1 do if v[i] and type(v[i]) == 'table' then if v[i].layers and v[i].layers[1] then - v[i].layers[1].tint = tint[tier] + v[i].layers[1].tint = items['tint'][tier] if v[i].layers[1].hr_version then - v[i].layers[1].hr_version.tint = tint[tier] + v[i].layers[1].hr_version.tint = items['tint'][tier] end end end @@ -248,10 +237,10 @@ function main.EEE(source, tier) while i < #item.idle_animation.layers do if item.idle_animation.layers[i] then - item.idle_animation.layers[i].tint = tint[tier] + item.idle_animation.layers[i].tint = items['tint'][tier] if item.idle_animation.layers[i].hr_version then - item.idle_animation.layers[i].hr_version.tint = tint[tier] + item.idle_animation.layers[i].hr_version.tint = items['tint'][tier] end end @@ -267,10 +256,10 @@ function main.EEE(source, tier) if item[v['a']] and item[v['a']].layers then for i=1, v['n'], 1 do if item[v['a']].layers[i] then - item[v['a']].layers[i].tint = tint[tier] + item[v['a']].layers[i].tint = items['tint'][tier] if item[v['a']].layers[i].hr_version then - item[v['a']].layers[i].hr_version.tint = tint[tier] + item[v['a']].layers[i].hr_version.tint = items['tint'][tier] end end end @@ -281,15 +270,15 @@ function main.EEE(source, tier) if item[e] and item[e].animation then for _, d in pairs(item[e].animation) do if d.layers then - d.layers[1].tint = tint[tier] - d.layers[2].tint = tint[tier] + d.layers[1].tint = items['tint'][tier] + d.layers[2].tint = items['tint'][tier] if d.layers[1].hr_version then - d.layers[1].hr_version.tint = tint[tier] + d.layers[1].hr_version.tint = items['tint'][tier] end if d.layers[2].hr_version then - d.layers[2].hr_version.tint = tint[tier] + d.layers[2].hr_version.tint = items['tint'][tier] end end end @@ -297,10 +286,10 @@ function main.EEE(source, tier) end if item.base_picture and item.base_picture.sheets then - item.base_picture.sheets[1].tint = tint[tier] + item.base_picture.sheets[1].tint = items['tint'][tier] if item.base_picture.sheets[1].hr_version then - item.base_picture.sheets[1].hr_version.tint = tint[tier] + item.base_picture.sheets[1].hr_version.tint = items['tint'][tier] end end @@ -391,14 +380,14 @@ function main.EEQ(source, tier) width = w * 32, height = h * 32, priority = 'medium', - tint = tint[tier], + tint = items['tint'][tier], hr_version = { filename = '__base__/graphics/equipment/hr-' .. source.graphics_name .. '.png', width = w * 64, height = h * 64, priority = 'medium', scale = 0.5, - tint = tint[tier] + tint = items['tint'][tier] } } @@ -425,13 +414,13 @@ function main.EI(source, tier) end if item.icons and item.icons[1] then - item.icons[1].tint = tint[tier] + item.icons[1].tint = items['tint'][tier] elseif item.icon then item.icons = { { icon = item.icon, - tint = tint[tier] + tint = items['tint'][tier] } }