more tweaks
This commit is contained in:
parent
ea0df9a50e
commit
f99645757b
@ -78,8 +78,8 @@ end
|
|||||||
xdecor.register("frame", {
|
xdecor.register("frame", {
|
||||||
description = "Item frame", groups = {snappy=3}, on_rotate = screwdriver.disallow,
|
description = "Item frame", groups = {snappy=3}, on_rotate = screwdriver.disallow,
|
||||||
node_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} },
|
node_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} },
|
||||||
tiles = {"xdecor_wood_tile.png", "xdecor_wood_tile.png", "xdecor_wood_tile.png",
|
tiles = {"xdecor_wood.png", "xdecor_wood.png", "xdecor_wood.png",
|
||||||
"xdecor_wood_tile.png", "xdecor_wood_tile.png", "xdecor_frame.png"},
|
"xdecor_wood.png", "xdecor_wood.png", "xdecor_frame.png"},
|
||||||
inventory_image = "xdecor_frame.png",
|
inventory_image = "xdecor_frame.png",
|
||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
19
nodes.lua
19
nodes.lua
@ -47,7 +47,7 @@ xdecor.register("cauldron", {
|
|||||||
"xdecor_cauldron_sides.png"} })
|
"xdecor_cauldron_sides.png"} })
|
||||||
|
|
||||||
xdecor.register("chair", {
|
xdecor.register("chair", {
|
||||||
description = "Chair", tiles = {"xdecor_wood_tile.png"},
|
description = "Chair", tiles = {"xdecor_wood.png"},
|
||||||
sounds = default.node_sound_wood_defaults(), groups = {snappy=3},
|
sounds = default.node_sound_wood_defaults(), groups = {snappy=3},
|
||||||
node_box = {type="fixed", fixed={
|
node_box = {type="fixed", fixed={
|
||||||
{-0.3125, -0.5, 0.1875, -0.1875, 0.5, 0.3125},
|
{-0.3125, -0.5, 0.1875, -0.1875, 0.5, 0.3125},
|
||||||
@ -60,11 +60,11 @@ xdecor.register("chair", {
|
|||||||
xdecor.register("chandelier", {
|
xdecor.register("chandelier", {
|
||||||
description = "Chandelier", drawtype = "plantlike", walkable = false,
|
description = "Chandelier", drawtype = "plantlike", walkable = false,
|
||||||
inventory_image = "xdecor_chandelier.png", tiles = {"xdecor_chandelier.png"},
|
inventory_image = "xdecor_chandelier.png", tiles = {"xdecor_chandelier.png"},
|
||||||
groups = {dig_immediate=3}, light_source = 15 })
|
groups = {dig_immediate=3}, light_source = 14 })
|
||||||
|
|
||||||
xdecor.register("coalstone_tile", {
|
xdecor.register("coalstone_tile", {
|
||||||
description = "Coalstone Tile", tiles = {"xdecor_coalstone_tile.png"},
|
description = "Coalstone Tile", tiles = {"xdecor_coalstone_tile.png"},
|
||||||
groups = {snappy=3}, sounds = default.node_sound_stone_defaults() })
|
groups = {snappy=2}, sounds = default.node_sound_stone_defaults() })
|
||||||
|
|
||||||
local curtaincolors = {"red"} -- add more curtains simply here
|
local curtaincolors = {"red"} -- add more curtains simply here
|
||||||
for _, c in ipairs(curtaincolors) do
|
for _, c in ipairs(curtaincolors) do
|
||||||
@ -108,9 +108,10 @@ xdecor.register("empty_shelf", {
|
|||||||
tiles = {"default_wood.png", "xdecor_empty_shelf.png"},
|
tiles = {"default_wood.png", "xdecor_empty_shelf.png"},
|
||||||
groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
|
groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
|
||||||
|
|
||||||
|
local fence_sbox = {type="fixed", fixed={-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}}
|
||||||
xdecor.register("fence_wrought_iron", {
|
xdecor.register("fence_wrought_iron", {
|
||||||
description = "Wrought Iron Fence", drawtype = "fencelike",
|
description = "Wrought Iron Fence", drawtype = "fencelike", groups = {snappy=2},
|
||||||
tiles = {"default_stone.png^[colorize:#2a2420:180"}, groups = {snappy=3},
|
tiles = {"default_stone.png^[colorize:#2a2420:180"}, selection_box = fence_sbox,
|
||||||
inventory_image = "default_fence_overlay.png^default_stone.png^[colorize:#2a2420:160^default_fence_overlay.png^[makealpha:255,126,126" })
|
inventory_image = "default_fence_overlay.png^default_stone.png^[colorize:#2a2420:160^default_fence_overlay.png^[makealpha:255,126,126" })
|
||||||
|
|
||||||
xdecor.register("fire", {
|
xdecor.register("fire", {
|
||||||
@ -177,11 +178,11 @@ xdecor.register("metal_cabinet", {
|
|||||||
tiles = {"xdecor_metal_cabinet_sides.png", "xdecor_metal_cabinet_sides.png",
|
tiles = {"xdecor_metal_cabinet_sides.png", "xdecor_metal_cabinet_sides.png",
|
||||||
"xdecor_metal_cabinet_sides.png", "xdecor_metal_cabinet_sides.png",
|
"xdecor_metal_cabinet_sides.png", "xdecor_metal_cabinet_sides.png",
|
||||||
"xdecor_metal_cabinet_sides.png", "xdecor_metal_cabinet_front.png"},
|
"xdecor_metal_cabinet_sides.png", "xdecor_metal_cabinet_front.png"},
|
||||||
groups = {snappy=2}, infotext = "Metal Cabinet" })
|
groups = {snappy=1}, infotext = "Metal Cabinet" })
|
||||||
|
|
||||||
xdecor.register("moonbrick", {
|
xdecor.register("moonbrick", {
|
||||||
description = "Moonbrick", tiles = {"xdecor_moonbrick.png"},
|
description = "Moonbrick", tiles = {"xdecor_moonbrick.png"},
|
||||||
groups = {snappy=3}, sounds = default.node_sound_stone_defaults() })
|
groups = {snappy=2}, sounds = default.node_sound_stone_defaults() })
|
||||||
|
|
||||||
xdecor.register("multishelf", {
|
xdecor.register("multishelf", {
|
||||||
description = "Multi Shelf", inventory = {size=24}, infotext = "Multi Shelf",
|
description = "Multi Shelf", inventory = {size=24}, infotext = "Multi Shelf",
|
||||||
@ -210,7 +211,7 @@ xdecor.register("stone_tile", {
|
|||||||
groups = {snappy=3}, sounds = default.node_sound_stone_defaults() })
|
groups = {snappy=3}, sounds = default.node_sound_stone_defaults() })
|
||||||
|
|
||||||
xdecor.register("table", {
|
xdecor.register("table", {
|
||||||
description = "Table", tiles = {"xdecor_wood_tile.png"},
|
description = "Table", tiles = {"xdecor_wood.png"},
|
||||||
groups = {snappy=3}, sounds = default.node_sound_wood_defaults(),
|
groups = {snappy=3}, sounds = default.node_sound_wood_defaults(),
|
||||||
node_box = {type="fixed", fixed={
|
node_box = {type="fixed", fixed={
|
||||||
{-0.5, 0.4, -0.5, 0.5, 0.5, 0.5},
|
{-0.5, 0.4, -0.5, 0.5, 0.5, 0.5},
|
||||||
@ -234,4 +235,4 @@ xdecor.register("woodframed_glass", {
|
|||||||
|
|
||||||
xdecor.register("wood_tile", {
|
xdecor.register("wood_tile", {
|
||||||
description = "Wood Tile", tiles = {"xdecor_wood_tile.png"},
|
description = "Wood Tile", tiles = {"xdecor_wood_tile.png"},
|
||||||
groups = {snappy=3, wood=1}, sounds = default.node_sound_wood_defaults() })
|
groups = {snappy=2, wood=1}, sounds = default.node_sound_wood_defaults() })
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 218 B |
@ -9,7 +9,7 @@ xdecor.register("workbench", {
|
|||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", "size[8,7;]"..fancy_gui..
|
meta:set_string("formspec", "size[8,7;]"..fancy_gui..
|
||||||
"label[0,0;Cut your wood tile into...]"..
|
"label[0,0;Cut your wood into...]"..
|
||||||
"label[0,1.5;Input]"..
|
"label[0,1.5;Input]"..
|
||||||
"list[current_name;input;0,2;1,1;]"..
|
"list[current_name;input;0,2;1,1;]"..
|
||||||
"image[1,2;1,1;xdecor_saw.png]"..
|
"image[1,2;1,1;xdecor_saw.png]"..
|
||||||
@ -53,7 +53,7 @@ xdecor.register("workbench", {
|
|||||||
else return end
|
else return end
|
||||||
|
|
||||||
local inputstack = inv:get_stack("input", 1)
|
local inputstack = inv:get_stack("input", 1)
|
||||||
if (inputstack:get_name() == "xdecor:wood_tile") then
|
if (inputstack:get_name() == "default:wood") then
|
||||||
local give = {}
|
local give = {}
|
||||||
for i = 0, anz-1 do
|
for i = 0, anz-1 do
|
||||||
give[i+1] = inv:add_item("output", shape)
|
give[i+1] = inv:add_item("output", shape)
|
||||||
@ -65,8 +65,12 @@ xdecor.register("workbench", {
|
|||||||
can_dig = function(pos, player)
|
can_dig = function(pos, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
return inv:is_empty("src") and inv:is_empty("fuel")
|
if not inv:is_empty("input")
|
||||||
and inv:is_empty("input") and inv:is_empty("output")
|
or not inv:is_empty("output")
|
||||||
|
or not inv:is_empty("fuel")
|
||||||
|
or not inv:is_empty("src") then
|
||||||
|
return false end
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -76,7 +80,7 @@ local function register_wood_cut(name, desc, box, f_groups)
|
|||||||
f_groups.not_in_creative_inventory = 1
|
f_groups.not_in_creative_inventory = 1
|
||||||
xdecor.register(name.."_wood", {
|
xdecor.register(name.."_wood", {
|
||||||
description = "Wood "..desc,
|
description = "Wood "..desc,
|
||||||
tiles = {"xdecor_wood_tile.png"}, groups = f_groups,
|
tiles = {"default_wood.png"}, groups = f_groups,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
node_box = { type = "fixed", fixed = box } }) end
|
node_box = { type = "fixed", fixed = box } }) end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user