From ea85b3e073a6b6fd15a0a2636377319cd2b85e07 Mon Sep 17 00:00:00 2001 From: Ragulan R Date: Thu, 20 Jun 2019 20:04:36 +0100 Subject: [PATCH] Move maptools.drop_msg above dofiles Maptools tools/items have become droppable again, the function to prevent this is loaded after nodes.lua, leading the on_drop function to be nil. --- init.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index c8d5336..4c969bf 100644 --- a/init.lua +++ b/init.lua @@ -16,14 +16,14 @@ local S, NS = dofile(modpath .. "/intllib.lua") maptools.S = S maptools.NS = NS +maptools.drop_msg = function(itemstack, player) + local name = player:get_player_name() + minetest.chat_send_player(name, S("[maptools] tools/nodes do not drop!")) +end + dofile(modpath .. "/config.lua") dofile(modpath .. "/aliases.lua") dofile(modpath .. "/craftitems.lua") dofile(modpath .. "/default_nodes.lua") dofile(modpath .. "/nodes.lua") dofile(modpath .. "/tools.lua") - -maptools.drop_msg = function(itemstack, player) - local name = player:get_player_name() - minetest.chat_send_player(name, S("[maptools] tools/nodes do not drop!")) -end