strawberry grows now.

master
ademant 2018-10-01 20:01:18 +02:00
parent 320c33f231
commit 99ebe8350a
4 changed files with 14 additions and 19 deletions

View File

@ -259,7 +259,6 @@ farming.register_plant = function(name, def)
place_param2 = def.place_param2 or nil,
walkable = false,
buildable_to = true,
-- drop = drop,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
@ -335,11 +334,13 @@ farming.register_plant = function(name, def)
-- print("spawn "..dump(def.spawnon))
-- print("scale "..def.spawnon.scale)
if def.groups.no_spawn == nil then
-- print("spawn "..dump(def.spawnon))
for j,onpl in ipairs(def.spawnon.spawnon) do
print("spawn "..dump(def.spawnon))
print(dump(farming.get_biomes(def)))
-- for j,onpl in ipairs(def.spawnon.spawnon) do
local deco_def={
deco_type = "simple",
place_on = onpl,
-- place_on = onpl,
place_on = def.spawnon.spawnon,
sidelen = 16,
noise_params = {
offset = def.spawnon.offset,
@ -351,13 +352,13 @@ farming.register_plant = function(name, def)
},
y_min = def.spawnon.spawn_min,
y_max = def.spawnon.spawn_max,
decoration = def.wildname or harvest_name.."_1",
decoration = def.wildname or harvest_name.."_"..def.steps,
spawn_by = def.spawnon.spawnby,
num_spawn_by = def.spawnon.spawn_num,
biomes = farming.get_biomes(def)
-- biomes = farming.get_biomes(def)
}
minetest.register_decoration(deco_def)
end
-- end
end
-- Return
local r = {

View File

@ -5,7 +5,7 @@
world folder for map specific settings.
--]]
farming.crops = {"wheat","cotton","strawberry","potato"}
farming.crops = {"wheat","cotton","strawberry"}
for i,crop in ipairs(farming.crops) do
print(crop.." - "..farming.config:get_string(crop))

View File

@ -9,7 +9,7 @@ for name,def in pairs(minetest.registered_biomes) do
end
local sdef={
paramtype2 = "meshoptions",
steps = 8, -- steps till full-grown plant
steps = 4, -- steps till full-grown plant
mean_grow_time=20, -- mean time till next step
range_grow_time=3, -- plus/minus for random generator
max_harvest=2, -- max amount of harvesting item for full grown plant
@ -17,7 +17,7 @@ local sdef={
minlight = 13,
maxlight = default.LIGHT_MAX,
fertility = {"grassland"},
groups = {food=1,grain = 1, flammable = 4},
groups = {food=1,grain = 1, flammable = 4,no_seed=1 ,punchable = 1},
place_param2 = 3,
min_temp=10,
max_temp=50,

View File

@ -36,27 +36,21 @@ farming.register_plant("farming:wheat", w1def)
local wdef={
paramtype2 = "meshoptions",
steps = 8, -- steps till full-grown plant
steps = 4, -- steps till full-grown plant
mean_grow_time=20, -- mean time till next step
range_grow_time=3, -- plus/minus for random generator
max_harvest=2, -- max amount of harvesting item for full grown plant
max_harvest=4, -- max amount of harvesting item for full grown plant
-- eat_hp=1, -- set in config for eatable plants
minlight = 13,
minlight = 11,
maxlight = default.LIGHT_MAX,
fertility = {"grassland"},
groups = {food_wheat=1,no_spawn=1,grain = 1, flammable = 4},
place_param2 = 3,
min_temp=10,
max_temp=50,
min_humidity=10,
max_humidity=70,
description = S("Culture Wheat Seed"),
inventory_image = "farming_culturewheat_seed.png",
eat_hp=1,
steps=4,
eat_hp=1,
max_harvest=4,
min_light=11,
mean_grow_time=20,
range_grow_time=5,
}