33--
44-- See LICENSE.md in the project directory for license information.
55
6- local water_tint = util .color (" 005799" ) -- Water void recipe tint for water
7- local mud_tint = util .color (" 6a492c" ) -- AR:Angel's tint for mud
6+ local water_tint = util .color (" # 005799" ) -- Water void recipe tint for water
7+ local mud_tint = util .color (" # 6a492c" ) -- AR:Angel's tint for mud
88
99-- Ensure a tint is formatted as expected by reskins.lib functions
10- --- @param color table [Types / Color] ( https : // wiki.factorio.com / Types / Color )
11- --- @return table tint [Types / Color] ( https : // wiki.factorio.com / Types / Color ) with fields r , g , b , a
10+ --- @param color data. Color
11+ --- @return data. Color
1212local function format_tint (color )
1313 local tint = {
1414 r = color .r or color [1 ],
@@ -21,11 +21,11 @@ local function format_tint(color)
2121end
2222
2323-- Takes two input tints and blends them in the following manner: `A*w + B*(1-w)`
24- --- @param tint_A table [Types / Color] ( https : // wiki.factorio.com / Types / Color )
25- --- @param tint_B table [Types / Color] ( https : // wiki.factorio.com / Types / Color )
26- --- @param weighting ? number In the range 0 : 1, default 0.5
27- --- @param alpha ? number In the range 0 : 1, default 1
28- --- @return table tint [Types / Color] ( https : // wiki.factorio.com / Types / Color )
24+ --- @param tint_A data. Color
25+ --- @param tint_B data. Color
26+ --- @param weighting ? number # In the range 0:1, default 0.5
27+ --- @param alpha ? number # In the range 0:1, default 1
28+ --- @return data. Color
2929local function blend_colors (tint_A , tint_B , weighting , alpha )
3030 local A = format_tint (tint_A )
3131 local B = format_tint (tint_B )
7474-- end
7575-- end
7676
77- -- -- Fix the localisation, hnng ...
77+ -- -- Fix the localisation...
7878-- -- recipe_data.localised_name = {"", ingredient.localised_name, " void"}
7979-- end
8080-- end
0 commit comments