small corrections

master
A. Demant 2018-10-18 21:29:11 +02:00
parent 18e69c00b5
commit 8b4c1a6a95
3 changed files with 13 additions and 11 deletions

View File

@ -82,7 +82,7 @@ local crop_cols={
"seed_grindable","for_flour","for_coffee"}} "seed_grindable","for_flour","for_coffee"}}
local crop_definition = farming.import_csv(farming.path.."/crops.txt",crop_cols) local crop_definition = farming.import_csv(farming.path.."/crops.txt",crop_cols)
print(dump(crop_definition)) --print(dump(crop_definition))
-- for the default entry is checked, which numeric values are filled -- for the default entry is checked, which numeric values are filled
-- this values are copied into void fields of the crops -- this values are copied into void fields of the crops

View File

@ -26,5 +26,5 @@ tobaco,1,,10,8,2,,,,1,1,1,,2,,,,,,4,,,3,,,,,,,,,,,,,,,,,
tomato,,,10,8,2,1,,,1,1,1,1,,,,,1,,,,,3,,,,,,,,,,,,,,,,, tomato,,,10,8,2,1,,,1,1,1,1,,,,,1,,,,,3,,,,,,,,,,,,,,,,,
nettle,1,,10,5,2,1,,,1,,,,1,,,1,,,2,,,3,5,150,,100,,2000,6,,,,,8,farming:nettle_fibre,,,, nettle,1,,10,5,2,1,,,1,,,,1,,,1,,,2,,,3,5,150,,100,,2000,6,,,,,8,farming:nettle_fibre,,,,
wheat,1,farming:culturewheat,10,8,2,,,,1,1,,1,,,,1,,1,3,,1,3,,,,,,,,,,,,,farming:straw,10,,farming:flour, wheat,1,farming:culturewheat,10,8,2,,,,1,1,,1,,,,1,,1,3,,1,3,,,,,,,,,,,,,farming:straw,10,,farming:flour,
wildhop,1,hop,10,6,2,,,,,,,,,,1,,,,4,,,3,,,,,,,,,,,,,,5,,, wildhop,1,hop,10,6,2,,,,,,,,,,1,,1,,4,,,3,,,,,,,,,,,,,,5,,,
wildgrapes,1,,10,4,2,1,,,,,,,,,1,,,,,,,3,,,,,,,,,,,,,,5,,, wildgrapes,1,,10,4,2,1,,,,,,,,,1,,1,,,,,3,,,,,,,,,,,,,,5,,,

View File

@ -92,7 +92,9 @@ farming.register_plant = function(def)
farming.seed_craft(def) farming.seed_craft(def)
end end
if def.groups["use_trellis"] then if def.groups["use_trellis"] then
farming.trellis_seed(def.step_name,def.drop_seed_name or def.seed_name) print(dump(def))
-- print(dump(def))
farming.trellis_seed(def)
end end
if def.groups["seed_grindable"] then if def.groups["seed_grindable"] then
farming.register_grind(def) farming.register_grind(def)
@ -193,7 +195,7 @@ end
farming.register_seed=function(sdef) farming.register_seed=function(sdef)
print(sdef.name:gsub("^%l", string.upper)) -- print(sdef.name:gsub("^%l", string.upper))
local seed_def = { local seed_def = {
description=S(sdef.name:gsub("^%l", string.upper).." Seed"), description=S(sdef.name:gsub("^%l", string.upper).." Seed"),
drawtype = "signlike", drawtype = "signlike",
@ -214,7 +216,7 @@ farming.register_seed=function(sdef)
on_place = farming.seed_on_place, on_place = farming.seed_on_place,
on_timer = farming.seed_on_timer, on_timer = farming.seed_on_timer,
} }
print(seed_def.description) -- print(seed_def.description)
for i,colu in ipairs({"place_param2","fertility","plant_name","seed_name","grow_time_min","grow_time_max","light_min"}) do for i,colu in ipairs({"place_param2","fertility","plant_name","seed_name","grow_time_min","grow_time_max","light_min"}) do
seed_def[colu] = sdef[colu] seed_def[colu] = sdef[colu]
end end
@ -343,7 +345,7 @@ farming.register_steps = function(sdef)
end end
if i == sdef.steps and is_punchable and i > 1 then if i == sdef.steps and is_punchable and i > 1 then
ndef.pre_step = sdef.step_name .. "_" .. (i - 1) ndef.pre_step = sdef.step_name .. "_" .. (i - 1)
print(ndef.pre_step) -- print(ndef.pre_step)
ndef.on_punch = farming.step_on_punch ndef.on_punch = farming.step_on_punch
end end
-- print(dump(ndef)) -- print(dump(ndef))
@ -863,7 +865,7 @@ farming.trellis_seed = function(gdef)
type = "shapeless", type = "shapeless",
output = gdef.seed_name.." 1", output = gdef.seed_name.." 1",
recipe = { recipe = {
farming.modname..":trellis",seed_name farming.modname..":trellis",gdef.seed_name
}, },
}) })
end end
@ -924,8 +926,8 @@ function farming.register_roast(rdef)
if rdef.eat_hp then if rdef.eat_hp then
roast_def.on_use=minetest.item_eat(rdef.eat_hp*2) roast_def.on_use=minetest.item_eat(rdef.eat_hp*2)
end end
print(roastitem) -- print(roastitem)
print(dump(roast_def)) -- print(dump(roast_def))
minetest.register_craftitem(":" .. roastitem, roast_def) minetest.register_craftitem(":" .. roastitem, roast_def)
@ -952,7 +954,7 @@ function farming.register_grind(rdef)
if rdef.grind then if rdef.grind then
grinditem = rdef.grind grinditem = rdef.grind
end end
print(grinditem) -- print(grinditem)
local desc = grinditem:split(":")[2] local desc = grinditem:split(":")[2]
desc = desc:gsub("_"," ") desc = desc:gsub("_"," ")
local mname = minetest.get_current_modname() local mname = minetest.get_current_modname()