New Chairs added.
This commit is contained in:
parent
d9e9498f78
commit
df4f3167af
@ -1,2 +1,2 @@
|
||||
default
|
||||
unifieddyes
|
||||
unifieddyes?
|
||||
|
218
init.lua
218
init.lua
@ -1,4 +1,5 @@
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname)
|
||||
|
||||
local cbox = {
|
||||
type = "fixed",
|
||||
@ -13,66 +14,161 @@ local nbox = {
|
||||
}
|
||||
}
|
||||
|
||||
minetest.register_node("barchairs:barchairs_round_padded",
|
||||
{
|
||||
description = "Round Barchair padded",
|
||||
drawtype = "mesh",
|
||||
mesh = "barchairs_barchair_round_padded.obj",
|
||||
tiles = {
|
||||
"default_wood",
|
||||
"wool_white.png"
|
||||
},
|
||||
inventory_image = "barchairs_barchair_round_padded_inv.png",
|
||||
parmtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
sunlight_propagates = false,
|
||||
node_box = nbox,
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not clicker:is_player() then
|
||||
return itemstack
|
||||
end
|
||||
pos.y = pos.y-0.5
|
||||
clicker:setpos(pos)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
local wood = {}
|
||||
|
||||
minetest.register_node("barchairs:barchairs_plain",
|
||||
{
|
||||
description = "Barchair plain",
|
||||
drawtype = "mesh",
|
||||
mesh = "barchairs_barchair_plain.obj",
|
||||
tiles = {"default_wood"},
|
||||
inventory_image = "barchairs_barchair_plain_inv.png",
|
||||
parmtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = false,
|
||||
node_box = nbox,
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_place_node = unifieddyes.fix_rotation_nsew,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not clicker:is_player() then
|
||||
return itemstack
|
||||
end
|
||||
pos.y = pos.y-0.5
|
||||
clicker:setpos(pos)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
-- Various default Wood
|
||||
wood = {
|
||||
--wood
|
||||
"wood",
|
||||
"junglewood",
|
||||
"aspen_wood",
|
||||
"pine_wood",
|
||||
"acacia_wood",
|
||||
|
||||
--glasslike
|
||||
"obsidian",
|
||||
"ice",
|
||||
|
||||
-- trees
|
||||
"aspen_tree",
|
||||
"acacia_tree",
|
||||
"pine_tree",
|
||||
"jungletree",
|
||||
"tree",
|
||||
|
||||
-- other
|
||||
"cactus",
|
||||
"coral_skeleton",
|
||||
|
||||
-- metal
|
||||
"goldblock",
|
||||
"bronzeblock",
|
||||
"tinblock",
|
||||
"copperblock"
|
||||
|
||||
}
|
||||
|
||||
|
||||
for _,kind in ipairs(wood) do
|
||||
|
||||
|
||||
if(minetest.registered_nodes["default:" .. kind] ~= nil) then
|
||||
|
||||
minetest.register_node("barchairs:barchairs_plain_" .. kind, {
|
||||
description = "Barchair plain " .. kind,
|
||||
tiles = minetest.registered_nodes["default:" .. kind].tiles,
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, 0.375, -0.3125, 0.3125, 0.5, 0.3125}, -- Barchair
|
||||
{-0.3125, -0.5, -0.3125, -0.25, 0.5, -0.1875}, -- Bein_vl
|
||||
{0.25, -0.5, 0.1875, 0.3125, 0.5, 0.3125}, -- Bein_hr
|
||||
{-0.3125, -0.5, 0.1875, -0.25, 0.5, 0.3125}, -- Bein_hl
|
||||
{0.25, -0.5, -0.3125, 0.3125, 0.5, -0.1875}, -- Bein_vr
|
||||
{-0.3125, -0.125, -0.3125, 0.3125, -0.0625, -0.25}, -- Quer_l
|
||||
{-0.3125, -0.125, 0.25, 0.3125, -0.0625, 0.3125}, -- Quer_r
|
||||
{-0.3125, -0.125, -0.25, -0.25, -0.0625, 0.3125}, -- Quer_h
|
||||
{0.25, -0.125, -0.3125, 0.3125, -0.0625, 0.3125}, -- Quer_v
|
||||
}
|
||||
},
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not clicker:is_player() then
|
||||
return itemstack
|
||||
end
|
||||
pos.y = pos.y-0.5
|
||||
clicker:setpos(pos)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
}) -- minetest.register_node
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "barchairs:barchairs_plain_" .. kind,
|
||||
recipe = {
|
||||
{"","default:" .. kind,""},
|
||||
{"default:stick","","default:stick"},
|
||||
{"default:stick","default:" .. kind,"default:stick"}
|
||||
},
|
||||
}) -- minetest.register_craft
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "barchairs:barchairs_plain_" .. kind,
|
||||
burntime = 17,
|
||||
}) -- minetest.register_craft
|
||||
|
||||
end -- if(minetest.registered_nodes
|
||||
|
||||
end -- for
|
||||
|
||||
-- is Unifieddyes installed?
|
||||
if(minetest.get_modpath("unifieddyes")) then
|
||||
|
||||
minetest.register_node("barchairs:barchairs_round_padded",
|
||||
{
|
||||
description = "Round Barchair padded",
|
||||
drawtype = "mesh",
|
||||
mesh = "barchairs_barchair_round_padded.obj",
|
||||
tiles = {
|
||||
"default_wood",
|
||||
"wool_white.png"
|
||||
},
|
||||
inventory_image = "barchairs_barchair_round_padded_inv.png",
|
||||
parmtype = "light",
|
||||
paramtype2 = "colorwallmounted",
|
||||
palette = "unifieddyes_palette_colorwallmounted.png",
|
||||
sunlight_propagates = false,
|
||||
node_box = nbox,
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
||||
end,
|
||||
after_dig_node = unifieddyes.after_dig_node,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not clicker:is_player() then
|
||||
return itemstack
|
||||
end
|
||||
pos.y = pos.y-0.5
|
||||
clicker:setpos(pos)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("barchairs:barchairs_plain",
|
||||
{
|
||||
description = "Barchair plain",
|
||||
drawtype = "mesh",
|
||||
mesh = "barchairs_barchair_plain.obj",
|
||||
tiles = {"default_wood"},
|
||||
inventory_image = "barchairs_barchair_plain_inv.png",
|
||||
parmtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = false,
|
||||
node_box = nbox,
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, ud_param2_colorable = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_place_node = unifieddyes.fix_rotation_nsew,
|
||||
on_rotate = unifieddyes.fix_after_screwdriver_nsew,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not clicker:is_player() then
|
||||
return itemstack
|
||||
end
|
||||
pos.y = pos.y-0.5
|
||||
clicker:setpos(pos)
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
dofile(modpath .. "/recipes.lua")
|
||||
|
79
models/barchair_barchair_plain_1.obj
Normal file
79
models/barchair_barchair_plain_1.obj
Normal file
@ -0,0 +1,79 @@
|
||||
mtllib barchair_barchair_plain_1.mtl
|
||||
o converted_out
|
||||
v 0.5 0.3125 -0.5
|
||||
v 0.5 0.3125 0.5
|
||||
v 0.5 0.5 0.5
|
||||
v 0.5 0.5 -0.5
|
||||
v -0.5 0.3125 -0.5
|
||||
v -0.5 0.3125 0.5
|
||||
v -0.5 0.5 0.5
|
||||
v -0.5 0.5 -0.5
|
||||
v 0.5 -0.5 -0.5
|
||||
v 0.5 -0.5 -0.375
|
||||
v 0.5 0.3125 -0.375
|
||||
v 0.5 0.3125 -0.5
|
||||
v 0.375 -0.5 -0.5
|
||||
v 0.375 -0.5 -0.375
|
||||
v 0.375 0.3125 -0.375
|
||||
v 0.375 0.3125 -0.5
|
||||
v -0.375 -0.5 0.375
|
||||
v -0.375 -0.5 0.5
|
||||
v -0.375 0.5 0.5
|
||||
v -0.375 0.5 0.375
|
||||
v -0.5 -0.5 0.375
|
||||
v -0.5 -0.5 0.5
|
||||
v -0.5 0.5 0.5
|
||||
v -0.5 0.5 0.375
|
||||
v 0.5 -0.5 0.375
|
||||
v 0.5 -0.5 0.5
|
||||
v 0.5 0.5 0.5
|
||||
v 0.5 0.5 0.375
|
||||
v 0.375 -0.5 0.375
|
||||
v 0.375 -0.5 0.5
|
||||
v 0.375 0.5 0.5
|
||||
v 0.375 0.5 0.375
|
||||
v -0.4375 -0.5 -0.5
|
||||
v -0.4375 -0.5 -0.375
|
||||
v -0.4375 0.5 -0.375
|
||||
v -0.4375 0.5 -0.5
|
||||
v -0.5 -0.5 -0.5
|
||||
v -0.5 -0.5 -0.375
|
||||
v -0.5 0.5 -0.375
|
||||
v -0.5 0.5 -0.5
|
||||
usemtl none
|
||||
s off
|
||||
g sitz
|
||||
f 1 2 3 4
|
||||
f 5 6 7 8
|
||||
f 1 4 8 5
|
||||
f 2 3 7 6
|
||||
f 1 2 6 5
|
||||
f 4 3 7 8
|
||||
g bein_vl
|
||||
f 9 10 11 12
|
||||
f 13 14 15 16
|
||||
f 9 12 16 13
|
||||
f 10 11 15 14
|
||||
f 9 10 14 13
|
||||
f 12 11 15 16
|
||||
g bein_ro
|
||||
f 17 18 19 20
|
||||
f 21 22 23 24
|
||||
f 17 20 24 21
|
||||
f 18 19 23 22
|
||||
f 17 18 22 21
|
||||
f 20 19 23 24
|
||||
g bein_lo
|
||||
f 25 26 27 28
|
||||
f 29 30 31 32
|
||||
f 25 28 32 29
|
||||
f 26 27 31 30
|
||||
f 25 26 30 29
|
||||
f 28 27 31 32
|
||||
g bein_rl
|
||||
f 33 34 35 36
|
||||
f 37 38 39 40
|
||||
f 33 36 40 37
|
||||
f 34 35 39 38
|
||||
f 33 34 38 37
|
||||
f 36 35 39 40
|
68
recipes.lua
68
recipes.lua
@ -1,34 +1,40 @@
|
||||
-- Recipes
|
||||
|
||||
minetest.register_craft({
|
||||
output = "barchairs:barchairs_round_padded",
|
||||
recipe = {
|
||||
{"","wool:white",""},
|
||||
{"","default:wood",""},
|
||||
{"default:stick","","default:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "barchairs:barchairs_plain",
|
||||
recipe = {
|
||||
{"","default:wood",""},
|
||||
{"default:stick","","default:stick"},
|
||||
{"default:stick","default:stick","default:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
-- Fuel-Recipes
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "barchairs:barchairs_round_padded",
|
||||
burntime = 18,
|
||||
})
|
||||
-- is unifieddyes installed
|
||||
if(minetest.get_modpath("unifieddyes")) then
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "barchairs:barchairs_plain",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
-- Recipes
|
||||
minetest.register_craft({
|
||||
output = "barchairs:barchairs_round_padded",
|
||||
recipe = {
|
||||
{"","wool:white",""},
|
||||
{"","default:wood",""},
|
||||
{"default:stick","","default:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "barchairs:barchairs_plain",
|
||||
recipe = {
|
||||
{"","default:wood",""},
|
||||
{"default:stick","","default:stick"},
|
||||
{"default:stick","default:stick","default:stick"},
|
||||
},
|
||||
})
|
||||
|
||||
-- Fuel-Recipes
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "barchairs:barchairs_round_padded",
|
||||
burntime = 18,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "barchairs:barchairs_plain",
|
||||
burntime = 15,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user