summaryrefslogtreecommitdiff
path: root/farming/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'farming/init.lua')
-rw-r--r--farming/init.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/farming/init.lua b/farming/init.lua
index 8c615f7..407537d 100644
--- a/farming/init.lua
+++ b/farming/init.lua
@@ -7,7 +7,7 @@
farming = {}
farming.mod = "redo"
-farming.version = "1.29"
+farming.version = "1.31"
farming.path = minetest.get_modpath("farming")
farming.select = {
type = "fixed",
@@ -15,7 +15,7 @@ farming.select = {
}
-local creative_mode_cache = minetest.setting_getbool("creative_mode")
+local creative_mode_cache = minetest.settings:get_bool("creative_mode")
function farming.is_creative(name)
return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
@@ -447,7 +447,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0})
- if not farming.is_creative(placer:get_player_name()) then
+ if not placer or not farming.is_creative(placer:get_player_name()) then
local name = itemstack:get_name()
@@ -595,6 +595,10 @@ farming.grapes = true
farming.barley = true
farming.chili = true
farming.hemp = true
+farming.garlic = true
+farming.onion = true
+farming.pepper = true
+farming.pineapple = true
farming.donuts = true
farming.rarety = 0.006
@@ -646,6 +650,10 @@ if farming.barley then dofile(farming.path.."/barley.lua") end
if farming.chili then dofile(farming.path.."/chili.lua") end
if farming.hemp then dofile(farming.path.."/hemp.lua") end
if farming.donuts then dofile(farming.path.."/donut.lua") end
+if farming.garlic then dofile(farming.path.."/garlic.lua") end
+if farming.onion then dofile(farming.path.."/onion.lua") end
+if farming.pepper then dofile(farming.path.."/pepper.lua") end
+if farming.pineapple then dofile(farming.path.."/pineapple.lua") end
dofile(farming.path.."/mapgen.lua")
dofile(farming.path.."/compatibility.lua") -- Farming Plus compatibility