generated from Descent/bombtest
Pre-Alpha 0.0.0
This commit is contained in:
parent
a6ca75480d
commit
197343adee
|
@ -1,2 +1,4 @@
|
||||||
# bombtest
|
# Paintings Library
|
||||||
|
|
||||||
|
####
|
||||||
|
More to be added in future.
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
-- Paintings Library
|
||||||
|
|
||||||
|
paintings_lib = {}
|
||||||
|
|
||||||
|
local default_path = minetest.get_modpath("paintings_lib")
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("paintings_lib") .. "/register.lua")
|
||||||
|
dofile(minetest.get_modpath("paintings_lib") .. "/paintings.lua")
|
|
@ -0,0 +1,5 @@
|
||||||
|
mod_name = paintings_lib
|
||||||
|
title = Paintings Library
|
||||||
|
description = A fast, sleek, modern painting API for Minetest Game, but optional support for other games.
|
||||||
|
optional_depends = default
|
||||||
|
min_minetest_version = 5.3
|
|
@ -0,0 +1,25 @@
|
||||||
|
paintings_lib.register_painting1x1("seaside_paradise", "paintings_lib_seaside_paradise.png^paintings_lib_frame1x1.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting1x1("roses", "paintings_lib_roses.png^paintings_lib_frame1x1.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting1x1("blue_vase", "paintings_lib_blue_vase.png^paintings_lib_frame1x1.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting1x2("abstract_expression", "paintings_lib_abstract_expression.png^paintings_lib_frame1x2.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting2x1("mountain_landscape", "paintings_lib_mountain_landscape.png^paintings_lib_frame2x1.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting2x2("fishbowl", "paintings_lib_fishbowl.png^paintings_lib_frame2x2.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting2x2("fishbowl_2", "paintings_lib_fishbowl_2.png^paintings_lib_frame2x2.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting2x2("the_walk", "paintings_lib_the_walk.png^paintings_lib_frame2x2.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting2x2("skull_cuttingboard", "paintings_lib_fishbowl.png^paintings_lib_frame2x2.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting3x2("future_ruins", "paintings_lib_future_ruins.png^paintings_lib_frame3x2.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting3x2("solar_flare", "paintings_lib_solar_flare.png^paintings_lib_frame3x2.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting3x3("fantasy_forest", "paintings_lib_fantasy_forest.png^paintings_lib_frame3x3.png")
|
||||||
|
|
||||||
|
paintings_lib.register_painting3x3("gooseberry", "paintings_lib_gooseberry.png^paintings_lib_frame3x3.png")
|
|
@ -0,0 +1,141 @@
|
||||||
|
-- define global variables for the node names and textures
|
||||||
|
paintings_name = {}
|
||||||
|
paintings_texture = {}
|
||||||
|
|
||||||
|
-- define the node registration function
|
||||||
|
function paintings_lib.register_painting1x1(name, texture)
|
||||||
|
local node_name = "paintings_lib:1x1_"..name
|
||||||
|
paintings_name["1x1"] = paintings_name["1x1"] or {}
|
||||||
|
paintings_name["1x1"][name] = node_name
|
||||||
|
paintings_texture[node_name] = texture
|
||||||
|
|
||||||
|
-- register the node
|
||||||
|
minetest.register_node(node_name, {
|
||||||
|
description = 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,
|
||||||
|
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
|
||||||
|
paintings_name["1x2"] = paintings_name["1x2"] or {}
|
||||||
|
paintings_name["1x2"][name] = node_name
|
||||||
|
paintings_texture[node_name] = texture
|
||||||
|
|
||||||
|
-- register the node
|
||||||
|
minetest.register_node(node_name, {
|
||||||
|
description = 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,
|
||||||
|
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
|
||||||
|
paintings_name["2x1"] = paintings_name["2x1"] or {}
|
||||||
|
paintings_name["2x1"][name] = node_name
|
||||||
|
paintings_texture[node_name] = texture
|
||||||
|
|
||||||
|
-- register the node
|
||||||
|
minetest.register_node(node_name, {
|
||||||
|
description = 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,
|
||||||
|
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
|
||||||
|
paintings_name["2x2"] = paintings_name["2x2"] or {}
|
||||||
|
paintings_name["2x2"][name] = node_name
|
||||||
|
paintings_texture[node_name] = texture
|
||||||
|
|
||||||
|
-- register the node
|
||||||
|
minetest.register_node(node_name, {
|
||||||
|
description = 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,
|
||||||
|
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
|
||||||
|
paintings_name["3x2"] = paintings_name["3x2"] or {}
|
||||||
|
paintings_name["3x2"][name] = node_name
|
||||||
|
paintings_texture[node_name] = texture
|
||||||
|
|
||||||
|
-- register the node
|
||||||
|
minetest.register_node(node_name, {
|
||||||
|
description = 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,
|
||||||
|
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
|
||||||
|
paintings_name["3x3"] = paintings_name["3x3"] or {}
|
||||||
|
paintings_name["3x3"][name] = node_name
|
||||||
|
paintings_texture[node_name] = texture
|
||||||
|
|
||||||
|
-- register the node
|
||||||
|
minetest.register_node(node_name, {
|
||||||
|
description = 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,
|
||||||
|
groups = {choppy = 3, oddly_breakable_by_hand = 3},
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
end
|
Loading…
Reference in New Issue