369 lines
14 KiB
Lua
369 lines
14 KiB
Lua
local dye_table = dye.dyes
|
|
|
|
for i in ipairs(dye_table) do
|
|
local name = dye_table[i][1]
|
|
local desc = dye_table[i][2]
|
|
local hex = dye_table[i][3]
|
|
|
|
minetest.register_node('furniture:curtain_short_'..name..'_0', {
|
|
description = 'Short '..desc..' Curtain Closed',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_short.obj',
|
|
tiles = {'furniture_curtain_short_0.png^[multiply:'..hex},
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
drop = 'furniture:curtain_short_'..name..'_1',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3, not_in_creative_inventory=1},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_short_'..name..'_1', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_short_'..name..'_1', {
|
|
description = 'Short '..desc..' Curtain Open',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_short.obj',
|
|
tiles = {'furniture_curtain_short_1.png^[multiply:'..hex},
|
|
inventory_image = 'furniture_curtain_short_1.png^[multiply:'..hex,
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
sunlight_propagates = true,
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_short_'..name..'_0', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_short_left_'..name..'_0', {
|
|
description = 'Short Left '..desc..' Curtain Closed',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_short.obj',
|
|
tiles = {'furniture_curtain_short_0.png^[multiply:'..hex},
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
drop = 'furniture:curtain_short_left_'..name..'_1',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3, not_in_creative_inventory=1},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_short_left_'..name..'_1', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_short_left_'..name..'_1', {
|
|
description = 'Short Left '..desc..' Curtain Open',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_short.obj',
|
|
tiles = {'furniture_curtain_short_left_1.png^[multiply:'..hex},
|
|
inventory_image = 'furniture_curtain_short_left_1.png^[multiply:'..hex,
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
sunlight_propagates = true,
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_short_left_'..name..'_0', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_short_right_'..name..'_0', {
|
|
description = 'Short Right '..desc..' Curtain Closed',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_short.obj',
|
|
tiles = {'furniture_curtain_short_0.png^[multiply:'..hex},
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
drop = 'furniture:curtain_short_'..name..'_1',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3, not_in_creative_inventory=1},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_short_right_'..name..'_1', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_short_right_'..name..'_1', {
|
|
description = 'Short Right '..desc..' Curtain Open',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_short.obj',
|
|
tiles = {'furniture_curtain_short_right_1.png^[multiply:'..hex},
|
|
inventory_image = 'furniture_curtain_short_right_1.png^[multiply:'..hex,
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
sunlight_propagates = true,
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_short_right_'..name..'_0', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_short_center_'..name..'_0', {
|
|
description = 'Short Middle '..desc..' Curtain Closed',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_short.obj',
|
|
tiles = {'furniture_curtain_short_0.png^[multiply:'..hex},
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
drop = 'furniture:curtain_short_center_'..name..'_1',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3, not_in_creative_inventory=1},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_short_center_'..name..'_1', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_short_center_'..name..'_1', {
|
|
description = 'Short Middle'..desc..' Curtain Open',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_short.obj',
|
|
tiles = {'furniture_curtain_short_center_1.png^[multiply:'..hex},
|
|
inventory_image = 'furniture_curtain_short_center_1.png^[multiply:'..hex,
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
sunlight_propagates = true,
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_short_center_'..name..'_0', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_tall_'..name..'_0', {
|
|
description = 'Tall '..desc..' Curtain Closed',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_tall.obj',
|
|
tiles = {'furniture_curtain_tall_0.png^[multiply:'..hex},
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
drop = 'furniture:curtain_tall_'..name..'_1',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3, not_in_creative_inventory=1},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_tall_'..name..'_1', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_tall_'..name..'_1', {
|
|
description = 'Tall '..desc..' Curtain Open',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_tall.obj',
|
|
tiles = {'furniture_curtain_tall_1.png^[multiply:'..hex},
|
|
inventory_image = 'furniture_curtain_tall_1.png^[multiply:'..hex,
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
sunlight_propagates = true,
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_tall_'..name..'_0', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_tall_left_'..name..'_0', {
|
|
description = 'Tall Left '..desc..' Curtain Closed',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_tall.obj',
|
|
tiles = {'furniture_curtain_tall_0.png^[multiply:'..hex},
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
drop = 'furniture:curtain_tall_left_'..name..'_1',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3, not_in_creative_inventory=1},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_tall_left_'..name..'_1', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_tall_left_'..name..'_1', {
|
|
description = 'Tall Left '..desc..' Curtain Open',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_tall.obj',
|
|
tiles = {'furniture_curtain_tall_left_1.png^[multiply:'..hex},
|
|
inventory_image = 'furniture_curtain_tall_left_1.png^[multiply:'..hex,
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
sunlight_propagates = true,
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_tall_left_'..name..'_0', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_tall_right_'..name..'_0', {
|
|
description = 'Tall Right '..desc..' Curtain Closed',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_tall.obj',
|
|
tiles = {'furniture_curtain_tall_0.png^[multiply:'..hex},
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
drop = 'furniture:curtain_tall_'..name..'_1',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3, not_in_creative_inventory=1},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_tall_right_'..name..'_1', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_tall_right_'..name..'_1', {
|
|
description = 'Tall Right '..desc..' Curtain Open',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_tall.obj',
|
|
tiles = {'furniture_curtain_tall_right_1.png^[multiply:'..hex},
|
|
inventory_image = 'furniture_curtain_tall_right_1.png^[multiply:'..hex,
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
sunlight_propagates = true,
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_tall_right_'..name..'_0', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_tall_center_'..name..'_0', {
|
|
description = 'Tall Middle '..desc..' Curtain Closed',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_tall.obj',
|
|
tiles = {'furniture_curtain_tall_0.png^[multiply:'..hex},
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
drop = 'furniture:curtain_tall_center_'..name..'_1',
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3, not_in_creative_inventory=1},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_tall_center_'..name..'_1', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
minetest.register_node('furniture:curtain_tall_center_'..name..'_1', {
|
|
description = 'Tall Middle '..desc..' Curtain Open',
|
|
drawtype = 'mesh',
|
|
mesh = 'furniture_curtain_tall.obj',
|
|
tiles = {'furniture_curtain_tall_center_1.png^[multiply:'..hex},
|
|
inventory_image = 'furniture_curtain_tall_center_1.png^[multiply:'..hex,
|
|
paramtype = 'light',
|
|
paramtype2 = 'facedir',
|
|
sunlight_propagates = true,
|
|
selection_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
collision_box = {
|
|
type = 'fixed',
|
|
fixed = {-.5, -.5, .4, .5, .5, .5},
|
|
},
|
|
groups = {oddly_breakable_by_hand = 3, snappy=3},
|
|
on_rightclick = function(pos, node)
|
|
minetest.set_node(pos, {name='furniture:curtain_tall_center_'..name..'_0', param2 = node.param2})
|
|
end
|
|
})
|
|
|
|
end
|