1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-06-29 23:26:04 +02:00

Updated farming redo mod

This commit is contained in:
LeMagnesium 2015-03-18 19:23:03 +01:00
parent 2476e9878f
commit 35a6597207
4 changed files with 10 additions and 7 deletions

View File

@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
Changelog:
1.12 - Player cannot place seeds in protected area, also growing speeds changed to match defaults
1.11 - Added Straw Bale, streamlined growing abm a little, fixed melon rotation bug with screwdriver
1.10 - Added Blueberry Bush and Blueberry Muffins, also Pumpkin/Melon easier to pick up, added check for unloaded map
1.09 - Corn now uses single nodes instead of 1 ontop of the other, Ethanol recipe is more expensive (requires 5 corn) and some code cleanup.

View File

@ -93,6 +93,7 @@ minetest.register_node("farming:cocoa_1", {
}
},
selection_box = {type = "fixed",fixed = {-0.27, -0.45, -0.27, 0.27, 0.45, 0.27},},
-- MODIFICATION MADE FOR MFF ^
groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,growing=1},
sounds = default.node_sound_leaves_defaults(),
})

View File

@ -1,7 +1,6 @@
-- Hoe registration function
-- Register new hoes
farming.register_hoe = function(name, def)
-- Check for : prefix (register new hoes in your mod's namespace)
if name:sub(1,1) ~= ":" then

View File

@ -1,5 +1,5 @@
--[[
Minetest Farming Redo Mod 1.11 (20th Jan 2015)
Minetest Farming Redo Mod 1.12 (1st March 2015)
by TenPlus1
]]
@ -60,11 +60,13 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
end
-- add the node and remove 1 item from the itemstack
minetest.add_node(pt.above, {name=plantname})
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
if not minetest.is_protected(pt.above, placer:get_player_name()) then
minetest.add_node(pt.above, {name=plantname})
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
return itemstack
end
-- Single ABM Handles Growing of All Plants
@ -98,7 +100,7 @@ minetest.register_abm({
pos.y = pos.y+1
-- check light
if minetest.get_node_light(pos) <= 11 then return end
if minetest.get_node_light(pos) < 13 then return end
end