crops.csv->crops.txt; wine drop wildwine_berries, which are crafted towards wine_seed with a trellis
parent
63c3f5e8a1
commit
985fd9c527
|
@ -2,14 +2,14 @@ local S = farming.intllib
|
|||
local modname=minetest.get_current_modname()
|
||||
|
||||
-- generate "seed" out of harvest and trellis
|
||||
farming.trellis_seed = function(grain_name)
|
||||
farming.trellis_seed = function(grain_name,seed_name)
|
||||
local mname = grain_name:split(":")[1]
|
||||
local pname = grain_name:split(":")[2]
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = mname..":seed_"..pname.." 1",
|
||||
recipe = {
|
||||
modname..":trellis",grain_name
|
||||
modname..":trellis",seed_name
|
||||
},
|
||||
})
|
||||
end
|
||||
|
|
31
crops.csv
31
crops.csv
|
@ -1,31 +0,0 @@
|
|||
name,enabled,next_plant,rarety,steps,harvest_max,eat_hp,to_culture,to_dig,has_harvest,on_soil,punchable,infectable,infection_defence,seed_extractable,no_seed,use_flail,use_trellis,for_coffee,snappy,temperature_min,temperature_max,humidity_min,humidity_max,elevation_min,elevation_max,light_min,light_max,infect_rate_base,infect_rate_monoculture,spread_rate,grow_time_mean,straw,culture_rate
|
||||
default,1,,10,8,2,1,,,,,,,,,,,,,3,15,80,10,80,0,200,11,14,1E-05,0.001,0.001,12,,
|
||||
barley,1,,10,7,2,,,,1,1,,1,,,,1,,1,3,25,,30,,,,,,,,,,farming:straw,
|
||||
beetroot,1,,10,5,2,2,,1,,1,,,,,,,,,3,35,,30,,,,9,,,,,,,
|
||||
blackberry,1,,10,4,2,1,,,,,1,,,,,,,,3,,90,20,,,,9,,,,,,,
|
||||
blueberry,1,,10,4,2,1,,,,,1,,,,,,,,3,45,90,40,90,,,9,,,,,,,
|
||||
carrot,1,,10,8,2,2,,1,,1,,,,,,,,,3,45,,30,90,,,8,,,,,,,
|
||||
chili,1,,20,8,2,1,,,,,1,,,,,,,,3,45,90,,,50,1000,,,,,,,,
|
||||
coffee,1,,20,5,2,1,,,,,1,,,,,,,1,3,50,120,50,150,50,1000,12,,,,,,,
|
||||
cocoa,1,,20,4,2,1,,,,,1,,,,,,,1,3,50,120,40,150,50,1000,12,,,,,,,
|
||||
corn,1,,10,8,2,2,,,,1,,1,,,,,,,3,35,90,30,,,,,,,,,,,
|
||||
cotton,1,,10,8,2,,,,1,1,,1,,,,1,,,3,45,90,20,,,,12,,,,,,,
|
||||
culturewheat,1,,100,4,2,,1,,1,1,,1,,,,1,,1,3,25,,40,,,,10,,,,,100,farming:straw,
|
||||
flax,,,10,7,2,,,,1,1,,1,,,,1,,,3,25,,30,,,,,,,,,,farming:flaw,
|
||||
garlic,,,10,5,2,1,,1,,1,,,,,,,,,3,,,,,,,,,,,,,,
|
||||
grapes,1,,10,8,2,2,1,,,1,1,1,,,,,1,,3,,,,,,,,,,,,,,
|
||||
hemp,1,,10,8,2,,,,1,,,,,,,1,,,3,,120,,,,,6,,,,1E-05,9,farming:hemp_fibre,
|
||||
hop,1,,10,7,2,1,1,,,1,1,1,,,,,1,,3,,,,,,,,,,,,,,
|
||||
mustard,1,,10,5,2,,,,,,,1,,,,,,,3,,,,,,,,,,,,,,
|
||||
potato,1,,10,4,2,2,,,,1,,1,,,,,,,3,,,,,,,,,,,,,,
|
||||
raspberry,1,,10,4,2,1,,,,,1,,,,,,,,3,,,,,,,9,,,,,,,
|
||||
rhubarb,1,,10,3,2,2,,1,,1,,,,,,,,,3,,,,,,,9,,,,,,,
|
||||
spelt,1,,10,7,2,,,,1,1,,1,,,,1,,,3,,,,,,,,,,,,,farming:straw,
|
||||
strawberry,1,,10,4,2,1,,,,,1,,,,,,,,3,,,,,,,9,,,,,,,
|
||||
tea,,,20,5,2,1,,,,,1,,,1,,,,,3,30,70,30,70,50,,,,,,,,,
|
||||
tobaco,1,,10,8,2,,,,1,1,1,,2,,,,,,3,,,,,,,,,,,,,,
|
||||
tomato,1,,10,8,2,1,,,1,1,1,1,,,,,1,,3,,,,,,,,,,,,,,
|
||||
nettle,1,,10,5,2,1,,,1,,,,1,,,1,,,3,5,150,,100,,2000,6,,,,,8,farming:urtica_fibre,
|
||||
wheat,1,culturewheat,10,8,2,,,,1,1,,1,,,,1,,1,3,,,,,,,,,,,,,farming:straw,10
|
||||
wildhop,1,hop,10,6,2,,,,,,,,,,1,,,,3,,,,,,,,,,,,,,5
|
||||
wildgrapes,1,grapes,10,4,2,1,,,,,,,,,1,,,,3,,,,,,,,,,,,,,5
|
|
|
@ -55,6 +55,9 @@ Actual columns:
|
|||
grow_time_mean mean grow time to next step
|
||||
straw text extension for using flail: item name of fibre to craft out of harvest beside seeds
|
||||
culture_rate rate to get cultured variant out of wild form.
|
||||
seed_drop name of seed you get from plant: grapes drops seed which normally lead to wild wine.
|
||||
Only with a trellis you get cultured whine with higher harvest.
|
||||
With normal grapes and a trellis you get the "seed" for cultured wine.
|
||||
]]
|
||||
|
||||
local S = farming.intllib
|
||||
|
@ -80,7 +83,7 @@ local crop_groups =
|
|||
"seed_extractable","use_flail","use_trellis","snappy","infection_defence"}
|
||||
|
||||
-- import configurations from crops.csv
|
||||
local file = io.open(farming.path .. "/crops.csv", "r")
|
||||
local file = io.open(farming.path .. "/crops.txt", "r")
|
||||
-- reading header with column names
|
||||
local header = file:read():split(",",true)
|
||||
-- read each line, split in separat fields and stores in array
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
name,enabled,next_plant,rarety,steps,harvest_max,eat_hp,to_culture,to_dig,has_harvest,on_soil,punchable,infectable,infection_defence,seed_extractable,no_seed,use_flail,use_trellis,for_coffee,snappy,temperature_min,temperature_max,humidity_min,humidity_max,elevation_min,elevation_max,light_min,light_max,infect_rate_base,infect_rate_monoculture,spread_rate,grow_time_mean,straw,culture_rate,seed_drop
|
||||
default,1,,10,8,2,1,,,,,,,,,,,,,3,15,80,10,80,0,200,11,14,1E-05,0.001,0.001,12,,,
|
||||
barley,1,,10,7,2,,,,1,1,,1,,,,1,,1,3,25,,30,,,,,,,,,,farming:straw,,
|
||||
beetroot,1,,10,5,2,2,,1,,1,,,,,,,,,3,35,,30,,,,9,,,,,,,,
|
||||
blackberry,1,,10,4,2,1,,,,,1,,,,,,,,3,,90,20,,,,9,,,,,,,,
|
||||
blueberry,1,,10,4,2,1,,,,,1,,,,,,,,3,45,90,40,90,,,9,,,,,,,,
|
||||
carrot,1,,10,8,2,2,,1,,1,,,,,,,,,3,45,,30,90,,,8,,,,,,,,
|
||||
chili,1,,20,8,2,1,,,,,1,,,,,,,,3,45,90,,,50,1000,,,,,,,,,
|
||||
coffee,1,,20,5,2,1,,,,,1,,,,,,,1,3,50,120,50,150,50,1000,12,,,,,,,,
|
||||
cocoa,1,,20,4,2,1,,,,,1,,,,,,,1,3,50,120,40,150,50,1000,12,,,,,,,,
|
||||
corn,1,,10,8,2,2,,,,1,,1,,,,,,,3,35,90,30,,,,,,,,,,,,
|
||||
cotton,1,,10,8,2,,,,1,1,,1,,,,1,,,3,45,90,20,,,,12,,,,,,,,
|
||||
culturewheat,1,,100,4,3,,1,,1,1,,1,,,,1,,1,3,25,,40,,,,10,,,,,100,farming:straw,,
|
||||
flax,,,10,7,2,,,,1,1,,1,,,,1,,,3,25,,30,,,,,,,,,,farming:flaw,,
|
||||
garlic,,,10,5,2,1,,1,,1,,,,,,,,,3,,,,,,,,,,,,,,,
|
||||
grapes,1,,10,8,3,2,1,,,1,1,1,,,,,1,,3,,,,,,,,,,,,,,,wildgrapes
|
||||
hemp,1,,10,8,2,,,,1,,,,,,,1,,,3,,120,,,,,6,,,,1E-05,9,farming:hemp_fibre,,
|
||||
hop,1,,10,7,3,1,1,,,1,1,1,,,,,1,,3,,,,,,,,,,,,,,,wildhop
|
||||
mustard,1,,10,5,2,,,,,,,1,,,,,,,3,,,,,,,,,,,,,,,
|
||||
potato,1,,10,4,2,2,,,,1,,1,,,,,,,3,,,,,,,,,,,,,,,
|
||||
raspberry,1,,10,4,2,1,,,,,1,,,,,,,,3,,,,,,,9,,,,,,,,
|
||||
rhubarb,1,,10,3,2,2,,1,,1,,,,,,,,,3,,,,,,,9,,,,,,,,
|
||||
spelt,1,,10,7,2,,,,1,1,,1,,,,1,,,3,,,,,,,,,,,,,farming:straw,,
|
||||
strawberry,1,,10,4,2,1,,,,,1,,,,,,,,3,,,,,,,9,,,,,,,,
|
||||
tea,,,20,5,2,1,,,,,1,,,1,,,,,3,30,70,30,70,50,,,,,,,,,,
|
||||
tobaco,1,,10,8,2,,,,1,1,1,,2,,,,,,3,,,,,,,,,,,,,,,
|
||||
tomato,,,10,8,2,1,,,1,1,1,1,,,,,1,,3,,,,,,,,,,,,,,,
|
||||
nettle,1,,10,5,2,1,,,1,,,,1,,,1,,,3,5,150,,100,,2000,6,,,,,8,farming:urtica_fibre,,
|
||||
wheat,1,culturewheat,10,8,2,,,,1,1,,1,,,,1,,1,3,,,,,,,,,,,,,farming:straw,10,
|
||||
wildhop,1,hop,10,6,2,,,,,,,,,,1,,,,3,,,,,,,,,,,,,,5,
|
||||
wildgrapes,1,grapes,10,4,2,1,,,,,,,,,1,,,,3,,,,,,,,,,,,,,5,
|
11
register.lua
11
register.lua
|
@ -38,6 +38,9 @@ farming.register_plant = function(def)
|
|||
-- local definitions
|
||||
def.step_name=def.mod_name..":"..def.name
|
||||
def.seed_name=def.mod_name..":seed_"..def.name
|
||||
if def.seed_drop ~= nil then
|
||||
def.drop_seed_name = def.mod_name..":seed_"..def.seed_drop
|
||||
end
|
||||
def.plant_name = def.name
|
||||
-- if plant has harvest then registering
|
||||
if def.groups["has_harvest"] ~= nil then
|
||||
|
@ -74,7 +77,7 @@ farming.register_plant = function(def)
|
|||
farming.seed_craft(def.step_name,straw_name)
|
||||
end
|
||||
if def.groups["use_trellis"] then
|
||||
farming.trellis_seed(def.step_name)
|
||||
farming.trellis_seed(def.step_name,def.drop_seed_name or def.seed_name)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -256,7 +259,11 @@ farming.register_steps = function(sdef)
|
|||
node_def.drop_item = sdef.seed_name
|
||||
-- if plant has to be harvested, drop harvest instead
|
||||
if has_harvest then
|
||||
node_def.drop_item = sdef.step_name
|
||||
node_def.drop_item = sdef.step_name
|
||||
else
|
||||
if sdef.drop_seed_name ~= nil then
|
||||
node_def.drop_item = sdef.drop_seed_name
|
||||
end
|
||||
end
|
||||
local lbm_nodes = {sdef.seed_name}
|
||||
for i=1,sdef.steps do
|
||||
|
|
Loading…
Reference in New Issue