11--- Define pipe connection pipe pictures by coping from an existing entity in the base mod.
22--- @param pictures string
3- --- @param shift_north table ?
4- --- @param shift_south table ?
5- --- @param shift_west table ?
6- --- @param shift_east table ?
7- --- @param replacements table ?
8- --- @return table
3+ --- @param shift_north Vector ?
4+ --- @param shift_south Vector ?
5+ --- @param shift_west Vector ?
6+ --- @param shift_east Vector ?
7+ --- @param replacements { north : data.Sprite,east : data.Sprite,south : data.Sprite,west : data.Sprite } ?
8+ --- @return data.Sprite4Way
99py .pipe_pictures = function (pictures , shift_north , shift_south , shift_west , shift_east , replacements )
1010 local new_pictures = {
1111 north = shift_north and
6363--- @param s boolean ?
6464--- @param w boolean ?
6565--- @param e boolean ?
66- --- @return table
66+ --- @return data.Sprite4Way
6767py .pipe_covers = function (n , s , w , e )
6868 if (n == nil and s == nil and w == nil and e == nil ) then
6969 n , s , e , w = true , true , true , true
7070 end
7171
72- n =
73- n and {
72+ return {
73+ north = n and {
7474 layers = {
7575 {
7676 filename = " __base__/graphics/entity/pipe-covers/pipe-cover-north.png" ,
@@ -88,9 +88,8 @@ py.pipe_covers = function(n, s, w, e)
8888 draw_as_shadow = true
8989 }
9090 }
91- } or py .empty_image ()
92- e =
93- e and {
91+ } or py .empty_image (),
92+ east = e and {
9493 layers = {
9594 {
9695 filename = " __base__/graphics/entity/pipe-covers/pipe-cover-east.png" ,
@@ -108,9 +107,8 @@ py.pipe_covers = function(n, s, w, e)
108107 draw_as_shadow = true
109108 }
110109 }
111- } or py .empty_image ()
112- s =
113- s and {
110+ } or py .empty_image (),
111+ south = s and {
114112 layers = {
115113 {
116114 filename = " __base__/graphics/entity/pipe-covers/pipe-cover-south.png" ,
@@ -128,9 +126,8 @@ py.pipe_covers = function(n, s, w, e)
128126 draw_as_shadow = true
129127 }
130128 }
131- } or py .empty_image ()
132- w =
133- w and {
129+ } or py .empty_image (),
130+ west = w and {
134131 layers = {
135132 {
136133 filename = " __base__/graphics/entity/pipe-covers/pipe-cover-west.png" ,
@@ -149,13 +146,13 @@ py.pipe_covers = function(n, s, w, e)
149146 }
150147 }
151148 } or py .empty_image ()
152-
153- return {north = n , south = s , east = e , west = w }
149+ }
154150end
155151
156152--- Define nice looking pipe pictures based on the space age electromagnetic plant.
157153--- These do not come with pipe covers! However there is a frozen variant.
158154--- See seaweed-crop.lua in alien life for an example implementation.
155+ --- @return data.Sprite4Way
159156py .sexy_pipe_pictures = function ()
160157 local function by_direction (pipe_direction )
161158 return {
@@ -184,6 +181,7 @@ py.sexy_pipe_pictures = function()
184181end
185182
186183--- Define nice looking pipe frozen pictures based on the space age electromagnetic plant.
184+ --- @return data.Sprite4Way
187185py .sexy_pipe_pictures_frozen = function ()
188186 local function by_direction (pipe_direction )
189187 return {
0 commit comments