mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 07:59:32 +01:00
Delete old func, fix two crash and add timer
This commit is contained in:
parent
15256967eb
commit
4052da3116
3 changed files with 55 additions and 7 deletions
|
@ -1,3 +1,4 @@
|
|||
local init = os.clock()
|
||||
farming = {}
|
||||
|
||||
function farming:add_plant(full_grown, names, interval, chance)
|
||||
|
@ -90,4 +91,5 @@ dofile(minetest.get_modpath("farming").."/potatoes.lua")
|
|||
-- ========= MUSHROOMS =========
|
||||
dofile(minetest.get_modpath("farming").."/mushrooms.lua")
|
||||
|
||||
|
||||
local time_to_load= os.clock() - init
|
||||
print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load))
|
||||
|
|
|
@ -6,7 +6,7 @@ minetest.register_node("farming:soil", {
|
|||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.375, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.4, 0.5},
|
||||
}
|
||||
},
|
||||
groups = {crumbly=3, not_in_creative_inventory=1,soil=2},
|
||||
|
@ -20,7 +20,7 @@ minetest.register_node("farming:soil_wet", {
|
|||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.375, 0.5},
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.4, 0.5},
|
||||
}
|
||||
},
|
||||
groups = {crumbly=3, not_in_creative_inventory=1,soil=3},
|
||||
|
|
|
@ -10,7 +10,8 @@ minetest.register_node("farming:wheat_1", {
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
drawtype = "plantlike",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
drop = "farming:wheat_seed",
|
||||
tiles = {"farming_wheat_1.png"},
|
||||
selection_box = {
|
||||
|
@ -20,13 +21,23 @@ minetest.register_node("farming:wheat_1", {
|
|||
},
|
||||
},
|
||||
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
|
||||
{0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
|
||||
{-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
|
||||
{-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("farming:wheat_2", {
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
drawtype = "plantlike",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
drop = "farming:wheat_seed",
|
||||
tiles = {"farming_wheat_2.png"},
|
||||
selection_box = {
|
||||
|
@ -36,13 +47,23 @@ minetest.register_node("farming:wheat_2", {
|
|||
},
|
||||
},
|
||||
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
|
||||
{0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
|
||||
{-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
|
||||
{-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("farming:wheat_3", {
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
drawtype = "plantlike",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
drop = "farming:wheat_seed",
|
||||
tiles = {"farming_wheat_3.png"},
|
||||
selection_box = {
|
||||
|
@ -52,13 +73,23 @@ minetest.register_node("farming:wheat_3", {
|
|||
},
|
||||
},
|
||||
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
|
||||
{0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
|
||||
{-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
|
||||
{-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("farming:wheat", {
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
drawtype = "plantlike",
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
tiles = {"farming_wheat.png"},
|
||||
drop = {
|
||||
max_items = 4,
|
||||
|
@ -69,7 +100,22 @@ minetest.register_node("farming:wheat", {
|
|||
{ items = {'farming:wheat_harvested'} }
|
||||
}
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.35, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
|
||||
{0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
|
||||
{-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
|
||||
{-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
farming:add_plant("farming:wheat", {"farming:wheat_1", "farming:wheat_2", "farming:wheat_3"}, 50, 20)
|
||||
|
|
Loading…
Reference in a new issue