increment

master
Izzy 2013-12-03 15:59:43 -08:00
parent 56e87e1415
commit 6b20d7b6a2
6 changed files with 231 additions and 1 deletions

24
LICENSE
View File

@ -21,4 +21,26 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org>
For more information, please refer to <http://unlicense.org/>
-- or --
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
-- or --
Whatever license you feel like. AGPLv3 is nice. ;)

9
config.lua Normal file
View File

@ -0,0 +1,9 @@
gourds.gourdlist = {
{name="pumpkin", max_spread="8", growth_rate="2"},
}

1
crafts.lua Normal file
View File

@ -0,0 +1 @@

146
gourd_gen.lua Normal file
View File

@ -0,0 +1,146 @@
local function register_gourd(info)
local name = info.name
-- done
minetest.register_craftitem(":gourds:"..name.."_seed", {
description = name.." Seed",
inventory_image = "gourds_"..name.."_seed.png",
on_place = function(itemstack, placer, pointed_thing)
local above = minetest.env:get_node(pointed_thing.above)
if above.name == "air" then
above.name = "gourds:"..name.."_root"
minetest.env:set_node(pointed_thing.above, above)
itemstack:take_item(1)
return itemstack
end
end
})
minetest.register_node("gourds:"..name.."_root", {
paramtype = "light",
walkable = false,
drawtype = "plantlike",
drop = "",
tiles = {"gourds_"..name.."_root.png"},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.5+6/16, 0.5}
},
},
groups = {snappy=3, flammable=2,plant=1, gourd_root=1, gourd_vines=1 },
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
-- set the initial growth limit
end,
})
minetest.register_node("gourds:"..name.."_vines", {
paramtype = "light",
walkable = false,
sunlight_propagates = true,
drawtype = "nodebox",
drop = ":gourds:cut_vines 2",
tiles = {"gourds_"..name.."_vines.png"},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}
},
},
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1, gourd_vines=1 },
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
-- set the initial growth limit
-- set meta info on it
end,
})
minetest.register_node("gourds:"..name.."_vines_flowering", {
paramtype = "light",
walkable = false,
sunlight_propagates = true,
drawtype = "nodebox",
drop = ":gourds:cut_vines 2",
tiles = {"gourds_"..name.."_vines.png"},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}
},
},
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1, gourd_vines=1 },
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
-- set the initial growth limit
-- set meta info on it
end,
})
minetest.register_node("gourds:"..name, {
paramtype = "light",
walkable = false,
sunlight_propagates = true,
drawtype = "nodebox",
tiles = {"gourds_"..name..".png"},
node_box = {
type = "fixed",
fixed = {
{-0.45, -0.5, -0.45, 0.45, 0.35, 0.45}
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.45, -0.5, -0.45, 0.45, 0.35, 0.45}
},
},
groups = {snappy=3, flammable=2, ,plant=1, gourd=1 },
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
-- set the initial growth limit
-- set meta info on it
end,
})
minetest.register_craftitem(":gourds:"..name.."_flesh", {
description = name.." Flesh",
inventory_image = "gourds_"..name.."_flesh.png",
})
minetest.register_craft({
type = "shapeless",
output = "gourds:"..name.."_flesh 2",
recipe = {"gourds:"..name}
})
end

14
init.lua Normal file
View File

@ -0,0 +1,14 @@
local modpath = minetest.get_modpath("gourds")
dofile(modpath.."/config.lua")
dofile(modpath.."/gourd_gen.lua")
dofile(modpath.."/node_def.lua")
dofile(modpath.."/crafts.lua")
dofile(modpath.."/mapgen.lua")

38
node_def.lua Normal file
View File

@ -0,0 +1,38 @@
minetest.register_craftitem(":gourds:cut_vines", {
description = "Cut Vines",
inventory_image = "gourds_cut_vines.png",
})
minetest.register_node("gourds:whithered_vines", {
paramtype = "light",
walkable = false,
sunlight_propagates = true,
drawtype = "nodebox",
drop = ":gourds:cut_vines 1",
tiles = {"gourds_whithered_vines.png"},
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.2, 0.5}
},
},
groups = {snappy=3, flammable=3, not_in_creative_inventory=1,plant=1, gourd_vines=1 },
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
-- set the initial growth limit
-- set meta info on it
end,
})