Trees update

This commit is contained in:
Van
2026-02-24 21:48:42 +03:00
parent e0b9024458
commit b50d642bcf
5 changed files with 78 additions and 10 deletions

View File

@@ -11,9 +11,9 @@ local defaultLogDef = {
tiles = {},
groups = {
dig_immediate = 2,
wood = 1
},
paramtype2 = 'facedir',
},
}
}
---@type Node.NodeDefinition
@@ -68,16 +68,77 @@ local function registerWood(name, x)
defaultLog:new({
settings = {
name = name..'_log',
tiles = getLogTiles(x, 1)
tiles = getLogTiles(x, 1),
paramtype2 = 'facedir',
},
callbacks = {
on_place = core.rotate_node
}
})
defaultLog:new({
settings = {
name = name..'_trunk',
tiles = {logTileSheet:t(x, 2)},
inventory_overlay = 'wood_trunk_overlay.png',
drop = 'wood:'..name..'_log',
paramtype2 = 'facedir',
},
callbacks = {
on_place = core.rotate_node
}
})
defaultLog:new({
settings = {
name = name..'_trunk_vertical',
tiles = getLogTiles(x, 1),
inventory_overlay = 'wood_trunk_overlay.png',
drop = 'wood:'..name..'_log'
drop = 'wood:'..name..'_log',
paramtype2 = 'facedir',
},
callbacks = {
on_place = core.rotate_node
}
})
defaultLog:new({
settings = {
drawtype = 'nodebox',
name = name..'_trunk_branch',
tiles = {logTileSheet:t(x, 2)},
inventory_overlay = 'wood_trunk_overlay.png',
drop = 'wood:'..name..'_log',
paramtype = 'light',
node_box = {
type = 'connected',
fixed = {-.25,-.25,-.25, .25,.25,.25},
connect_top = {-.25,-.25,-.25, .25,.5,.25},
connect_bottom = {-.25,-.5,-.25, .25,.25,.25},
connect_front = {-.25,-.25,-.5, .25,.25,.25},
connect_left = {-.5,-.25,-.25, .25,.25,.25},
connect_back = {-.25,-.25,-.25, .25,.25,.5},
connect_right = {-.25,-.25,-.25, .5,.25,.25},
},
connects_to = {'group:wood', 'group:soil'}
},
})
defaultLog:new({
settings = {
drawtype = 'nodebox',
name = name..'_trunk_branch_vertical',
tiles = getLogTiles(x, 1),
inventory_overlay = 'wood_trunk_overlay.png',
drop = 'wood:'..name..'_log',
paramtype = 'light',
node_box = {
type = 'connected',
fixed = {-.25,-.25,-.25, .25,.25,.25},
connect_top = {-.25,-.25,-.25, .25,.5,.25},
connect_bottom = {-.25,-.5,-.25, .25,.25,.25},
},
connects_to = {'group:wood', 'group:soil'}
},
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 122 KiB