generated from Descent/bombtest
0.0.1
This commit is contained in:
parent
3b2fc6df39
commit
f46ad83526
153
register.lua
153
register.lua
|
@ -3,138 +3,207 @@ paintings_name = {}
|
|||
paintings_texture = {}
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting1x1(name, texture)
|
||||
local node_name = "paintings_lib:1x1_"..name
|
||||
function paintings_lib.register_painting1x1(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:1x1_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["1x1"] = paintings_name["1x1"] or {}
|
||||
paintings_name["1x1"][name] = node_name
|
||||
paintings_name["1x1"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = name.." Painting",
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_1x1"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting1x2(name, texture)
|
||||
local node_name = "paintings_lib:1x2_"..name
|
||||
function paintings_lib.register_painting1x2(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:1x2_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["1x2"] = paintings_name["1x2"] or {}
|
||||
paintings_name["1x2"][name] = node_name
|
||||
paintings_name["1x2"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = name.." Painting",
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_1x2"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-0.5, -1.5, 0.4375, 0.5, 0.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-0.5, -1.5, 0.4375, 0.5, 0.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting2x1(name, texture)
|
||||
local node_name = "paintings_lib:2x1_"..name
|
||||
function paintings_lib.register_painting2x1(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:2x1_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["2x1"] = paintings_name["2x1"] or {}
|
||||
paintings_name["2x1"][name] = node_name
|
||||
paintings_name["2x1"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = name.." Painting",
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_2x1"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-0.5, -0.5, 0.4375, 1.5, 0.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-0.5, -0.5, 0.4375, 1.5, 0.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting2x2(name, texture)
|
||||
local node_name = "paintings_lib:2x2_"..name
|
||||
function paintings_lib.register_painting2x2(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:2x2_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["2x2"] = paintings_name["2x2"] or {}
|
||||
paintings_name["2x2"][name] = node_name
|
||||
paintings_name["2x2"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = name.." Painting",
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_2x2"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-0.5, -1.5, 0.4375, 1.5, 0.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-0.5, -1.5, 0.4375, 1.5, 0.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting3x2(name, texture)
|
||||
local node_name = "paintings_lib:3x2_"..name
|
||||
function paintings_lib.register_painting3x2(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:3x2_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["3x2"] = paintings_name["3x2"] or {}
|
||||
paintings_name["3x2"][name] = node_name
|
||||
paintings_name["3x2"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = name.." Painting",
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_3x2"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-1.5, -1.5, 0.4375, 1.5, 0.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-1.5, -1.5, 0.4375, 1.5, 0.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting3x3(name, texture)
|
||||
local node_name = "paintings_lib:3x3_"..name
|
||||
function paintings_lib.register_painting3x3(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:3x3_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["3x3"] = paintings_name["3x3"] or {}
|
||||
paintings_name["3x3"][name] = node_name
|
||||
paintings_name["3x3"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = name.." Painting",
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_3x3"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-1.5, -1.5, 0.4375, 1.5, 1.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-1.5, -1.5, 0.4375, 1.5, 1.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting4x2(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:4x2_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["4x2"] = paintings_name["4x2"] or {}
|
||||
paintings_name["4x2"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_4x2"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-1.5, -1.5, 0.4375, 2.5, 0.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-1.5, -1.5, 0.4375, 2.5, 0.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting4x3(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:4x3_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["4x3"] = paintings_name["4x3"] or {}
|
||||
paintings_name["4x3"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_4x3"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-1.5, -1.5, 0.4375, 2.5, 1.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-1.5, -1.5, 0.4375, 2.5, 1.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
end
|
||||
|
||||
-- define the node registration function
|
||||
function paintings_lib.register_painting4x4(identifier, display_name, texture)
|
||||
local node_name = "paintings_lib:4x4_"..display_name:gsub("%s+", "_")
|
||||
paintings_name["4x4"] = paintings_name["4x4"] or {}
|
||||
paintings_name["4x4"][identifier] = node_name
|
||||
paintings_texture[node_name] = texture
|
||||
|
||||
-- register the node
|
||||
minetest.register_node(node_name, {
|
||||
description = display_name.." Painting",
|
||||
drawtype = "mesh",
|
||||
mesh = "paintings_lib_4x4"..".obj",
|
||||
selection_box = {type = "fixed", fixed = {-1.5, -2.5, 0.4375, 2.5, 1.5, 0.5}},
|
||||
collision_box = {type = "fixed", fixed = {-1.5, -2.5, 0.4375, 2.5, 1.5, 0.5}},
|
||||
tiles = {texture},
|
||||
paramtype2 = "facedir",
|
||||
walkable = false,
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue