use mesh node for fishtank

This commit is contained in:
Vanessa Ezekowitz 2015-05-08 14:05:24 -04:00
parent d15cf002d8
commit 0b6b74678d
20 changed files with 1402 additions and 47 deletions

View File

@ -124,72 +124,51 @@ homedecor.register("chimney", {
sounds = default.node_sound_stone_defaults() sounds = default.node_sound_stone_defaults()
}) })
homedecor.register("fishtank", { local ft_cbox = {
description = "Fishtank",
tiles = {
"homedecor_fishtank_top.png",
"homedecor_fishtank_bottom.png",
"homedecor_fishtank_right.png",
"homedecor_fishtank_left.png",
"homedecor_fishtank_back.png",
"homedecor_fishtank_front.png"
},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.375, 0.5, -0.4375, 0.375},
{-0.4375, -0.4375, -0.3125, 0.4375, 0.1875, 0.3125},
{-0.4375, 0.1875, -0.1875, 0.4375, 0.25, 0.1875},
{-0.1875, 0.0625, 0.0625, 0.1875, 0.25, 0.375},
{ 0.125, -0.5, 0.25, 0.1875, 0.1875, 0.375},
{-0.375, 0.25, -0.125, 0.375, 0.3125, 0.125},
}
},
use_texture_alpha = true,
selection_box = {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.375, 0.5, 0.3125, 0.375 } fixed = { -0.5, -0.5, -0.375, 0.5, 0.3125, 0.375 }
}
homedecor.register("fishtank", {
description = "Fishtank",
mesh = "homedecor_fishtank.obj",
tiles = {
"homedecor_fishtank_filter.png",
"homedecor_generic_plastic_black.png",
"homedecor_fishtank_fishes.png",
"homedecor_fishtank_gravel.png",
"homedecor_fishtank_glass.png",
"homedecor_fishtank_water.png"
}, },
use_texture_alpha = true,
selection_box = ft_cbox,
collision_box = ft_cbox,
groups = {cracky=3,oddly_breakable_by_hand=3}, groups = {cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
on_rightclick = function(pos, node, clicker) on_rightclick = function(pos, node, clicker)
fdir = minetest.get_node(pos).param2 minetest.set_node(pos, {name = "homedecor:fishtank_lighted", param2 = node.param2})
minetest.set_node(pos, {name = "homedecor:fishtank_lighted", param2 = fdir})
end end
}) })
homedecor.register("fishtank_lighted", { homedecor.register("fishtank_lighted", {
description = "Fishtank", description = "Fishtank (lighted)",
mesh = "homedecor_fishtank.obj",
tiles = { tiles = {
"homedecor_fishtank_top.png", "homedecor_fishtank_filter.png",
"homedecor_fishtank_bottom.png", "homedecor_generic_plastic_black.png",
"homedecor_fishtank_right_lighted.png", "homedecor_fishtank_fishes_lighted.png",
"homedecor_fishtank_left_lighted.png", "homedecor_fishtank_gravel_lighted.png",
"homedecor_fishtank_back_lighted.png", "homedecor_fishtank_glass.png",
"homedecor_fishtank_front_lighted.png" "homedecor_fishtank_water_lighted.png"
}, },
light_source = LIGHT_MAX-4, light_source = LIGHT_MAX-4,
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.375, 0.5, -0.4375, 0.375},
{-0.4375, -0.4375, -0.3125, 0.4375, 0.1875, 0.3125},
{-0.4375, 0.1875, -0.1875, 0.4375, 0.25, 0.1875},
{-0.1875, 0.0625, 0.0625, 0.1875, 0.25, 0.375},
{ 0.125, -0.5, 0.25, 0.1875, 0.1875, 0.375},
{-0.375, 0.25, -0.125, 0.375, 0.3125, 0.125},
}
},
use_texture_alpha = true, use_texture_alpha = true,
selection_box = { selection_box = ft_cbox,
type = "fixed", collision_box = ft_cbox,
fixed = { -0.5, -0.5, -0.375, 0.5, 0.3125, 0.375 }
},
groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1}, groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
on_rightclick = function(pos, node, clicker) on_rightclick = function(pos, node, clicker)
fdir = minetest.get_node(pos).param2 minetest.set_node(pos, {name = "homedecor:fishtank", param2 = node.param2})
minetest.set_node(pos, {name = "homedecor:fishtank", param2 = fdir})
end end
}) })

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B