meshnode stair and jdc_lamps with correct portage

This commit is contained in:
Jordach 2014-12-04 13:36:44 +00:00
parent 8178f9a4f7
commit 80aa22fa0b
24 changed files with 70 additions and 4 deletions

63
mods/jdc_lamps/init.lua Normal file
View File

@ -0,0 +1,63 @@
local namespace = "jdc_lamps:"
local function craft_lamp(dye_colour)
minetest.register_craft({
output = namespace..dye_colour,
recipe = {
{'', 'dye:'..dye_colour, ''},
{'dye:'..dye_colour, namespace..'frame_glass', 'dye:'..dye_colour},
{'', 'dye:'..dye_colour, ''},
}
})
end
local function create_lamp(name, desc)
minetest.register_node(namespace..name, {
description = desc.." Lamp",
drawtype = "mesh",
tiles = {"lamp_"..name..".png"},
paramtype = "light",
use_texture_alpha = true,
mesh = "lamp_model.b3d",
groups = {cracky=3},
light_source = 14,
})
craft_lamp(name)
end
minetest.register_craft({
output = namespace..'frame',
recipe = {
{'tools:steel_ingot', 'group:wood', 'tools:steel_ingot'},
{'group:wood', 'deco:torch', 'group:wood'},
{'tools:steel_ingot', 'group:wood', 'tools:steel_ingot'},
}
})
minetest.register_craft({
type = "shapeless",
output = namespace..'frame_glass',
recipe = {'deco:glass', 'jdc_lamps:frame'},
})
create_lamp("black", "Black")
create_lamp("blue", "Blue")
create_lamp("brown", "Brown")
create_lamp("cyan", "Cyan")
create_lamp("dark_green", "Dark Green")
create_lamp("dark_grey", "Dark Grey")
create_lamp("green", "Green")
create_lamp("grey", "Grey")
create_lamp("magenta", "Magenta")
create_lamp("orange", "Orange")
create_lamp("pink", "Pink")
create_lamp("red", "Red")
create_lamp("violet", "Violet")
create_lamp("white", "White")
create_lamp("yellow", "Yellow")
create_lamp("frame", "Frame of the")
create_lamp("frame_glass", "Framed Glass of the")

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

View File

@ -7,20 +7,23 @@ stairs = {}
function stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":stairs:stair_" .. subname, {
description = description,
drawtype = "nodebox",
drawtype = "mesh",
tiles = images,
mesh = "stairs.b3d",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = true,
groups = groups,
sounds = sounds,
node_box = {
collision_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
{0.5, -0.5, -0.5, -0.5, -0.16406, 0.5},
{0.5, -0.16406, -0.16406, -0.5, 0.17188, 0.5},
{0.5, 0.17188, 0.17188, -0.5, 0.5, 0.5},
},
},
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack

Binary file not shown.

Binary file not shown.