Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
b99d3a61bc | |||
8e08e4be26 | |||
76f022ec5c | |||
67a8d95fa5 |
59
nodes.lua
59
nodes.lua
@ -12,7 +12,8 @@ local sound_wood = moreblocks.node_sound_wood_defaults()
|
||||
local sound_stone = moreblocks.node_sound_stone_defaults()
|
||||
local sound_glass = moreblocks.node_sound_glass_defaults()
|
||||
local sound_leaves = moreblocks.node_sound_leaves_defaults()
|
||||
|
||||
local sound_gravel = default.node_sound_gravel_defaults()
|
||||
local sound_sand = default.node_sound_sand_defaults()
|
||||
-- Don't break on 0.4.14 and earlier.
|
||||
local sound_metal = (moreblocks.node_sound_metal_defaults
|
||||
and moreblocks.node_sound_metal_defaults() or sound_stone)
|
||||
@ -39,7 +40,6 @@ end
|
||||
local deprecated = (" ("..S('Deprecated')..")")
|
||||
|
||||
-- start gravel add part 1
|
||||
local sound_gravel = default.node_sound_gravel_defaults()
|
||||
|
||||
local box_slope = {
|
||||
type = "fixed",
|
||||
@ -939,36 +939,39 @@ local nodes = {
|
||||
}
|
||||
|
||||
for name, def in pairs(nodes) do
|
||||
def.is_ground_content = def.is_ground_content == true
|
||||
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
|
||||
minetest.register_node("moreblocks:" ..name, def)
|
||||
minetest.register_alias(name, "moreblocks:" ..name)
|
||||
if name ~= "tar" then
|
||||
--homedecor errors, aliasing error suppress
|
||||
def.is_ground_content = def.is_ground_content == true
|
||||
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
|
||||
minetest.register_node("moreblocks:" ..name, def)
|
||||
minetest.register_alias(name, "moreblocks:" ..name)
|
||||
|
||||
def_copy = table.copy(def)
|
||||
def_copy = table.copy(def)
|
||||
|
||||
-- Use the primary tile for all sides of cut glasslike nodes.
|
||||
-- This makes them easier to see
|
||||
if
|
||||
#def_copy.tiles > 1 and
|
||||
def_copy.drawtype and
|
||||
def_copy.drawtype == "glasslike_framed" or
|
||||
def_copy.drawtype == "glasslike_framed_optional"
|
||||
then
|
||||
def.tiles = {def_copy.tiles[1]}
|
||||
end
|
||||
-- Use the primary tile for all sides of cut glasslike nodes.
|
||||
-- This makes them easier to see
|
||||
if
|
||||
#def_copy.tiles > 1 and
|
||||
def_copy.drawtype and
|
||||
def_copy.drawtype == "glasslike_framed" or
|
||||
def_copy.drawtype == "glasslike_framed_optional"
|
||||
then
|
||||
def.tiles = {def_copy.tiles[1]}
|
||||
end
|
||||
|
||||
|
||||
if not def.no_stairs then
|
||||
local groups = {}
|
||||
for k, v in pairs(def.groups) do groups[k] = v end
|
||||
stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, {
|
||||
description = def.description,
|
||||
groups = groups,
|
||||
tiles = def.tiles,
|
||||
sunlight_propagates = def.sunlight_propagates,
|
||||
light_source = def.light_source,
|
||||
sounds = def.sounds,
|
||||
})
|
||||
if not def.no_stairs then
|
||||
local groups = {}
|
||||
for k, v in pairs(def.groups) do groups[k] = v end
|
||||
stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, {
|
||||
description = def.description,
|
||||
groups = groups,
|
||||
tiles = def.tiles,
|
||||
sunlight_propagates = def.sunlight_propagates,
|
||||
light_source = def.light_source,
|
||||
sounds = def.sounds,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user