update Farming, keep our tweaks
93
mods/farming/blueberry.lua
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
|
||||||
|
--= Blueberries
|
||||||
|
|
||||||
|
minetest.register_craftitem("farming:blueberries", {
|
||||||
|
description = "Blueberries",
|
||||||
|
inventory_image = "farming_blueberries.png",
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
|
||||||
|
end,
|
||||||
|
on_use = minetest.item_eat(1),
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Blueberry Muffin (Thanks to sosogirl123 for muffin image in deviantart.com)
|
||||||
|
|
||||||
|
minetest.register_craftitem("farming:muffin_blueberry", {
|
||||||
|
description = "Blueberry Muffin",
|
||||||
|
inventory_image = "farming_blueberry_muffin.png",
|
||||||
|
on_use = minetest.item_eat(2),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "farming:muffin_blueberry 2",
|
||||||
|
recipe = {
|
||||||
|
{"farming:blueberries", "farming:bread", "farming:blueberries"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Define Blueberry growth stages
|
||||||
|
|
||||||
|
minetest.register_node("farming:blueberry_1", {
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"farming_blueberry_1.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
waving = 1,
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
drop = "",
|
||||||
|
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||||
|
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("farming:blueberry_2", {
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"farming_blueberry_2.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
waving = 1,
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
drop = "",
|
||||||
|
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||||
|
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("farming:blueberry_3", {
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"farming_blueberry_3.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
waving = 1,
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
drop = "",
|
||||||
|
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||||
|
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Last stage of Blueberry growth does not have growing=1 so abm never has to check these
|
||||||
|
|
||||||
|
minetest.register_node("farming:blueberry_4", {
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = {"farming_blueberry_4.png"},
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
waving = 1,
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
is_ground_content = true,
|
||||||
|
drop = {
|
||||||
|
items = {
|
||||||
|
{items = {'farming:blueberries 2'},rarity=1},
|
||||||
|
{items = {'farming:blueberries'},rarity=2},
|
||||||
|
{items = {'farming:blueberries'},rarity=3},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
|
||||||
|
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
})
|
@ -1,15 +1,7 @@
|
|||||||
|
|
||||||
-- Re-register Jungletree (tree=2 for placement below)
|
-- Override default jungletree, add tree=2 for cocoa placement
|
||||||
|
|
||||||
minetest.register_node(":default:jungletree", {
|
minetest.override_item("default:jungletree", {groups = {tree=2,choppy=2,oddly_breakable_by_hand=1,flammable=2}})
|
||||||
description = "Jungle Tree",
|
|
||||||
tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
is_ground_content = false,
|
|
||||||
groups = {tree=2,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
on_place = minetest.rotate_node
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Place Cocoa
|
-- Place Cocoa
|
||||||
|
|
||||||
|
@ -1,87 +1,9 @@
|
|||||||
--= Grass
|
|
||||||
|
|
||||||
-- Override default grass and have it drop Wheat Seeds
|
-- Override default grass and have it drop Wheat Seeds
|
||||||
|
|
||||||
minetest.register_node(":default:grass_1", {
|
for i=1,5 do
|
||||||
description = "Grass",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"default_grass_1.png"},
|
|
||||||
-- use a bigger inventory image
|
|
||||||
inventory_image = "default_grass_3.png",
|
|
||||||
wield_image = "default_grass_3.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
is_ground_content = true,
|
|
||||||
drop = {
|
|
||||||
max_items = 1,
|
|
||||||
items = {
|
|
||||||
{items = {'farming:seed_wheat'},rarity = 5},
|
|
||||||
{items = {'default:grass_1'}},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
groups = {snappy=3,flammable=3,flora=1,attached_node=1},
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
},
|
|
||||||
--= Disabled the following random grass placement as it crashes servers when protection nearby...
|
|
||||||
-- on_place = function(itemstack, placer, pointed_thing)
|
|
||||||
-- -- place a random grass node
|
|
||||||
-- local stack = ItemStack("default:grass_"..math.random(1,5))
|
|
||||||
-- local ret = minetest.item_place(stack, placer, pointed_thing)
|
|
||||||
-- return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count()))
|
|
||||||
-- end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Override default Jungle Grass and have it drop Cotton Seeds
|
minetest.override_item("default:grass_"..i, {
|
||||||
|
|
||||||
minetest.register_node(":default:junglegrass", {
|
|
||||||
description = "Jungle Grass",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
visual_scale = 1.3,
|
|
||||||
tiles = {"default_junglegrass.png"},
|
|
||||||
inventory_image = "default_junglegrass.png",
|
|
||||||
wield_image = "default_junglegrass.png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
is_ground_content = true,
|
|
||||||
drop = {
|
|
||||||
max_items = 1,
|
|
||||||
items = {
|
|
||||||
{items = {'farming:seed_cotton'},rarity = 8},
|
|
||||||
{items = {'default:junglegrass'}},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
groups = {snappy=3,flammable=2,flora=1,attached_node=1},
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Define rest of grass for growing
|
|
||||||
|
|
||||||
for i=2,5 do
|
|
||||||
minetest.register_node(":default:grass_"..i, {
|
|
||||||
description = "Grass",
|
|
||||||
drawtype = "plantlike",
|
|
||||||
tiles = {"default_grass_"..i..".png"},
|
|
||||||
inventory_image = "default_grass_"..i..".png",
|
|
||||||
wield_image = "default_grass_"..i..".png",
|
|
||||||
paramtype = "light",
|
|
||||||
sunlight_propagates = true,
|
|
||||||
waving = 1,
|
|
||||||
walkable = false,
|
|
||||||
buildable_to = true,
|
|
||||||
is_ground_content = true,
|
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
items = {
|
items = {
|
||||||
@ -89,11 +11,18 @@ for i=2,5 do
|
|||||||
{items = {'default:grass_1'}},
|
{items = {'default:grass_1'}},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
|
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Override default Jungle Grass and have it drop Cotton Seeds
|
||||||
|
|
||||||
|
minetest.override_item("default:junglegrass", {
|
||||||
|
drop = {
|
||||||
|
max_items = 1,
|
||||||
|
items = {
|
||||||
|
{items = {'farming:seed_cotton'},rarity = 8},
|
||||||
|
{items = {'default:junglegrass'}},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
@ -43,10 +43,7 @@ end
|
|||||||
function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
||||||
local pt = pointed_thing
|
local pt = pointed_thing
|
||||||
-- check if pointing at a node
|
-- check if pointing at a node
|
||||||
if not pt then
|
if not pt or pt.type ~= "node" then
|
||||||
return
|
|
||||||
end
|
|
||||||
if pt.type ~= "node" then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -62,10 +59,8 @@ function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
|
|||||||
local above = minetest.get_node(p)
|
local above = minetest.get_node(p)
|
||||||
|
|
||||||
-- return if any of the nodes is not registered
|
-- return if any of the nodes is not registered
|
||||||
if not minetest.registered_nodes[under.name] then
|
if not minetest.registered_nodes[under.name]
|
||||||
return
|
or not minetest.registered_nodes[above.name] then
|
||||||
end
|
|
||||||
if not minetest.registered_nodes[above.name] then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--[[
|
--[[
|
||||||
Minetest Farming Redo Mod 1.09 (19th September 2014)
|
Minetest Farming Redo Mod 1.10 (4th November 2014)
|
||||||
by TenPlus1
|
by TenPlus1
|
||||||
]]
|
]]
|
||||||
|
|
||||||
@ -23,6 +23,7 @@ dofile(minetest.get_modpath("farming").."/sugar.lua")
|
|||||||
dofile(minetest.get_modpath("farming").."/pumpkin.lua")
|
dofile(minetest.get_modpath("farming").."/pumpkin.lua")
|
||||||
dofile(minetest.get_modpath("farming").."/cocoa.lua")
|
dofile(minetest.get_modpath("farming").."/cocoa.lua")
|
||||||
dofile(minetest.get_modpath("farming").."/raspberry.lua")
|
dofile(minetest.get_modpath("farming").."/raspberry.lua")
|
||||||
|
dofile(minetest.get_modpath("farming").."/blueberry.lua")
|
||||||
dofile(minetest.get_modpath("farming").."/rhubarb.lua")
|
dofile(minetest.get_modpath("farming").."/rhubarb.lua")
|
||||||
dofile(minetest.get_modpath("farming").."/donut.lua") -- sweet treat
|
dofile(minetest.get_modpath("farming").."/donut.lua") -- sweet treat
|
||||||
dofile(minetest.get_modpath("farming").."/mapgen.lua")
|
dofile(minetest.get_modpath("farming").."/mapgen.lua")
|
||||||
|
14
mods/farming/license.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
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.
|
@ -52,7 +52,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
-- If dirt with grass, add plant in various stages of maturity
|
-- If dirt with grass, add plant in various stages of maturity
|
||||||
if nn == "default:dirt_with_grass" then
|
if nn == "default:dirt_with_grass" then
|
||||||
|
|
||||||
local type = math.random(1,10)
|
local type = math.random(1,11)
|
||||||
if type == 1 and ground_y > 15 then
|
if type == 1 and ground_y > 15 then
|
||||||
minetest.set_node(p,{name="farming:potato_"..pr:next(3, 4)})
|
minetest.set_node(p,{name="farming:potato_"..pr:next(3, 4)})
|
||||||
elseif type == 2 then
|
elseif type == 2 then
|
||||||
@ -73,6 +73,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
minetest.set_node(p,{name="farming:raspberry_4"})
|
minetest.set_node(p,{name="farming:raspberry_4"})
|
||||||
elseif type == 10 and ground_y > 10 then
|
elseif type == 10 and ground_y > 10 then
|
||||||
minetest.set_node(p,{name="farming:rhubarb_3"})
|
minetest.set_node(p,{name="farming:rhubarb_3"})
|
||||||
|
elseif type == 11 and ground_y > 5 then
|
||||||
|
minetest.set_node(p,{name="farming:blueberry_4"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -136,6 +136,6 @@ minetest.register_node("farming:melon_8", {
|
|||||||
{items = {'farming:melon_slice 9'},rarity=1},
|
{items = {'farming:melon_slice 9'},rarity=1},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groups = {choppy=3,flammable=2,plant=1},
|
groups = {snappy=3,flammable=2,plant=1},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
minetest.register_node("farming:pumpkin", {
|
minetest.register_node("farming:pumpkin", {
|
||||||
description = "Pumpkin",
|
description = "Pumpkin",
|
||||||
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
|
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
|
||||||
groups = {choppy=3,flammable=2,plant=1},
|
groups = {snappy=3,flammable=2,plant=1},
|
||||||
drop = {
|
drop = {
|
||||||
items = {
|
items = {
|
||||||
{items = {'farming:pumpkin_slice 9'},rarity=1},
|
{items = {'farming:pumpkin_slice 9'},rarity=1},
|
||||||
@ -41,11 +41,28 @@ minetest.register_craft({
|
|||||||
-- Jack 'O Lantern
|
-- Jack 'O Lantern
|
||||||
minetest.register_node("farming:jackolantern", {
|
minetest.register_node("farming:jackolantern", {
|
||||||
description = "Jack 'O Lantern",
|
description = "Jack 'O Lantern",
|
||||||
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face.png"},
|
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_off.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {snappy=3,flammable=2},
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
node.name = "farming:jackolantern_on"
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("farming:jackolantern_on", {
|
||||||
|
description = "Jack 'O Lantern",
|
||||||
|
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_on.png"},
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {choppy=3,flammable=2,plant=1},
|
groups = {snappy=3,flammable=2},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
drop = "farming:jackolantern",
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
node.name = "farming:jackolantern"
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -71,7 +71,7 @@ minetest.register_node("farming:raspberry_3", {
|
|||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Last stage of Carrot growth doesnnot have growing=1 so abm never has to check these
|
-- Last stage of Raspberry growth does not have growing=1 so abm never has to check these
|
||||||
|
|
||||||
minetest.register_node("farming:raspberry_4", {
|
minetest.register_node("farming:raspberry_4", {
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
|
BIN
mods/farming/textures/farming_blueberries.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
mods/farming/textures/farming_blueberry_1.png
Normal file
After Width: | Height: | Size: 114 B |
BIN
mods/farming/textures/farming_blueberry_2.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
mods/farming/textures/farming_blueberry_3.png
Normal file
After Width: | Height: | Size: 231 B |
BIN
mods/farming/textures/farming_blueberry_4.png
Normal file
After Width: | Height: | Size: 317 B |
BIN
mods/farming/textures/farming_blueberry_muffin.png
Normal file
After Width: | Height: | Size: 236 B |
BIN
mods/farming/textures/farming_pumpkin_face_off.png
Normal file
After Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 269 B |