meshnode stair and jdc_lamps with correct portage
63
mods/jdc_lamps/init.lua
Normal 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")
|
BIN
mods/jdc_lamps/models/lamp_model.b3d
Normal file
BIN
mods/jdc_lamps/models/lamp_model.blend
Normal file
BIN
mods/jdc_lamps/textures/lamp_black.png
Normal file
After Width: | Height: | Size: 713 B |
BIN
mods/jdc_lamps/textures/lamp_blue.png
Normal file
After Width: | Height: | Size: 588 B |
BIN
mods/jdc_lamps/textures/lamp_brown.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
mods/jdc_lamps/textures/lamp_cyan.png
Normal file
After Width: | Height: | Size: 632 B |
BIN
mods/jdc_lamps/textures/lamp_dark_green.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
mods/jdc_lamps/textures/lamp_dark_grey.png
Normal file
After Width: | Height: | Size: 678 B |
BIN
mods/jdc_lamps/textures/lamp_frame.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
mods/jdc_lamps/textures/lamp_frame_glass.png
Normal file
After Width: | Height: | Size: 498 B |
BIN
mods/jdc_lamps/textures/lamp_green.png
Normal file
After Width: | Height: | Size: 661 B |
BIN
mods/jdc_lamps/textures/lamp_grey.png
Normal file
After Width: | Height: | Size: 695 B |
BIN
mods/jdc_lamps/textures/lamp_magenta.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
mods/jdc_lamps/textures/lamp_orange.png
Normal file
After Width: | Height: | Size: 653 B |
BIN
mods/jdc_lamps/textures/lamp_pink.png
Normal file
After Width: | Height: | Size: 600 B |
BIN
mods/jdc_lamps/textures/lamp_red.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
mods/jdc_lamps/textures/lamp_template.xcf
Normal file
BIN
mods/jdc_lamps/textures/lamp_violet.png
Normal file
After Width: | Height: | Size: 651 B |
BIN
mods/jdc_lamps/textures/lamp_white.png
Normal file
After Width: | Height: | Size: 671 B |
BIN
mods/jdc_lamps/textures/lamp_yellow.png
Normal file
After Width: | Height: | Size: 614 B |
@ -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
|
||||
|