diff --git a/init.lua b/init.lua index 9636b6c..2fb6efd 100644 --- a/init.lua +++ b/init.lua @@ -423,8 +423,13 @@ function minetest.do_item_eat(hp_change, replace_with_item, itemstack, player, p end local itemname = itemstack:get_name() - stamina.log("action", "%s eats %s for %s stamina, replace with %s", + if replace_with_item then + stamina.log("action", "%s eats %s for %s stamina, replace with %s", player:get_player_name(), itemname, hp_change, replace_with_item) + else + stamina.log("action", "%s eats %s for %s stamina", + player:get_player_name(), itemname, hp_change) + end minetest.sound_play("stamina_eat", {to_player = player:get_player_name(), gain = 0.7}) if hp_change > 0 then