From dbfa254de3b3bec621db6c38ede77d142a429c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Vukanovi=C4=87?= Date: Wed, 27 Sep 2017 19:16:47 +0200 Subject: [PATCH] Fix indent. --- init.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 2fb9c11..1f288d2 100644 --- a/init.lua +++ b/init.lua @@ -67,14 +67,14 @@ function toolranks.new_afteruse(itemstack, user, node, digparams) end if(dugnodes > most_digs) then most_digs = dugnodes - if(most_digs_user ~= user:get_player_name()) then -- Avoid spam. - most_digs_user = user:get_player_name() - minetest.chat_send_all("Most used tool is now a " .. toolranks.colors.green .. itemdesc - .. toolranks.colors.white .. " owned by " .. user:get_player_name() - .. " with " .. dugnodes .. " uses.") - end - mod_storage:set_int("most_digs", dugnodes) - mod_storage:set_string("most_digs_user", user:get_player_name()) + if(most_digs_user ~= user:get_player_name()) then -- Avoid spam. + most_digs_user = user:get_player_name() + minetest.chat_send_all("Most used tool is now a " .. toolranks.colors.green .. itemdesc + .. toolranks.colors.white .. " owned by " .. user:get_player_name() + .. " with " .. dugnodes .. " uses.") + end + mod_storage:set_int("most_digs", dugnodes) + mod_storage:set_string("most_digs_user", user:get_player_name()) end if(itemstack:get_wear() > 60135) then minetest.chat_send_player(user:get_player_name(), "Your tool is about to break!")