From 10b5b7d7b7c4dfeb4c27a745f5230cf0ba070ed8 Mon Sep 17 00:00:00 2001 From: An0n3m0us Date: Sun, 26 Jan 2020 11:27:52 +0000 Subject: [PATCH] Add log for on_place --- mods/farming/api.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mods/farming/api.lua b/mods/farming/api.lua index c2c549e4..606cba8b 100644 --- a/mods/farming/api.lua +++ b/mods/farming/api.lua @@ -140,6 +140,7 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname) local under = minetest.get_node(pt.under) local above = minetest.get_node(pt.above) + local place_to = {x = pt.above.x, y = pt.above.y, z = pt.above.z} local player_name = placer and placer:get_player_name() or "" @@ -176,6 +177,7 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname) end -- add the node and remove 1 item from the itemstack + minetest.log("action", player_name .. " places node " .. plantname .. " at " .. minetest.pos_to_string(place_to)) minetest.add_node(pt.above, {name = plantname, param2 = 1}) tick(pt.above) if not (creative and creative.is_enabled_for