Skip to content

Commit

Permalink
glow part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Dec 12, 2023
1 parent 6d26ff3 commit 8a4d121
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 1 deletion.
106 changes: 105 additions & 1 deletion prototypes/biofluid/vessel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand All @@ -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
}
}
}
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions scripts/biofluid/network-builder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ function Biofluid.built_pipe(entity, update_graphics)
end

local animations = {
[''] = 1,
['N'] = 1,
['E'] = 2,
['S'] = 3,
Expand Down

0 comments on commit 8a4d121

Please sign in to comment.