We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 222866b commit f3b7be9Copy full SHA for f3b7be9
builtin/game/chatcommands.lua
@@ -683,10 +683,13 @@ core.register_chatcommand("pulverize", {
683
core.log("error", "Unable to pulverize, no player.")
684
return false, "Unable to pulverize, no player."
685
end
686
- if player:get_wielded_item():is_empty() then
+ local wielded_item = player:get_wielded_item()
687
+ if wielded_item:is_empty() then
688
return false, "Unable to pulverize, no item in hand."
689
- player:set_wielded_item(nil)
690
+ core.log("action", name .. " pulverized \"" ..
691
+ wielded_item:get_name() .. " " .. wielded_item:get_count() .. "\"")
692
+ player:set_wielded_item(nil)
693
return true, "An item was pulverized."
694
end,
695
})
0 commit comments