Skip to content

Commit

Permalink
Fix pypp cache regen code to work with new stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
notnotmelon committed Jun 30, 2024
1 parent a79f685 commit c61acde
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 30 deletions.
47 changes: 36 additions & 11 deletions prototypes/buildings/fawogae-plantation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,41 @@ RECIPE {
}
}

local fluid_boxes
if mods.pyalienlife then
fluid_boxes = {
{
production_type = 'input',
pipe_covers = py.pipe_covers(false, true, true, true),
pipe_picture = py.pipe_pictures('assembling-machine-3', {0, 0.22}, {0.02, -1}, nil, nil, pipes),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {-3.5, 0.5}}}
},
{
production_type = 'input',
pipe_covers = py.pipe_covers(false, true, true, true),
pipe_picture = py.pipe_pictures('assembling-machine-3', {0, 0.22}, {0.02, -1}, nil, nil, pipes),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {3.5, -0.5}}}
},
off_when_no_fluid_recipe = true
}
else
fluid_boxes = {
{
production_type = 'input',
pipe_covers = py.pipe_covers(false, true, true, true),
pipe_picture = py.pipe_pictures('assembling-machine-3', {0, 0.22}, {0.02, -1}, nil, nil, pipes),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {-3.5, 0.5}}}
},
off_when_no_fluid_recipe = true
}
end

for i = 1, 4 do
if not mods.pyalienlife and i == 2 then return end

Expand Down Expand Up @@ -100,17 +135,7 @@ for i = 1, 4 do
},
}
},
fluid_boxes = {
{
production_type = 'input',
pipe_covers = py.pipe_covers(false, true, true, true),
pipe_picture = py.pipe_pictures('assembling-machine-3', {0, 0.22}, {0.02, -1}, nil, nil, pipes),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {-3.5, 0.5}}}
},
off_when_no_fluid_recipe = true
},
fluid_boxes = fluid_boxes,
vehicle_impact_sound = {filename = '__base__/sound/car-metal-impact.ogg', volume = 0.65},
working_sound = {
sound = {filename = '__pycoalprocessinggraphics__/sounds/fawogae-plantation.ogg'},
Expand Down
80 changes: 61 additions & 19 deletions prototypes/buildings/ralesia-plantation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,66 @@ local pipes = {
}
}

local fluid_boxes

if mods.pyalienlife then
fluid_boxes = {
--1
{
production_type = 'input',
pipe_picture = py.pipe_pictures('assembling-machine-3', {-0.0, 3.837}, {-0.0, -3.837}, {4.0, 0.0}, {-4.0, 0.0}, pipes),
pipe_covers = py.pipe_covers(true, true, true, true),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {0.0, 4.0}}}
},
{
production_type = 'input',
pipe_picture = py.pipe_pictures('assembling-machine-3', {-0.0, 3.837}, {-0.0, -3.837}, {4.0, 0.0}, {-4.0, 0.0}, pipes),
pipe_covers = py.pipe_covers(true, true, true, true),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {0.0, -4.0}}}
},
{
production_type = 'input',
pipe_covers = py.pipe_covers(true, true, true, true),
pipe_picture = py.pipe_pictures('assembling-machine-3', {-0.0, 3.837}, {-0.0, -3.837}, {4.0, 0.0}, {-4.0, 0.0}, pipes),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {-4.0, 0.0}}}
},
{
production_type = 'output',
pipe_covers = py.pipe_covers(false, true, true, true),
pipe_picture = py.pipe_pictures('assembling-machine-3', {-0.0, 3.837}, {-0.0, -3.837}, {4.0, 0.0}, {-4.0, 0.0}, pipes),
base_level = 1,
pipe_connections = {{type = 'output', position = {4.0, 0.0}}}
},
off_when_no_fluid_recipe = true,
}
else
fluid_boxes = {
--1
{
production_type = 'input',
pipe_picture = py.pipe_pictures('assembling-machine-3', {-0.0, 3.837}, {-0.0, -3.837}, {4.0, 0.0}, {-4.0, 0.0}, pipes),
pipe_covers = py.pipe_covers(true, true, true, true),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {0.0, 4.0}}}
},
{
production_type = 'input',
pipe_picture = py.pipe_pictures('assembling-machine-3', {-0.0, 3.837}, {-0.0, -3.837}, {4.0, 0.0}, {-4.0, 0.0}, pipes),
pipe_covers = py.pipe_covers(true, true, true, true),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {0.0, -4.0}}}
},
}
end

RECIPE {
type = 'recipe',
name = 'ralesia-plantation-mk01',
Expand Down Expand Up @@ -115,25 +175,7 @@ for i = 1, 4 do
},
}
},
fluid_boxes = {
--1
{
production_type = 'input',
pipe_picture = py.pipe_pictures('assembling-machine-3', {-0.0, 3.837}, {-0.0, -3.837}, {4.0, 0.0}, {-4.0, 0.0}, pipes),
pipe_covers = py.pipe_covers(true, true, true, true),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {0.0, 4.0}}}
},
{
production_type = 'input',
pipe_picture = py.pipe_pictures('assembling-machine-3', {-0.0, 3.837}, {-0.0, -3.837}, {4.0, 0.0}, {-4.0, 0.0}, pipes),
pipe_covers = py.pipe_covers(true, true, true, true),
base_area = 10,
base_level = -1,
pipe_connections = {{type = 'input', position = {0.0, -4.0}}}
},
},
fluid_boxes = fluid_boxes,
vehicle_impact_sound = {filename = '__base__/sound/car-metal-impact.ogg', volume = 0.65},
working_sound = {
sound = {filename = '__pycoalprocessinggraphics__/sounds/ralesia-plantation.ogg', volume = 1.2},
Expand Down

0 comments on commit c61acde

Please sign in to comment.