mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Refactored end rod coloring code
This commit is contained in:
parent
24eca01c3f
commit
882531b9fc
1 changed files with 5 additions and 9 deletions
|
@ -166,22 +166,18 @@ for num, row in ipairs(colored_end_rods) do
|
||||||
def.description = desc
|
def.description = desc
|
||||||
def._doc_items_longdesc = nil
|
def._doc_items_longdesc = nil
|
||||||
def._doc_items_create_entry = false
|
def._doc_items_create_entry = false
|
||||||
|
local side_tex
|
||||||
if name == "pink" then
|
if name == "pink" then
|
||||||
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. top_mask .. "^[multiply:" .. name .. "^[hsl:0:300)"
|
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. top_mask .. "^[multiply:" .. name .. "^[hsl:0:300)"
|
||||||
|
side_tex = end_rod_side_tex .. "^(" .. end_rod_side_tex .. side_mask .. "^[multiply:" .. name .. "^[hsl:0:300)"
|
||||||
elseif num > 4 then
|
elseif num > 4 then
|
||||||
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. top_mask .. "^[multiply:" .. name .. "^[hsl:0:300^[opacity:120)"
|
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. top_mask .. "^[multiply:" .. name .. "^[hsl:0:300^[opacity:120)"
|
||||||
|
side_tex = end_rod_side_tex .. "^(" .. end_rod_side_tex .. side_mask .. "^[multiply:" .. name .. "^[hsl:0:300^[opacity:120)"
|
||||||
else
|
else
|
||||||
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. top_mask .. "^[multiply:" .. name .. "^[hsl:0:-100^[opacity:170)"
|
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. top_mask .. "^[multiply:" .. name .. "^[hsl:0:-100^[opacity:170)"
|
||||||
|
side_tex = end_rod_side_tex .. "^(" .. end_rod_side_tex .. side_mask .. "^[multiply:" .. name .. "^[hsl:0:-100^[opacity:170)"
|
||||||
end
|
end
|
||||||
for i=3, 6 do
|
for i=3, 6 do def.tiles[i] = side_tex end
|
||||||
if name == "pink" then
|
|
||||||
def.tiles[i] = end_rod_side_tex .. "^(" .. end_rod_side_tex .. side_mask .. "^[multiply:" .. name .. "^[hsl:0:300)"
|
|
||||||
elseif num > 4 then
|
|
||||||
def.tiles[i] = end_rod_side_tex .. "^(" .. end_rod_side_tex .. side_mask .. "^[multiply:" .. name .. "^[hsl:0:300^[opacity:120)"
|
|
||||||
else
|
|
||||||
def.tiles[i] = end_rod_side_tex .. "^(" .. end_rod_side_tex .. side_mask .. "^[multiply:" .. name .. "^[hsl:0:-100^[opacity:170)"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
minetest.register_node(end_rod_name.."_"..name, def)
|
minetest.register_node(end_rod_name.."_"..name, def)
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
|
|
Loading…
Reference in a new issue