forked from mtcontrib/minetest-toolranks
Fix indent.
This commit is contained in:
parent
eb7ba36768
commit
dbfa254de3
16
init.lua
16
init.lua
@ -67,14 +67,14 @@ function toolranks.new_afteruse(itemstack, user, node, digparams)
|
|||||||
end
|
end
|
||||||
if(dugnodes > most_digs) then
|
if(dugnodes > most_digs) then
|
||||||
most_digs = dugnodes
|
most_digs = dugnodes
|
||||||
if(most_digs_user ~= user:get_player_name()) then -- Avoid spam.
|
if(most_digs_user ~= user:get_player_name()) then -- Avoid spam.
|
||||||
most_digs_user = user:get_player_name()
|
most_digs_user = user:get_player_name()
|
||||||
minetest.chat_send_all("Most used tool is now a " .. toolranks.colors.green .. itemdesc
|
minetest.chat_send_all("Most used tool is now a " .. toolranks.colors.green .. itemdesc
|
||||||
.. toolranks.colors.white .. " owned by " .. user:get_player_name()
|
.. toolranks.colors.white .. " owned by " .. user:get_player_name()
|
||||||
.. " with " .. dugnodes .. " uses.")
|
.. " with " .. dugnodes .. " uses.")
|
||||||
end
|
end
|
||||||
mod_storage:set_int("most_digs", dugnodes)
|
mod_storage:set_int("most_digs", dugnodes)
|
||||||
mod_storage:set_string("most_digs_user", user:get_player_name())
|
mod_storage:set_string("most_digs_user", user:get_player_name())
|
||||||
end
|
end
|
||||||
if(itemstack:get_wear() > 60135) then
|
if(itemstack:get_wear() > 60135) then
|
||||||
minetest.chat_send_player(user:get_player_name(), "Your tool is about to break!")
|
minetest.chat_send_player(user:get_player_name(), "Your tool is about to break!")
|
||||||
|
Loading…
Reference in New Issue
Block a user