From 24321fc60526764d2c88f8152b5c881f1e57d166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Vukanovi=C4=87?= Date: Thu, 27 Jul 2017 15:21:03 +0200 Subject: [PATCH] -Add a sound when tool levels up -Fix tabs instead of spaces --- init.lua | 14 +++++++++----- sounds/toolranks_levelup.ogg | Bin 0 -> 10632 bytes 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 sounds/toolranks_levelup.ogg diff --git a/init.lua b/init.lua index 27232d0..0afbcee 100644 --- a/init.lua +++ b/init.lua @@ -60,11 +60,11 @@ function toolranks.new_afteruse(itemstack, user, node, digparams) dugnodes = dugnodes + 1 end if(itemstack:get_wear() > 60135) then - minetest.chat_send_player(user:get_player_name(), "Your tool is about to break, comrade!") - minetest.sound_play("default_tool_breaks", { - to_player = user:get_player_name(), - gain = 2.0, - }) + minetest.chat_send_player(user:get_player_name(), "Your tool is about to break, comrade!") + minetest.sound_play("default_tool_breaks", { + to_player = user:get_player_name(), + gain = 2.0, + }) end level = toolranks.get_level(dugnodes) @@ -72,6 +72,10 @@ function toolranks.new_afteruse(itemstack, user, node, digparams) local levelup_text = "Your " .. toolranks.colors.green .. itemdesc .. toolranks.colors.white .. " just leveled up!" + minetest.sound_play("toolranks_levelup", { + to_player = user:get_player_name(), + gain = 2.0, + }) minetest.chat_send_player(user:get_player_name(), levelup_text) end diff --git a/sounds/toolranks_levelup.ogg b/sounds/toolranks_levelup.ogg new file mode 100644 index 0000000000000000000000000000000000000000..603f7dcefd57efc8b49ab9c5e51dc061442fe5bb GIT binary patch literal 10632 zcmeHtd010N|L>e^gb*-5zz{$Kh6oXCz<{7)lRzXOYanbwW#0rr1?z(L0D*=@1O!At z8z3NyD4?LCwow5WT!IK9RK=wVZnf3A)a_2N@7uojpWl6+_x^RCJI~~t@0stcpPBQW z&wNjO;^X}R2K*IH91l377ALhGc*q=NW9s^-#0}~MjOzjQ4FI$onYkZBeAFfX9n>Y& znio2+ztRw17`ElUg_jm*vc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