summaryrefslogtreecommitdiff
path: root/farming
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-04-28 21:13:18 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-04-28 21:13:18 -0400
commit9d1d680fee730771dec4739df6e671ac1016ae87 (patch)
treee430759266fa5411f6c333dda5ef57aa7e14be51 /farming
parentd17c01a297b70360cab3cd9379a695cad865c3b9 (diff)
downloaddreambuilder_modpack-9d1d680fee730771dec4739df6e671ac1016ae87.tar
dreambuilder_modpack-9d1d680fee730771dec4739df6e671ac1016ae87.tar.gz
dreambuilder_modpack-9d1d680fee730771dec4739df6e671ac1016ae87.tar.bz2
dreambuilder_modpack-9d1d680fee730771dec4739df6e671ac1016ae87.tar.xz
dreambuilder_modpack-9d1d680fee730771dec4739df6e671ac1016ae87.zip
update basic_materials, farmind-redo, ropes
Diffstat (limited to 'farming')
-rw-r--r--farming/README.md1
-rw-r--r--farming/farming.conf_example53
-rw-r--r--farming/init.lua46
-rw-r--r--farming/mapgen.lua20
4 files changed, 63 insertions, 57 deletions
diff --git a/farming/README.md b/farming/README.md
index 939417d..e0a3333 100644
--- a/farming/README.md
+++ b/farming/README.md
@@ -13,6 +13,7 @@ This mod works by adding your new plant to the {growing=1} group and numbering t
### Changelog:
+- 1.41 - Each crop has it's own spawn rate (can be changed in farming.conf)
- 1.40 - Added Mithril Scythe to quick harvest and replant crops on right-click. Added Hoe's for MoreOres with Toolrank support.
- 1.39 - Added Rice, Rye and Oats thanks to Ademants Grains mod. Added Jaffa Cake and multigrain bread.
- 1.38 - Pumpkin grows into block, use chopping board to cut into 4x slices, same with melon block, 2x2 slices makes a block, cocoa pods are no longer walkable
diff --git a/farming/farming.conf_example b/farming/farming.conf_example
index 9d1769a..d108bb5 100644
--- a/farming/farming.conf_example
+++ b/farming/farming.conf_example
@@ -5,31 +5,32 @@
world folder for map specific settings.
--]]
--- true to enable crop/food in-game and on mapgen
-farming.carrot = true
-farming.potato = true
-farming.tomato = true
-farming.cucumber = true
-farming.corn = true
-farming.coffee = true
-farming.melon = true
-farming.pumpkin = true
-farming.cocoa = true
-farming.raspberry = true
-farming.blueberry = true
-farming.rhubarb = true
-farming.beans = true
-farming.grapes = true
-farming.barley = true
-farming.chili = true
-farming.hemp = true
-farming.onion = true
-farming.garlic = true
-farming.pepper = true
-farming.pineapple = true
-farming.peas = true
-farming.beetroot = true
-farming.grains = true
+-- true to enable crop/food in-game and on mapgen set spawn rarety
+farming.carrot = 0.001
+farming.potato = 0.001
+farming.tomato = 0.001
+farming.cucumber = 0.001
+farming.corn = 0.001
+farming.coffee = 0.001
+farming.melon = 0.001
+farming.pumpkin = 0.001
+farming.cocoa = true -- true or false only
+farming.raspberry = 0.001
+farming.blueberry = 0.001
+farming.rhubarb = 0.001
+farming.beans = 0.001
+farming.grapes = 0.001
+farming.barley = true -- true or false only
+farming.chili = 0.002
+farming.hemp = 0.002
+farming.garlic = 0.001
+farming.onion = 0.001
+farming.pepper = 0.002
+farming.pineapple = 0.001
+farming.peas = 0.001
+farming.beetroot = 0.001
+farming.grains = true -- true or false only
+farming.rarety = 0.002
--- rarety of crops on map, default is 0.001 (higher number = more crops)
+-- default rarety of crops on map (higher number = more crops)
farming.rarety = 0.002
diff --git a/farming/init.lua b/farming/init.lua
index 98479a3..aa7301e 100644
--- a/farming/init.lua
+++ b/farming/init.lua
@@ -7,7 +7,7 @@
farming = {
mod = "redo",
- version = "20190111",
+ version = "20190427",
path = minetest.get_modpath("farming"),
select = {
type = "fixed",
@@ -599,31 +599,31 @@ end
-- default settings
-farming.carrot = true
-farming.potato = true
-farming.tomato = true
-farming.cucumber = true
-farming.corn = true
-farming.coffee = true
-farming.melon = true
-farming.pumpkin = true
+farming.carrot = 0.001
+farming.potato = 0.001
+farming.tomato = 0.001
+farming.cucumber = 0.001
+farming.corn = 0.001
+farming.coffee = 0.001
+farming.melon = 0.001
+farming.pumpkin = 0.001
farming.cocoa = true
-farming.raspberry = true
-farming.blueberry = true
-farming.rhubarb = true
-farming.beans = true
-farming.grapes = true
+farming.raspberry = 0.001
+farming.blueberry = 0.001
+farming.rhubarb = 0.001
+farming.beans = 0.001
+farming.grapes = 0.001
farming.barley = true
-farming.chili = true
-farming.hemp = true
-farming.garlic = true
-farming.onion = true
-farming.pepper = true
-farming.pineapple = true
-farming.peas = true
-farming.beetroot = true
+farming.chili = 0.002
+farming.hemp = 0.002
+farming.garlic = 0.001
+farming.onion = 0.001
+farming.pepper = 0.002
+farming.pineapple = 0.001
+farming.peas = 0.001
+farming.beetroot = 0.001
farming.grains = true
-farming.rarety = 0.002 -- 0.006
+farming.rarety = 0.002
-- Load new global settings if found inside mod folder
diff --git a/farming/mapgen.lua b/farming/mapgen.lua
index 2554a15..6d8278d 100644
--- a/farming/mapgen.lua
+++ b/farming/mapgen.lua
@@ -1,18 +1,22 @@
-- decoration function
-local function register_plant(name, min, max, spawnon, spawnby, num, enabled)
+local function register_plant(name, min, max, spawnon, spawnby, num, rarety)
- if enabled ~= true then
+ -- do not place on mapgen if no value given (or not true)
+ if not rarety then
return
end
+ -- set rarety value or default to farming.rarety if not a number
+ rarety = tonumber(rarety) or farming.rarety
+
minetest.register_decoration({
deco_type = "simple",
place_on = spawnon or {"default:dirt_with_grass"},
sidelen = 16,
noise_params = {
offset = 0,
- scale = farming.rarety, -- 0.006,
+ scale = rarety,
spread = {x = 100, y = 100, z = 100},
seed = 329,
octaves = 3,
@@ -55,7 +59,7 @@ else
register_plant("carrot_8", 1, 15, nil, "", -1, farming.carrot)
register_plant("cucumber_4", 1, 10, nil, "", -1, farming.cucumber)
register_plant("melon_8", 1, 6, {"default:dirt_with_dry_grass",
- "default:dirt_with_rainforest_litter"}, "", -1, farming.melon)
+ "default:dirt_with_rainforest_litter"}, "", -1, farming.melon)
register_plant("pumpkin_8", 1, 6, nil, "", -1, farming.pumpkin)
end
@@ -66,7 +70,7 @@ minetest.register_decoration({
sidelen = 16,
noise_params = {
offset = 0,
- scale = farming.rarety, -- 0.06,
+ scale = tonumber(farming.hemp) or farming.rarety,
spread = {x = 100, y = 100, z = 100},
seed = 420,
octaves = 3,
@@ -87,7 +91,7 @@ minetest.register_decoration({
sidelen = 16,
noise_params = {
offset = 0,
- scale = farming.rarety, -- 0.06,
+ scale = tonumber(farming.chili) or farming.rarety,
spread = {x = 100, y = 100, z = 100},
seed = 760,
octaves = 3,
@@ -108,7 +112,7 @@ minetest.register_decoration({
sidelen = 16,
noise_params = {
offset = 0,
- scale = farming.rarety, -- 0.06,
+ scale = tonumber(farming.pepper) or farming.rarety,
spread = {x = 100, y = 100, z = 100},
seed = 933,
octaves = 3,
@@ -129,7 +133,7 @@ minetest.register_decoration({
sidelen = 16,
noise_params = {
offset = 0,
- scale = farming.rarety, -- 0.06,
+ scale = tonumber(farming.pineapple) or farming.rarety,
spread = {x = 100, y = 100, z = 100},
seed = 917,
octaves = 3,