Don't cast a shadow on small/flat nodes
This commit is contained in:
parent
e096e19e4e
commit
222d5db6d2
@ -43,13 +43,16 @@ function xdecor.register(name, def)
|
|||||||
def.sounds = def.sounds or default.node_sound_defaults()
|
def.sounds = def.sounds or default.node_sound_defaults()
|
||||||
|
|
||||||
if not (def.drawtype == "glasslike_framed" or
|
if not (def.drawtype == "glasslike_framed" or
|
||||||
def.drawtype == "glasslike_framed_optional" or
|
def.drawtype == "glasslike_framed_optional" or def.drawtype == "plantlike" or
|
||||||
def.drawtype == "plantlike" or
|
def.drawtype == "signlike" or def.drawtype == "normal") then
|
||||||
def.drawtype == "signlike" or
|
|
||||||
def.drawtype == "normal") then
|
|
||||||
def.paramtype2 = def.paramtype2 or "facedir"
|
def.paramtype2 = def.paramtype2 or "facedir"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if def.drawtype == "plantlike" or def.drawtype == "torchlike" or
|
||||||
|
def.drawtype == "signlike" or def.drawtype == "fencelike" then
|
||||||
|
def.sunlight_propagates = true
|
||||||
|
end
|
||||||
|
|
||||||
local infotext = def.infotext
|
local infotext = def.infotext
|
||||||
local inventory = def.inventory
|
local inventory = def.inventory
|
||||||
def.inventory = nil
|
def.inventory = nil
|
||||||
|
20
nodes.lua
20
nodes.lua
@ -3,7 +3,6 @@ xpanes.register_pane("bamboo_frame", {
|
|||||||
tiles = {"xdecor_bamboo_frame.png"},
|
tiles = {"xdecor_bamboo_frame.png"},
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
|
||||||
textures = {"xdecor_bamboo_frame.png", "xdecor_bamboo_frame.png",
|
textures = {"xdecor_bamboo_frame.png", "xdecor_bamboo_frame.png",
|
||||||
"xpanes_space.png"},
|
"xpanes_space.png"},
|
||||||
inventory_image = "xdecor_bamboo_frame.png",
|
inventory_image = "xdecor_bamboo_frame.png",
|
||||||
@ -90,6 +89,7 @@ xdecor.register("cardboard_box", {
|
|||||||
description = "Cardboard Box",
|
description = "Cardboard Box",
|
||||||
inventory = {size=8},
|
inventory = {size=8},
|
||||||
infotext = "Cardboard Box",
|
infotext = "Cardboard Box",
|
||||||
|
sunlight_propagates = true,
|
||||||
groups = {snappy=3, flammable=3},
|
groups = {snappy=3, flammable=3},
|
||||||
tiles = {"xdecor_cardbox_top.png", "xdecor_cardbox_top.png",
|
tiles = {"xdecor_cardbox_top.png", "xdecor_cardbox_top.png",
|
||||||
"xdecor_cardbox_sides.png"},
|
"xdecor_cardbox_sides.png"},
|
||||||
@ -140,6 +140,7 @@ xdecor.register("chair", {
|
|||||||
tiles = {"xdecor_wood.png"},
|
tiles = {"xdecor_wood.png"},
|
||||||
sounds = xdecor.wood,
|
sounds = xdecor.wood,
|
||||||
groups = {choppy=3, flammable=2},
|
groups = {choppy=3, flammable=2},
|
||||||
|
sunlight_propagates = true,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -288,29 +289,27 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
inv:set_size("enderchest", 8*4)
|
inv:set_size("enderchest", 8*4)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
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",
|
description = "Wrought Iron Fence",
|
||||||
drawtype = "fencelike",
|
drawtype = "fencelike",
|
||||||
groups = {cracky=2},
|
groups = {cracky=2},
|
||||||
tiles = {"xdecor_wrought_iron.png"},
|
tiles = {"xdecor_wrought_iron.png"},
|
||||||
selection_box = fence_sbox,
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}
|
||||||
|
},
|
||||||
inventory_image = "default_fence_overlay.png^xdecor_wrought_iron.png^default_fence_overlay.png^[makealpha:255,126,126"
|
inventory_image = "default_fence_overlay.png^xdecor_wrought_iron.png^default_fence_overlay.png^[makealpha:255,126,126"
|
||||||
})
|
})
|
||||||
|
|
||||||
xdecor.register("fire", {
|
xdecor.register("fire", {
|
||||||
description = "Fancy Fire",
|
description = "Fancy Fire",
|
||||||
|
drawtype = "plantlike",
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
tiles = {
|
tiles = {
|
||||||
{ name = "xdecor_fire_anim.png",
|
{ name = "xdecor_fire_anim.png",
|
||||||
animation = {type="vertical_frames", length=1.5} }
|
animation = {type="vertical_frames", length=1.5} }
|
||||||
},
|
},
|
||||||
drawtype = "plantlike",
|
|
||||||
damage_per_second = 2,
|
damage_per_second = 2,
|
||||||
drop = "",
|
drop = "",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
@ -459,7 +458,6 @@ xpanes.register_pane("rust_bar", {
|
|||||||
tiles = {"xdecor_rust_bars.png"},
|
tiles = {"xdecor_rust_bars.png"},
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
|
||||||
textures = {"xdecor_rust_bars.png", "xdecor_rust_bars.png",
|
textures = {"xdecor_rust_bars.png", "xdecor_rust_bars.png",
|
||||||
"xpanes_space.png"},
|
"xpanes_space.png"},
|
||||||
inventory_image = "xdecor_rust_bars.png",
|
inventory_image = "xdecor_rust_bars.png",
|
||||||
@ -493,6 +491,7 @@ xdecor.register("stonepath", {
|
|||||||
tiles = {"default_stone.png"},
|
tiles = {"default_stone.png"},
|
||||||
groups = {snappy=3, stone=1},
|
groups = {snappy=3, stone=1},
|
||||||
sounds = xdecor.stone,
|
sounds = xdecor.stone,
|
||||||
|
sunlight_propagates = true,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -551,6 +550,7 @@ xdecor.register("trash_can", {
|
|||||||
description = "Trash Can",
|
description = "Trash Can",
|
||||||
tiles = {"xdecor_wood.png"},
|
tiles = {"xdecor_wood.png"},
|
||||||
groups = {choppy=3, flammable=2},
|
groups = {choppy=3, flammable=2},
|
||||||
|
sunlight_propagates = true,
|
||||||
sounds = xdecor.wood,
|
sounds = xdecor.wood,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -570,7 +570,7 @@ xdecor.register("trash_can", {
|
|||||||
},
|
},
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("infotext", "Trash Can - throw your waste here!")
|
meta:set_string("infotext", "Trash Can - throw your waste here.")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -190,6 +190,7 @@ function xwall.register_wall(name, tiles, def)
|
|||||||
textures = {tiles, tiles, tiles, tiles},
|
textures = {tiles, tiles, tiles, tiles},
|
||||||
sounds = xdecor.stone,
|
sounds = xdecor.stone,
|
||||||
groups = {cracky=3, stone=1, pane=1},
|
groups = {cracky=3, stone=1, pane=1},
|
||||||
|
sunlight_propagates = true,
|
||||||
collision_box = {
|
collision_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, -0.25, 0.5, 1, 0.25}
|
fixed = {-0.5, -0.5, -0.25, 0.5, 1, 0.25}
|
||||||
|
Loading…
Reference in New Issue
Block a user