summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-10-17 10:06:56 -0600
committerFaceDeer <derksenmobile@gmail.com>2017-10-17 10:06:56 -0600
commitdbb0d51de5dcc46c558f7c14e73ce610c1806d77 (patch)
tree1240c3ca3236bb7017b835e10198b9a7ae01311d
parent8abd57146d69332e806250203ee6ed9dcfd4b5e7 (diff)
enable [crops] planting.
-rw-r--r--init.lua1
-rw-r--r--util_item_place_node.lua2
2 files changed, 2 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index a58ae39..118fa60 100644
--- a/init.lua
+++ b/init.lua
@@ -32,6 +32,7 @@ digtron.builder_on_place_items = {
-- Then a string prefix is checked, returning this value. Useful for enabling on_placed on a mod-wide basis.
digtron.builder_on_place_prefixes = {
["farming:"] = true,
+ ["crops:"] = true,
}
-- Finally, items belonging to group "digtron_on_place" will have their on_place methods called.
diff --git a/util_item_place_node.lua b/util_item_place_node.lua
index 0ee32ac..5d7a7d9 100644
--- a/util_item_place_node.lua
+++ b/util_item_place_node.lua
@@ -99,7 +99,7 @@ digtron.item_place_node = function(itemstack, placer, place_to, param2)
-- to know what to do in that case - if you're in creative_mode Digtron will place such items but it will think it failed and not
-- deduct them from inventory no matter what Digtron's settings are. Unfortunate, but not very harmful and I have no workaround.
local returnstack, success = def.on_place(ItemStack(itemstack), placer, pointed_thing)
- if returnstack:get_count() < itemstack:get_count() then success = true end -- some mods neglect to return a success condition
+ if returnstack and returnstack:get_count() < itemstack:get_count() then success = true end -- some mods neglect to return a success condition
if success then
-- Override the param2 value to force it to be what Digtron wants
local placed_node = minetest.get_node(place_to)