Initial commit

- Many nodes yet to be defined
master
bas080 2015-02-19 21:48:31 +01:00
commit b014cdbca5
6 changed files with 232 additions and 0 deletions

22
README.md Normal file
View File

@ -0,0 +1,22 @@
# OCD Nodes
Requires the OCD texture pack: https://github.com/bas080/OCD_texture_pack
## Adviced
It is suggested to use the following settings
**enabled**
- smooth lighting
- particles
- 3d clouds
- connected glass
**disabled**
- filters
- mipmap
- fancy trees
- shaders
- bumpmapping
- parallax occlusion

77
default.lua Normal file
View File

@ -0,0 +1,77 @@
ocd.node( 'default:sapling', {
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, 0.5/5, 0.5/5 },
{-0.5/5, -0.5/5, -1.5/5, 1.5/5, 1.5/5, 0.5/5 },
{-1.5/5, 0.5/5, -0.5/5, 0.5/5, 2.5/5, 1.5/5 },
{-0.5/5, -0.5/5, 0.5/5, 1.5/5, 0.5/5, 1.5/5 },
{-1.5/5, 0.5/5, -1.5/5, -0.5/5, 1.5/5, -0.5/5},
})
ocd.node( 'default:apple', {
{-1.5/5, -1.5/5, -1.5/5, 1.5/5, 1.5/5, 1.5/5},
{-0.5/5, 1.5/5, -0.5/5, 0.5/5, 2.5/5, 0.5/5},
},{ 'default_apple_top.png', 'default_apple_top.png', 'default_apple.png' })
ocd.node('default:grass_1', {
{-1.5/5, -2.5/5, -1.5/5, -0.5/5, -1.5/5, -0.5/5},
{-1.5/5, -2.5/5, 0.5/5, -0.5/5, -1.5/5, 1.5/5},
{0.5/5, -2.5/5, 0.5/5, 1.5/5, -1.5/5, 1.5/5},
{0.5/5, -2.5/5, -1.5/5, 1.5/5, -1.5/5, -0.5/5}
}, {'default_grass.png'})
ocd.node('default:grass_2', {
{-1.5/5, -2.5/5, -1.5/5, -0.5/5, -1.5/5, -0.5/5},
{0.5/5, -2.5/5, -1.5/5, 1.5/5, -0.5/5, -0.5/5},
{0.5/5, -2.5/5, 0.5/5, 1.5/5, -1.5/5, 1.5/5},
{-1.5/5, -2.5/5, 0.5/5, -0.5/5, -0.5/5, 1.5/5},
{-2.5/5, -1.5/5, -2.5/5, -1.5/5, -0.5/5, -1.5/5},
{1.5/5, -1.5/5, 1.5/5, 2.5/5, -0.5/5, 2.5/5},
}, {'default_grass.png'})
ocd.node("default:grass_3", {
{-1.5/5, -2.5/5, -1.5/5, -0.5/5, -0.5/5, -0.5/5},
{-2.5/5, -0.5/5, -2.5/5, -1.5/5, 0.5/5, -1.5/5},
{1.5/5, -0.5/5, 1.5/5, 2.5/5, 0.5/5, 2.5/5},
{0.5/5, -2.5/5, 0.5/5, 1.5/5, -0.5/5, 1.5/5},
{0.5/5, -2.5/5, -1.5/5, 1.5/5, -0.5/5, -0.5/5},
{-1.5/5, -2.5/5, 0.5/5, -0.5/5, -0.5/5, 1.5/5},
}, {'default_grass.png'})
ocd.node("default:grass_4", {
{-1.5/5, -2.5/5, -1.5/5, -0.5/5, 0.5/5, -0.5/5},
{0.5/5, -2.5/5, -1.5/5, 1.5/5, 0.5/5, -0.5/5},
{0.5/5, -2.5/5, 0.5/5, 1.5/5, 0.5/5, 1.5/5},
{-1.5/5, -2.5/5, 0.5/5, -0.5/5, 0.5/5, 1.5/5},
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, -1.5/5, 0.5/5},
}, {'default_grass.png'})
ocd.node("default:grass_5", {
{-1.5/5, -2.5/5, -1.5/5, -0.5/5, 1.5/5, -0.5/5},
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, -1.5/5, 0.5/5},
{0.5/5, -2.5/5, -1.5/5, 1.5/5, 0.5/5, -0.5/5},
{1.5/5, 0.5/5, -2.5/5, 2.5/5, 1.5/5, -1.5/5},
{-2.5/5, 0.5/5, 1.5/5, -1.5/5, 1.5/5, 2.5/5},
{-1.5/5, -2.5/5, 0.5/5, -0.5/5, 0.5/5, 1.5/5},
{0.5/5, -2.5/5, 0.5/5, 1.5/5, 1.5/5, 1.5/5},
{-2.5/5, 1.5/5, -2.5/5, -1.5/5, 2.5/5, -1.5/5},
{1.5/5, 1.5/5, 1.5/5, 2.5/5, 2.5/5, 2.5/5},
}, {'default_grass.png'})
torch_box = {
type = "wallmounted",
wall_top = {-0.5/3, -0.5/3, -0.5/3, 0.5/3, 1.5/3, 0.5/3},
wall_bottom = {-0.5/3, -1.5/3, -0.5/3, 0.5/3, 0.5/3, 0.5/3},
wall_side = {-1.5/3, -0.5/3, -0.5/3, 0.5/3, 0.5/3, 0.5/3},
}
minetest.override_item( "default:torch", {
drawtype = 'nodebox',
tiles = {"default_torch.png"},
node_box = torch_box,
selection_box = torch_box,
collision_box = torch_box
})
minetest.override_item( "default:glass", {
drawtype = "glasslike_framed",
})

2
depends.txt Normal file
View File

@ -0,0 +1,2 @@
default
flowers

23
farming.lua Normal file
View File

@ -0,0 +1,23 @@
node_box = {
type = "fixed",
fixed = {
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, -1.5/5, 0.5/5},
{0.5/5, -1.5/5, -1.5/5, 1.5/5, 1.5/5, -0.5/5},
{-1.5/5, -1.5/5, 0.5/5, -0.5/5, 1.5/5, 1.5/5},
{0.5/5, -1.5/5, 0.5/5, 1.5/5, 1.5/5, 1.5/5},
{-1.5/5, -1.5/5, -1.5/5, -0.5/5, 1.5/5, -0.5/5},
{-2.5/5, 0.5/5, -2.5/5, -1.5/5, 2.5/5, -1.5/5},
{1.5/5, 0.5/5, -2.5/5, 2.5/5, 2.5/5, -1.5/5},
{1.5/5, 0.5/5, 1.5/5, 2.5/5, 2.5/5, 2.5/5},
{-2.5/5, 0.5/5, 1.5/5, -1.5/5, 2.5/5, 2.5/5},
}
}
--[[
{-0.5, -0.5, -0.5, 0.5, -0.5, 0.5}
fixed = {{-1.5/5, -2.5/5, -1.5/5, -0.5/5, -0.5/5, -0.5/5},{0.5/5, -2.5/5, 0.5/5, 1.5/5, -0.5/5, 1.5/5},{0.5/5, -2.5/5, -1.5/5, 1.5/5, 0.5/5, -0.5/5},{-1.5/5, -2.5/5, 0.5/5, -0.5/5, 0.5/5, 1.5/5},},
fixed = {{-1.5/5, -2.5/5, -1.5/5, -0.5/5, 1.5/5, -0.5/5},{0.5/5, -2.5/5, -1.5/5, 1.5/5, 2.5/5, -0.5/5},{0.5/5, -2.5/5, 0.5/5, 1.5/5, 1.5/5, 1.5/5},{-1.5/5, -2.5/5, 0.5/5, -0.5/5, 2.5/5, 1.5/5}},
fixed = {{-1.5/5, -2.5/5, -1.5/5, -0.5/5, 2.5/5, -0.5/5},{0.5/5, -2.5/5, -1.5/5, 1.5/5, 2.5/5, -0.5/5},{0.5/5, -2.5/5, 0.5/5, 1.5/5, 2.5/5, 1.5/5},{-1.5/5, -2.5/5, 0.5/5, -0.5/5, 2.5/5, 1.5/5},},
]]--

51
flowers.lua Normal file
View File

@ -0,0 +1,51 @@
ocd.node( 'flowers:dandelion_white', {
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, 2.5/5, 0.5/5},
{-1.5/5, -0.5/5, -1.5/5, -0.5/5, 1.5/5, -0.5/5},
{0.5/5, -0.5/5, 0.5/5, 1.5/5, 1.5/5, 1.5/5},
{0.5/5, -0.5/5, -1.5/5, 1.5/5, 1.5/5, -0.5/5},
{-1.5/5, -0.5/5, 0.5/5, -0.5/5, 1.5/5, 1.5/5},
}, { 'flowers_dandelion_white_top.png', 'flowers_dandelion_white_top.png', 'flowers_dandelion_white.png' })
ocd.node( 'flowers:dandelion_yellow', {
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, 1.5/5, 0.5/5},{-1.5/5, -0.5/5, -1.5/5,
-0.5/5, 0.5/5, -0.5/5},{0.5/5, -0.5/5, -1.5/5, 1.5/5, 0.5/5, -0.5/5},{0.5/5,
-0.5/5, 0.5/5, 1.5/5, 0.5/5, 1.5/5},{-1.5/5, -0.5/5, 0.5/5, -0.5/5, 0.5/5,
1.5/5},
},{ 'flowers_dandelion_yellow_top.png', 'flowers_dandelion_yellow_top.png', 'flowers_dandelion_yellow.png' })
ocd.node( 'flowers:rose', {
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, 1.5/5, 0.5/5},
{0.5/5, -0.5/5, -1.5/5, 1.5/5, 2.5/5, -0.5/5},
{-0.5/5, -1.5/5, -1.5/5, 0.5/5, 1.5/5, -0.5/5},
{-1.5/5, -0.5/5, -1.5/5, -0.5/5, 2.5/5, -0.5/5},
{-1.5/5, -1.5/5, -0.5/5, -0.5/5, 1.5/5, 0.5/5},
{-1.5/5, -0.5/5, 0.5/5, -0.5/5, 2.5/5, 1.5/5},
{-0.5/5, -1.5/5, 0.5/5, 0.5/5, 1.5/5, 1.5/5},
{0.5/5, -0.5/5, 0.5/5, 1.5/5, 2.5/5, 1.5/5},
{0.5/5, -1.5/5, -0.5/5, 1.5/5, 1.5/5, 0.5/5},
},{ 'flowers_rose_top.png', 'flowers_rose_top.png', 'flowers_rose.png' })
ocd.node( 'flowers:tulip', {
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, 0.5/5, 0.5/5},
{0.5/5, -0.5/5, -0.5/5, 1.5/5, 2.5/5, 0.5/5},
{-1.5/5, -0.5/5, -0.5/5, -0.5/5, 2.5/5, 0.5/5},
{-0.5/5, -1.5/5, 0.5/5, 0.5/5, 1.5/5, 1.5/5},
{-0.5/5, -1.5/5, -1.5/5, 0.5/5, 1.5/5, -0.5/5},
},{ 'flowers_tulip_top.png', 'flowers_tulip_top.png', 'flowers_tulip.png' })
ocd.node( 'flowers:viola', {
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, -0.5/5, 0.5/5},
{-0.5/5, -0.5/5, 0.5/5, 1.5/5, 0.5/5, 1.5/5},
{-1.5/5, -0.5/5, -0.5/5, -0.5/5, 0.5/5, 1.5/5},
{-1.5/5, -0.5/5, -1.5/5, 0.5/5, 0.5/5, -0.5/5},
{0.5/5, -0.5/5, -1.5/5, 1.5/5, 0.5/5, 0.5/5},
}, { 'flowers_viola_top.png', 'flowers_viola_top.png', 'flowers_viola.png' })
ocd.node( 'flowers:geranium', {
{-0.5/5, -2.5/5, -0.5/5, 0.5/5, -0.5/5, 0.5/5},
{-0.5/5, -0.5/5, 0.5/5, 1.5/5, 0.5/5, 1.5/5},
{-1.5/5, -0.5/5, -0.5/5, -0.5/5, 0.5/5, 1.5/5},
{-1.5/5, -0.5/5, -1.5/5, 0.5/5, 0.5/5, -0.5/5},
{0.5/5, -0.5/5, -1.5/5, 1.5/5, 0.5/5, 0.5/5},
}, { 'flowers_geranium_top.png', 'flowers_geranium_top.png', 'flowers_geranium.png' })

57
init.lua Normal file
View File

@ -0,0 +1,57 @@
ocd = {}
ocd.init = function( )
local mods = {
'farming',
'default',
'flowers'
}
for i, mod in ipairs(mods) do
if minetest.get_modpath( mod ) then
dofile( minetest.get_modpath( "ocd_nodeboxes" ) .. "/" .. mod .. ".lua" )
end
end
end
ocd.node = function ( node, nodebox )
minetest.override_item( node, {
drawtype = "nodebox",
inventory_image = nil,
paramtype = "light",
node_box = {
type = "fixed",
fixed = nodebox
},
collision_box = {
type = "fixed",
fixed = nodebox,
},
selection_box = {
type = "fixed",
fixed = nodebox,
},
})
end
ocd.node = function ( node, nodebox, texture )
minetest.override_item( node, {
drawtype = "nodebox",
tiles = texture,
inventory_image = nil,
paramtype = "light",
node_box = {
type = "fixed",
fixed = nodebox
},
collision_box = {
type = "fixed",
fixed = nodebox,
},
selection_box = {
type = "fixed",
fixed = nodebox,
},
})
end
ocd.init()