Add files via upload
This commit is contained in:
parent
79c145a18a
commit
f1957a3120
166
nodes.lua
166
nodes.lua
@ -759,7 +759,7 @@ minetest.register_node('ma_pops_furniture:table_'..material, {
|
||||
description = name,
|
||||
drawtype = 'nodebox',
|
||||
tiles = {'default_'..material..'.png'},
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, furniture = 1, flammable = 1, table = 1},
|
||||
groups = {snappy = 2, oddly_breakable_by_hand = 2, furniture = 1, flammable = 1, table = 1},
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
@ -770,6 +770,83 @@ minetest.register_node('ma_pops_furniture:table_'..material, {
|
||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, 0.5}, -- NodeBox3
|
||||
}
|
||||
},
|
||||
|
||||
after_dig_node = function(pos) ma_pops_furniture.check_table(pos, material, false, true) end,
|
||||
after_place_node = function(pos) ma_pops_furniture.check_table(pos, material, true, true) end,
|
||||
on_punch = function(pos) ma_pops_furniture.check_table(pos, material, true, true) end
|
||||
})
|
||||
end
|
||||
|
||||
local table_c_table = { --name, material, invimg
|
||||
{'Stone Corner Table', 'cobble', 'mp_table_stone.png'},
|
||||
{'Wood Corner Table', 'wood', 'mp_table_wood.png'},
|
||||
{'Acacia Corner Wood Table', 'acacia_wood', 'mp_table_wood_acacia.png'},
|
||||
{'Aspen Corner Wood Table', 'aspen_wood', 'mp_table_wood_aspen.png'},
|
||||
{'Pine Corner Wood Table', 'pine_wood', 'mp_table_wood_pine.png'},
|
||||
{'Jungle Corner Wood Table', 'junglewood', 'mp_table_wood_jungle.png'}
|
||||
}
|
||||
|
||||
for i in ipairs (table_c_table) do
|
||||
local name = table_c_table[i][1]
|
||||
local material = table_c_table[i][2]
|
||||
local invimg = table_c_table[i][3]
|
||||
|
||||
minetest.register_node('ma_pops_furniture:table_c_'..material, {
|
||||
description = name,
|
||||
drawtype = 'nodebox',
|
||||
tiles = {'default_'..material..'.png'},
|
||||
groups = {snappy = 2, oddly_breakable_by_hand = 2, furniture = 1, flammable = 1, table = 1, not_in_creative_inventory = 1},
|
||||
drop = 'ma_pops_furniture:table_'..material,
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, 0.5}, -- NodeBox1
|
||||
{-0.375, -0.5, -0.125, -0.125, 0.3125, 0.125}, -- NodeBox3
|
||||
}
|
||||
},
|
||||
|
||||
after_dig_node = function(pos) ma_pops_furniture.check_table(pos, material, false, true) end,
|
||||
after_place_node = function(pos) ma_pops_furniture.check_table(pos, material, true, true) end,
|
||||
on_punch = function(pos) ma_pops_furniture.check_table(pos, material, true, true) end
|
||||
})
|
||||
end
|
||||
|
||||
local table_center_table = { --name, material, invimg
|
||||
{'Stone Center Table', 'cobble', 'mp_table_stone.png'},
|
||||
{'Wood Center Table', 'wood', 'mp_table_wood.png'},
|
||||
{'Acacia Center Wood Table', 'acacia_wood', 'mp_table_wood_acacia.png'},
|
||||
{'Aspen Center Wood Table', 'aspen_wood', 'mp_table_wood_aspen.png'},
|
||||
{'Pine Center Wood Table', 'pine_wood', 'mp_table_wood_pine.png'},
|
||||
{'Jungle Center Wood Table', 'junglewood', 'mp_table_wood_jungle.png'}
|
||||
}
|
||||
|
||||
for i in ipairs (table_center_table) do
|
||||
local name = table_center_table[i][1]
|
||||
local material = table_center_table[i][2]
|
||||
local invimg = table_center_table[i][3]
|
||||
|
||||
minetest.register_node('ma_pops_furniture:table_center_'..material, {
|
||||
description = name,
|
||||
drawtype = 'nodebox',
|
||||
tiles = {'default_'..material..'.png'},
|
||||
groups = {snappy = 2, oddly_breakable_by_hand = 2, furniture = 1, flammable = 1, table = 1, not_in_creative_inventory = 1},
|
||||
drop = 'ma_pops_furniture:table_'..material,
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'facedir',
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, 0.3125, -0.5, 0.5, 0.5, 0.5},
|
||||
}
|
||||
},
|
||||
|
||||
after_dig_node = function(pos) ma_pops_furniture.check_table(pos, material, false, true) end,
|
||||
after_place_node = function(pos) ma_pops_furniture.check_table(pos, material, true, true) end,
|
||||
on_punch = function(pos) ma_pops_furniture.check_table(pos, material, true, true) end
|
||||
})
|
||||
end
|
||||
|
||||
@ -1574,21 +1651,21 @@ minetest.register_node('ma_pops_furniture:fireplace_on', {
|
||||
})
|
||||
|
||||
local lamp_table = { --name, color, colorize(hex or color name:intensity(1-255))
|
||||
{'Black', 'black', 'black:150'},
|
||||
{'Blue', 'blue', 'blue:150'},
|
||||
{'Brown', 'brown', 'brown:150'},
|
||||
{'Cyan', 'cyan', 'cyan:150'},
|
||||
{'Dark Green', 'dark_green', 'green:150'},
|
||||
{'Dark Grey', 'dark_grey', 'black:150'},
|
||||
{'Black', 'black', 'black:225'},
|
||||
{'Blue', 'blue', 'blue:225'},
|
||||
{'Brown', 'brown', 'brown:225'},
|
||||
{'Cyan', 'cyan', 'cyan:200'},
|
||||
{'Dark Green', 'dark_green', 'green:225'},
|
||||
{'Dark Grey', 'dark_grey', 'black:200'},
|
||||
{'Green', 'green', '#32cd32:150'},
|
||||
{'Grey', 'grey', '#888888:150'},
|
||||
{'Magenta', 'magenta', 'magenta:150'},
|
||||
{'Orange', 'orange', 'orange:150'},
|
||||
{'Pink', 'pink', 'pink:150'},
|
||||
{'Red', 'red', 'red:150'},
|
||||
{'Violet', 'violet', '#aa00dd:150'},
|
||||
{'White', 'white', '#FFFFFF:150'},
|
||||
{'Yellow', 'yellow', 'yellow:150'},
|
||||
{'Grey', 'grey', 'black:100'},
|
||||
{'Magenta', 'magenta', 'magenta:200'},
|
||||
{'Orange', 'orange', 'orange:225'},
|
||||
{'Pink', 'pink', 'pink:225'},
|
||||
{'Red', 'red', 'red:225'},
|
||||
{'Violet', 'violet', 'violet:225'},
|
||||
{'White', 'white', 'white:1'},
|
||||
{'Yellow', 'yellow', 'yellow:225'},
|
||||
}
|
||||
|
||||
for i in ipairs (lamp_table) do
|
||||
@ -1763,6 +1840,7 @@ minetest.register_node("ma_pops_furniture:blinds", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, furniture = 1},
|
||||
sunlight_propagates = true;
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -2437,3 +2515,61 @@ minetest.register_node('ma_pops_furniture:stone_path_'..i, {
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
local stool_table = { --name, color, colorize(hex or color name:intensity(1-255))
|
||||
{'Black', 'black', 'black:225'},
|
||||
{'Blue', 'blue', 'blue:150'},
|
||||
{'Brown', 'brown', 'brown:100'},
|
||||
{'Cyan', 'cyan', 'cyan:150'},
|
||||
{'Dark Green', 'dark_green', 'green:200'},
|
||||
--{'Dark Grey', 'dark_grey', 'black:200'},
|
||||
{'Green', 'green', '#32cd32:150'},
|
||||
--{'Grey', 'grey', 'black:150'},
|
||||
{'Magenta', 'magenta', 'magenta:200'},
|
||||
{'Orange', 'orange', 'orange:150'},
|
||||
{'Pink', 'pink', 'pink:150'},
|
||||
{'Red', 'red', 'red:150'},
|
||||
{'Violet', 'violet', 'violet:150'},
|
||||
{'White', 'white', 'white:150'},
|
||||
{'Yellow', 'yellow', 'yellow:150'},
|
||||
}
|
||||
|
||||
for i in ipairs (stool_table) do
|
||||
local name = stool_table[i][1]
|
||||
local color = stool_table[i][2]
|
||||
local hex = stool_table[i][3]
|
||||
|
||||
minetest.register_node("ma_pops_furniture:stool_"..color, {
|
||||
description = name.. " Stool",
|
||||
tiles = {
|
||||
"mp_stool_top1.png^mp_stool_top.png^[colorize:"..hex.."^mp_stool_top1.png",
|
||||
"default_coral_skeleton.png",
|
||||
"default_coral_skeleton.png",
|
||||
"default_coral_skeleton.png",
|
||||
"default_coral_skeleton.png",
|
||||
"default_coral_skeleton.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, furniture = 1},
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
ma_pops_furniture.sit(pos, node, clicker)
|
||||
end,
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.375, -0.5, -0.375, -0.1875, 0.375, -0.1875}, -- NodeBox1
|
||||
{-0.375, -0.5, 0.1875, -0.1875, 0.375, 0.375}, -- NodeBox2
|
||||
{0.1875, -0.5, 0.1875, 0.375, 0.375, 0.375}, -- NodeBox3
|
||||
{0.1875, -0.5, -0.375, 0.375, 0.375, -0.1875}, -- NodeBox4
|
||||
{-0.375, 0.1875, -0.375, 0.375, 0.375, 0.375}, -- NodeBox5
|
||||
{0.25, -0.375, -0.1875, 0.3125, -0.3125, 0.1875}, -- NodeBox6
|
||||
{-0.1875, -0.375, -0.3125, 0.1875, -0.3125, -0.25}, -- NodeBox7
|
||||
{-0.1875, -0.375, 0.25, 0.1875, -0.3125, 0.3125}, -- NodeBox8
|
||||
{-0.3125, -0.375, -0.1875, -0.25, -0.3125, 0.1875}, -- NodeBox9
|
||||
{-0.3125, 0.375, -0.3125, 0.3125, 0.4375, 0.3125}, -- NodeBox10
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user