paintings
This commit is contained in:
parent
57be2da0b0
commit
cc5a5816ad
1
mods/paintings/depends.txt
Normal file
1
mods/paintings/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
47
mods/paintings/init.lua
Normal file
47
mods/paintings/init.lua
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
|
||||||
|
--texture format: paintings_[name].png, must be the same as the node name (NOT the description)
|
||||||
|
--sizes are: 1X1, 1X2, 2X2
|
||||||
|
local paintings = {
|
||||||
|
--{"name/texture", "description", "size"}
|
||||||
|
{"small", "Small Painting (test)", "1X1"},
|
||||||
|
{"medium", "Medium Painting (test)", "1X2"},
|
||||||
|
{"large", "Large Painting (test)", "2X2"},
|
||||||
|
}
|
||||||
|
|
||||||
|
local small = {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}
|
||||||
|
local medium = {-1.5, -0.5, 0.4375, 0.5, 0.5, 0.5}
|
||||||
|
local large = {-0.5, -0.5, 0.4375, 1.5, 1.5, 0.5}
|
||||||
|
|
||||||
|
for _, row in ipairs(paintings) do
|
||||||
|
local name = row[1]
|
||||||
|
local description = row[2]
|
||||||
|
local size = row[3]
|
||||||
|
local box = small
|
||||||
|
if size == "1X2" then
|
||||||
|
box = medium
|
||||||
|
elseif size == "2X2" then
|
||||||
|
box = large
|
||||||
|
end
|
||||||
|
minetest.register_node("paintings:"..name, {
|
||||||
|
description = description,
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = size..".obj",
|
||||||
|
tiles = {
|
||||||
|
"paintings_"..name..".png",
|
||||||
|
},
|
||||||
|
visual_scale = 0.5,
|
||||||
|
wield_scale = {x=0.5, y=0.5, z=0.5},
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {choppy=1},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = box
|
||||||
|
},
|
||||||
|
collision_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = box
|
||||||
|
},
|
||||||
|
sounds = default.node_sound_wood_defaults()
|
||||||
|
})
|
||||||
|
end
|
34
mods/paintings/models/1X1.obj
Normal file
34
mods/paintings/models/1X1.obj
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Blender v2.72 (sub 0) OBJ File: '1X1.blend'
|
||||||
|
# www.blender.org
|
||||||
|
mtllib 1X1.mtl
|
||||||
|
o Shape1
|
||||||
|
v 1.000000 -1.000000 0.865452
|
||||||
|
v -1.000000 -1.000000 0.865452
|
||||||
|
v -1.000000 1.000000 0.865452
|
||||||
|
v 1.000000 1.000000 0.865452
|
||||||
|
v -1.000000 -1.000000 0.990452
|
||||||
|
v 1.000000 -1.000000 0.990452
|
||||||
|
v 1.000000 1.000000 0.990452
|
||||||
|
v -1.000000 1.000000 0.990452
|
||||||
|
vt 0.015625 0.468750
|
||||||
|
vt 0.265625 0.468750
|
||||||
|
vt 0.265625 0.968750
|
||||||
|
vt 0.015625 0.968750
|
||||||
|
vt 0.281250 0.468750
|
||||||
|
vt 0.531250 0.468750
|
||||||
|
vt 0.531250 0.968750
|
||||||
|
vt 0.281250 0.968750
|
||||||
|
vt 0.265625 1.000000
|
||||||
|
vt 0.015625 1.000000
|
||||||
|
vt 0.515625 0.968750
|
||||||
|
vt 0.515625 1.000000
|
||||||
|
vt 0.000000 0.468750
|
||||||
|
vt 0.000000 0.968750
|
||||||
|
usemtl None
|
||||||
|
s off
|
||||||
|
f 1/1 2/2 3/3 4/4
|
||||||
|
f 5/5 6/6 7/7 8/8
|
||||||
|
f 4/4 3/3 8/9 7/10
|
||||||
|
f 6/3 5/11 2/12 1/9
|
||||||
|
f 6/13 1/1 4/4 7/14
|
||||||
|
f 2/2 5/5 8/8 3/3
|
34
mods/paintings/models/1X2.obj
Normal file
34
mods/paintings/models/1X2.obj
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Blender v2.72 (sub 0) OBJ File: '1X2.blend'
|
||||||
|
# www.blender.org
|
||||||
|
mtllib 1X2.mtl
|
||||||
|
o Shape1
|
||||||
|
v 3.000000 -1.000000 0.872898
|
||||||
|
v -1.000000 -1.000000 0.872898
|
||||||
|
v -1.000000 1.000000 0.872899
|
||||||
|
v 3.000000 1.000000 0.872899
|
||||||
|
v -1.000000 -1.000000 0.997898
|
||||||
|
v 3.000000 -1.000000 0.997898
|
||||||
|
v 3.000000 1.000000 0.997899
|
||||||
|
v -1.000000 1.000000 0.997899
|
||||||
|
vt 0.007813 0.734375
|
||||||
|
vt 0.257813 0.734375
|
||||||
|
vt 0.257813 0.984375
|
||||||
|
vt 0.007813 0.984375
|
||||||
|
vt 0.265625 0.734375
|
||||||
|
vt 0.515625 0.734375
|
||||||
|
vt 0.515625 0.984375
|
||||||
|
vt 0.265625 0.984375
|
||||||
|
vt 0.257813 1.000000
|
||||||
|
vt 0.007813 1.000000
|
||||||
|
vt 0.507813 0.984375
|
||||||
|
vt 0.507813 1.000000
|
||||||
|
vt 0.000000 0.734375
|
||||||
|
vt 0.000000 0.984375
|
||||||
|
usemtl None
|
||||||
|
s off
|
||||||
|
f 1/1 2/2 3/3 4/4
|
||||||
|
f 5/5 6/6 7/7 8/8
|
||||||
|
f 4/4 3/3 8/9 7/10
|
||||||
|
f 6/3 5/11 2/12 1/9
|
||||||
|
f 6/13 1/1 4/4 7/14
|
||||||
|
f 2/2 5/5 8/8 3/3
|
34
mods/paintings/models/2X2.obj
Normal file
34
mods/paintings/models/2X2.obj
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# Blender v2.72 (sub 0) OBJ File: '4X4.blend'
|
||||||
|
# www.blender.org
|
||||||
|
mtllib 2X2.mtl
|
||||||
|
o Shape1
|
||||||
|
v 0.999998 -0.999998 0.856839
|
||||||
|
v -2.999998 -0.999998 0.856839
|
||||||
|
v -2.999998 2.999998 0.856840
|
||||||
|
v 0.999998 2.999998 0.856840
|
||||||
|
v -2.999998 -0.999998 0.981839
|
||||||
|
v 0.999998 -0.999998 0.981839
|
||||||
|
v 0.999998 2.999998 0.981839
|
||||||
|
v -2.999998 2.999998 0.981839
|
||||||
|
vt 0.007813 0.484375
|
||||||
|
vt 0.257813 0.484375
|
||||||
|
vt 0.257813 0.984375
|
||||||
|
vt 0.007813 0.984375
|
||||||
|
vt 0.265625 0.484375
|
||||||
|
vt 0.515625 0.484375
|
||||||
|
vt 0.515625 0.984375
|
||||||
|
vt 0.265625 0.984375
|
||||||
|
vt 0.257813 1.000000
|
||||||
|
vt 0.007813 1.000000
|
||||||
|
vt 0.507813 0.984375
|
||||||
|
vt 0.507813 1.000000
|
||||||
|
vt 0.000000 0.484375
|
||||||
|
vt 0.000000 0.984375
|
||||||
|
usemtl None
|
||||||
|
s off
|
||||||
|
f 1/1 2/2 3/3 4/4
|
||||||
|
f 5/5 6/6 7/7 8/8
|
||||||
|
f 4/4 3/3 8/9 7/10
|
||||||
|
f 6/3 5/11 2/12 1/9
|
||||||
|
f 6/13 1/1 4/4 7/14
|
||||||
|
f 2/2 5/5 8/8 3/3
|
BIN
mods/paintings/textures/paintings_large.png
Normal file
BIN
mods/paintings/textures/paintings_large.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
BIN
mods/paintings/textures/paintings_medium.png
Normal file
BIN
mods/paintings/textures/paintings_medium.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
mods/paintings/textures/paintings_small.png
Normal file
BIN
mods/paintings/textures/paintings_small.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Loading…
x
Reference in New Issue
Block a user