From 8a4d1219c962164e434d0c1219b9b54e7807301d Mon Sep 17 00:00:00 2001 From: notnotmelon Date: Tue, 12 Dec 2023 00:14:11 -0600 Subject: [PATCH] glow part 1 --- prototypes/biofluid/vessel.lua | 106 ++++++++++++++++++++++++++- scripts/biofluid/network-builder.lua | 1 + 2 files changed, 106 insertions(+), 1 deletion(-) diff --git a/prototypes/biofluid/vessel.lua b/prototypes/biofluid/vessel.lua index 6170f5bf..86f62309 100644 --- a/prototypes/biofluid/vessel.lua +++ b/prototypes/biofluid/vessel.lua @@ -81,6 +81,12 @@ local variants = { 'full-junction', } +local glow_translations = { + ['straight-horizontal'] = 'straight-base-horizontal', + ['junction-up'] = 'junction-down', + ['junction-down'] = 'junction-up', +} + local animations = {} for _, variant in pairs(variants) do animations[#animations+1] = { @@ -106,6 +112,30 @@ for _, variant in pairs(variants) do scale = 0.335, animation_speed = 0.3 } + }, + { + filename = '__pyalienlifegraphics2__/graphics/entity/vessel/vessel-'.. (glow_translations[variant] or variant) ..'-glow.png', + priority = 'high', + width = 640/5/2, + height = 768/6/2, + frame_count = 5*6, + line_length = 5, + shift = {0, 0}, + scale = 0.335*2, + animation_speed = 0.3, + draw_as_glow = true, + hr_version = { + filename = '__pyalienlifegraphics2__/graphics/entity/vessel/hr-vessel-'.. (glow_translations[variant] or variant) ..'-glow.png', + priority = 'high', + width = 640/5, + height = 768/6, + frame_count = 5*6, + line_length = 5, + shift = {0, 0}, + scale = 0.335, + animation_speed = 0.3, + draw_as_glow = true + } } } } @@ -134,8 +164,34 @@ local gap = { } } +local gap_glow = { + filename = '__pyalienlifegraphics2__/graphics/entity/vessel/vessel-straight-vertical-glow.png', + priority = 'high', + width = 640/5/2, + height = 768/6/2, + frame_count = 5*6, + line_length = 5, + shift = util.by_pixel(0, 8), + scale = 0.335*2, + animation_speed = 0.3, + draw_as_glow = true, + hr_version = { + filename = '__pyalienlifegraphics2__/graphics/entity/vessel/hr-vessel-straight-vertical-glow.png', + priority = 'high', + width = 640/5, + height = 768/6, + frame_count = 5*6, + line_length = 5, + shift = util.by_pixel(0, 8), + scale = 0.335, + animation_speed = 0.3, + draw_as_glow = true, + } +} + local function fix_gap(index) - animations[index].layers[2] = gap + table.insert(animations[index].layers, 2, gap) + table.insert(animations[index].layers, gap_glow) end fix_gap(3) @@ -191,6 +247,54 @@ for cardinal, direction in pairs{['north'] = 'up', ['east'] = 'right', ['south'] scale = 0.335, animation_speed = 0.3 } + }, + { + filename = '__pyalienlifegraphics2__/graphics/entity/vessel/vessel-to-ground-' .. direction .. '-glow.png', + priority = 'high', + width = 640/5/2, + height = 768/6/2, + frame_count = 5*6, + line_length = 5, + shift = {0, 0}, + scale = 0.335*2, + animation_speed = 0.3, + draw_as_glow = true, + hr_version = { + filename = '__pyalienlifegraphics2__/graphics/entity/vessel/hr-vessel-to-ground-' .. direction .. '-glow.png', + priority = 'high', + width = 640/5, + height = 768/6, + frame_count = 5*6, + line_length = 5, + shift = {0, 0}, + scale = 0.335, + animation_speed = 0.3, + draw_as_glow = true, + } + }, + { + filename = '__pyalienlifegraphics2__/graphics/entity/vessel/vessel-to-ground-' .. direction .. '-shadow.png', + priority = 'high', + width = 640/5/2, + height = 768/6/2, + frame_count = 5*6, + line_length = 5, + shift = {0, 0}, + scale = 0.335*2, + animation_speed = 0.3, + draw_as_shadow = true, + hr_version = { + filename = '__pyalienlifegraphics2__/graphics/entity/vessel/hr-vessel-to-ground-' .. direction .. '-shadow.png', + priority = 'high', + width = 640/5, + height = 768/6, + frame_count = 5*6, + line_length = 5, + shift = {0, 0}, + scale = 0.335, + animation_speed = 0.3, + draw_as_shadow = true, + } } } } diff --git a/scripts/biofluid/network-builder.lua b/scripts/biofluid/network-builder.lua index e7cb1544..5e9d7af6 100644 --- a/scripts/biofluid/network-builder.lua +++ b/scripts/biofluid/network-builder.lua @@ -202,6 +202,7 @@ function Biofluid.built_pipe(entity, update_graphics) end local animations = { + [''] = 1, ['N'] = 1, ['E'] = 2, ['S'] = 3,