error correction; renaming urtica -> nettle

master
A. Demant 2018-10-11 20:09:22 +02:00
parent 87c22728dd
commit 935f23824c
13 changed files with 67 additions and 48 deletions

View File

@ -1,31 +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,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,50,10,50,0,31000,11,14,1E-05,0.001,0.001,120,,
barley,1,,10,7,2,,,,1,1,,1,,,1,,1,3,25,80,30,80,0,100,11,14,1E-05,0.001,0.001,120,farming:straw,
beetroot,1,,10,5,2,2,,1,,1,,,,,,,,3,35,80,30,80,0,100,9,14,1E-05,0.001,0.001,120,,
blackberry,1,,10,4,2,1,,,,,1,,,,,,,3,15,90,20,80,0,100,9,14,1E-05,0.001,0.001,120,,
blueberry,1,,10,4,2,1,,,,,1,,,,,,,3,45,90,40,90,0,100,9,14,1E-05,0.001,0.001,120,,
carrot,1,,10,8,2,2,,1,,1,,,,,,,,3,45,80,30,90,0,100,8,14,1E-05,0.001,0.001,120,,
chili,1,,20,8,2,1,,,,,1,,,,,,,3,45,90,10,50,50,1000,11,14,1E-05,0.001,0.001,120,,
coffee,1,,20,5,2,1,,,,,1,,,,,,1,3,50,120,50,150,50,1000,12,14,1E-05,0.001,0.001,120,,
cocoa,1,,20,4,2,1,,,,,1,,,,,,1,3,50,120,40,150,50,1000,12,14,1E-05,0.001,0.001,120,,
corn,1,,10,8,2,2,,,,1,,1,,,,,,3,35,90,30,80,0,100,11,14,1E-05,0.001,0.001,120,,
cotton,1,,10,8,2,,,,1,1,,1,,,1,,,3,45,90,20,60,0,100,12,14,1E-05,0.001,0.001,120,,
culturewheat,1,,100,4,2,,1,,1,1,,1,,,1,,1,3,25,80,40,80,0,100,10,14,1E-05,0.001,0.001,100,farming:straw,
flax,,,10,7,2,,,,1,1,,1,,,1,,,3,25,80,30,80,0,100,11,14,1E-05,0.001,0.001,120,farming:flaw,
garlic,,,10,5,2,1,,1,,1,,,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
grapes,1,,10,8,2,2,1,,,1,1,1,,,,1,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
hemp,1,,10,8,2,,,,1,,,,,,1,,,3,15,120,10,,0,,6,14,1E-05,0.001,1E-05,90,farming:hemp_fibre,
hop,1,,10,7,2,1,1,,,1,1,1,,,,1,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
mustard,1,,10,5,2,,,,,,,1,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
potato,1,,10,4,2,2,,,,1,,1,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
raspberry,1,,10,4,2,1,,,,,1,,,,,,,3,15,50,10,50,0,100,9,14,1E-05,0.001,0.001,120,,
rhubarb,1,,10,3,2,2,,1,,1,,,,,,,,3,15,50,10,50,0,100,9,14,1E-05,0.001,0.001,120,,
spelt,1,,10,7,2,,,,1,1,,1,,,1,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,farming:straw,
strawberry,1,,10,4,2,1,,,,,1,,,,,,,3,15,50,10,50,0,100,9,14,1E-05,0.001,0.001,120,,
tea,,,20,5,2,1,,,,,1,,,1,,,,3,30,70,30,70,50,100,11,14,1E-05,0.001,0.001,120,,
tobaco,1,,10,8,2,,,,1,1,1,,2,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
tomato,1,,10,8,2,1,,,1,1,1,1,,,,1,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
urtica,1,,10,5,2,1,,,1,,,,1,,1,,,3,5,150,10,100,0,2000,6,14,1E-05,0.001,0.001,80,farming:urtica_fibre,
wheat,1,culturewheat,10,8,2,,,,1,1,,1,,,1,,1,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,farming:straw,10
wildhop,1,hop,10,6,2,,,,,,,,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,5
wildgrapes,1,grapes,10,4,2,1,,,,,,,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,5
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,50,10,50,0,31000,11,14,1E-05,0.001,0.001,120,,
barley,1,,10,7,2,,,,1,1,,1,,,,1,,1,3,25,80,30,80,0,100,11,14,1E-05,0.001,0.001,120,farming:straw,
beetroot,1,,10,5,2,2,,1,,1,,,,,,,,,3,35,80,30,80,0,100,9,14,1E-05,0.001,0.001,120,,
blackberry,1,,10,4,2,1,,,,,1,,,,,,,,3,15,90,20,80,0,100,9,14,1E-05,0.001,0.001,120,,
blueberry,1,,10,4,2,1,,,,,1,,,,,,,,3,45,90,40,90,0,100,9,14,1E-05,0.001,0.001,120,,
carrot,1,,10,8,2,2,,1,,1,,,,,,,,,3,45,80,30,90,0,100,8,14,1E-05,0.001,0.001,120,,
chili,1,,20,8,2,1,,,,,1,,,,,,,,3,45,90,10,50,50,1000,11,14,1E-05,0.001,0.001,120,,
coffee,1,,20,5,2,1,,,,,1,,,,,,,1,3,50,120,50,150,50,1000,12,14,1E-05,0.001,0.001,120,,
cocoa,1,,20,4,2,1,,,,,1,,,,,,,1,3,50,120,40,150,50,1000,12,14,1E-05,0.001,0.001,120,,
corn,1,,10,8,2,2,,,,1,,1,,,,,,,3,35,90,30,80,0,100,11,14,1E-05,0.001,0.001,120,,
cotton,1,,10,8,2,,,,1,1,,1,,,,1,,,3,45,90,20,60,0,100,12,14,1E-05,0.001,0.001,120,,
culturewheat,1,,100,4,2,,1,,1,1,,1,,,,1,,1,3,25,80,40,80,0,100,10,14,1E-05,0.001,0.001,100,farming:straw,
flax,,,10,7,2,,,,1,1,,1,,,,1,,,3,25,80,30,80,0,100,11,14,1E-05,0.001,0.001,120,farming:flaw,
garlic,,,10,5,2,1,,1,,1,,,,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
grapes,1,,10,8,2,2,1,,,1,1,1,,,,,1,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
hemp,1,,10,8,2,,,,1,,,,,,,1,,,3,15,120,10,,0,,6,14,1E-05,0.001,1E-05,90,farming:hemp_fibre,
hop,1,,10,7,2,1,1,,,1,1,1,,,,,1,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
mustard,1,,10,5,2,,,,,,,1,,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
potato,1,,10,4,2,2,,,,1,,1,,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
raspberry,1,,10,4,2,1,,,,,1,,,,,,,,3,15,50,10,50,0,100,9,14,1E-05,0.001,0.001,120,,
rhubarb,1,,10,3,2,2,,1,,1,,,,,,,,,3,15,50,10,50,0,100,9,14,1E-05,0.001,0.001,120,,
spelt,1,,10,7,2,,,,1,1,,1,,,,1,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,farming:straw,
strawberry,1,,10,4,2,1,,,,,1,,,,,,,,3,15,50,10,50,0,100,9,14,1E-05,0.001,0.001,120,,
tea,,,20,5,2,1,,,,,1,,,1,,,,,3,30,70,30,70,50,100,11,14,1E-05,0.001,0.001,120,,
tobaco,1,,10,8,2,,,,1,1,1,,2,,,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
tomato,1,,10,8,2,1,,,1,1,1,1,,,,,1,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,
nettle,1,,10,5,2,1,,,1,,,,1,,,1,,,3,5,150,10,100,0,2000,6,14,1E-05,0.001,0.001,80,farming:urtica_fibre,
wheat,1,culturewheat,10,8,2,,,,1,1,,1,,,,1,,1,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,farming:straw,10
wildhop,1,hop,10,6,2,,,,,,,,,,1,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,5
wildgrapes,1,grapes,10,4,2,1,,,,,,,,,1,,,,3,15,50,10,50,0,100,11,14,1E-05,0.001,0.001,120,,5

1 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
2 default 1 10 8 2 1 3 15 50 10 50 0 31000 11 14 1E-05 0.001 0.001 120
3 barley 1 10 7 2 1 1 1 1 1 3 25 80 30 80 0 100 11 14 1E-05 0.001 0.001 120 farming:straw
4 beetroot 1 10 5 2 2 1 1 3 35 80 30 80 0 100 9 14 1E-05 0.001 0.001 120
5 blackberry 1 10 4 2 1 1 3 15 90 20 80 0 100 9 14 1E-05 0.001 0.001 120
6 blueberry 1 10 4 2 1 1 3 45 90 40 90 0 100 9 14 1E-05 0.001 0.001 120
7 carrot 1 10 8 2 2 1 1 3 45 80 30 90 0 100 8 14 1E-05 0.001 0.001 120
8 chili 1 20 8 2 1 1 3 45 90 10 50 50 1000 11 14 1E-05 0.001 0.001 120
9 coffee 1 20 5 2 1 1 1 3 50 120 50 150 50 1000 12 14 1E-05 0.001 0.001 120
10 cocoa 1 20 4 2 1 1 1 3 50 120 40 150 50 1000 12 14 1E-05 0.001 0.001 120
11 corn 1 10 8 2 2 1 1 3 35 90 30 80 0 100 11 14 1E-05 0.001 0.001 120
12 cotton 1 10 8 2 1 1 1 1 3 45 90 20 60 0 100 12 14 1E-05 0.001 0.001 120
13 culturewheat 1 100 4 2 1 1 1 1 1 1 3 25 80 40 80 0 100 10 14 1E-05 0.001 0.001 100 farming:straw
14 flax 10 7 2 1 1 1 1 3 25 80 30 80 0 100 11 14 1E-05 0.001 0.001 120 farming:flaw
15 garlic 10 5 2 1 1 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120
16 grapes 1 10 8 2 2 1 1 1 1 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120
17 hemp 1 10 8 2 1 1 3 15 120 10 0 6 14 1E-05 0.001 1E-05 90 farming:hemp_fibre
18 hop 1 10 7 2 1 1 1 1 1 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120
19 mustard 1 10 5 2 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120
20 potato 1 10 4 2 2 1 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120
21 raspberry 1 10 4 2 1 1 3 15 50 10 50 0 100 9 14 1E-05 0.001 0.001 120
22 rhubarb 1 10 3 2 2 1 1 3 15 50 10 50 0 100 9 14 1E-05 0.001 0.001 120
23 spelt 1 10 7 2 1 1 1 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120 farming:straw
24 strawberry 1 10 4 2 1 1 3 15 50 10 50 0 100 9 14 1E-05 0.001 0.001 120
25 tea 20 5 2 1 1 1 3 30 70 30 70 50 100 11 14 1E-05 0.001 0.001 120
26 tobaco 1 10 8 2 1 1 1 2 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120
27 tomato 1 10 8 2 1 1 1 1 1 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120
28 urtica nettle 1 10 5 2 1 1 1 1 3 5 150 10 100 0 2000 6 14 1E-05 0.001 0.001 80 farming:urtica_fibre
29 wheat 1 culturewheat 10 8 2 1 1 1 1 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120 farming:straw 10
30 wildhop 1 hop 10 6 2 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120 5
31 wildgrapes 1 grapes 10 4 2 1 1 3 15 50 10 50 0 100 11 14 1E-05 0.001 0.001 120 5

View File

@ -1,3 +1,5 @@
local S = farming.intllib
local add_soil = function(item,soil)
minetest.override_item(item,{
soil = {
@ -79,12 +81,26 @@ minetest.register_node("farming:desert_sand_soil_wet", {
})
minetest.register_node("farming:straw", {
description = "Straw",
description = S("Straw"),
tiles = {"farming_straw.png"},
is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("farming:hemp_fibre", {
description = S("Hemp Fibre"),
tiles = {"farming_hemp_fibre.png"},
is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("farming:nettle_fibre", {
description = ("Nettle Fibre"),
tiles = {"farming_urtica_fibre.png"},
is_ground_content = false,
groups = {snappy=3, flammable=4, fall_damage_add_percent=-30},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_abm({
label = "Farming soil",

View File

@ -170,6 +170,7 @@ end
farming.register_seed=function(sdef)
local seed_def = {
description=S(sdef.name:gsub("^%l", string.upper).." Seed"),
drawtype = "signlike",
paramtype = "light",
paramtype2 = "wallmounted",
@ -249,20 +250,20 @@ farming.register_steps = function(sdef)
end
end
-- define drop item: normal drop the seed
local drop_item = sdef.seed_name
node_def.drop_item = sdef.seed_name
-- if plant has to be harvested, drop harvest instead
if has_harvest then
drop_item = sdef.step_name
node_def.drop_item = sdef.step_name
end
local lbm_nodes = {sdef.seed_name}
for i=1,sdef.steps do
local ndef={}
for _,colu in ipairs({"sounds","selection_box","drawtype","waving","paramtype","paramtype2","place_param2","grow_time_min","grow_time_max","light_min",
"walkable","buildable_to","plant_name"}) do
"walkable","buildable_to","plant_name","drop_item"}) do
ndef[colu]=node_def[colu]
end
ndef.groups = {snappy = 3, flammable = 2,flora=1, plant = 1, not_in_creative_inventory = 1, attached_node = 1}
for _,colu in ipairs({"infectable","snappy","seed_extractable"}) do
for _,colu in ipairs({"infectable","snappy","seed_extractable","punchable"}) do
if sdef.groups[colu] then
ndef.groups[colu] = sdef.groups[colu]
end
@ -283,7 +284,7 @@ farming.register_steps = function(sdef)
if sdef.steps ~= 1 then
base_rarity = 8 - (i - 1) * 7 / (sdef.steps - 1)
end
ndef.drop={items={{items={drop_item}}}}
ndef.drop={items={{items={ndef.drop_item}}}}
if use_trellis then
table.insert(ndef.drop.items,1,{items={"farming:trellis"}})
end
@ -296,7 +297,7 @@ farming.register_steps = function(sdef)
local step_harvest = math.floor(i*sdef.harvest_max/sdef.steps + 0.05)
if step_harvest > 1 then
for h = 2,step_harvest do
table.insert(ndef.drop.items,1,{items={drop_item},rarity=base_rarity*h})
table.insert(ndef.drop.items,1,{items={ndef.drop_item},rarity=base_rarity*h})
end
end
if i == sdef.steps then
@ -309,6 +310,7 @@ farming.register_steps = function(sdef)
end
if i == sdef.steps and is_punchable and i > 1 then
ndef.pre_step = sdef.step_name .. "_" .. (i - 1)
print(ndef.pre_step)
ndef.on_punch = farming.step_on_punch
end
-- print(dump(ndef))
@ -539,6 +541,8 @@ farming.step_on_punch = function(pos, node, puncher, pointed_thing)
local node = minetest.get_node(pos)
local name = node.name
local def = minetest.registered_nodes[name]
print(name)
print(dump(def))
-- grow
if def.groups.punchable == nil then
return
@ -557,7 +561,7 @@ farming.step_on_punch = function(pos, node, puncher, pointed_thing)
local tool_def = puncher:get_wielded_item():get_definition()
-- print(tool_def.max_uses)
if tool_def.groups["billhook"] then
puncher:get_inventory():add_item('main',def.seed_name)
puncher:get_inventory():add_item('main',def.drop_item)
end
-- new timer needed?
local pre_def=minetest.registered_nodes[pre_node]
@ -571,13 +575,12 @@ end
farming.harvest_on_dig = function(pos, node, digger)
local node = minetest.get_node(pos)
local name = node.name
local def = minetest.registered_nodes[name]
local def = minetest.registered_nodes[node.name]
local tool_def = digger:get_wielded_item():get_definition()
if (def.next_plant == nil) and (tool_def.groups["scythe"]) then
digger:get_inventory():add_item('main',def.plant_name)
if (def.next_plant == nil) and (tool_def.groups["scythe"]) and def.drop_item then
digger:get_inventory():add_item('main',def.drop_item)
end
minetest.node_dig(pos,node,digger)
minetest.node_dig(pos,node,digger)
end
farming.step_on_timer = function(pos, elapsed)
@ -698,11 +701,11 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname)
minetest.add_node(pt.above, {name = plantname, param2 = 1})
local wait_min=farming.wait_min or 120
local wait_max=farming.wait_max or 240
if plant_def.grow_time_min then
wait_min=plant_def.grow_time_min
if pdef.grow_time_min then
wait_min=pdef.grow_time_min
end
if plant_def.grow_time_max then
wait_max=plant_def.grow_time_max
if pdef.grow_time_max then
wait_max=pdef.grow_time_max
end
minetest.get_node_timer(pt.above):start(math.random(wait_min, wait_max))
local meta = minetest.get_meta(pt.above)

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

View File

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

View File

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 114 B

View File

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

View File

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

View File

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 192 B

View File

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 192 B

View File

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 144 B

View File

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B