forked from Mirrorlandia_minetest/minetest
Log usage of /pulverize (#7503)
This commit is contained in:
parent
222866bab7
commit
f3b7be97fe
@ -683,9 +683,12 @@ core.register_chatcommand("pulverize", {
|
|||||||
core.log("error", "Unable to pulverize, no player.")
|
core.log("error", "Unable to pulverize, no player.")
|
||||||
return false, "Unable to pulverize, no player."
|
return false, "Unable to pulverize, no player."
|
||||||
end
|
end
|
||||||
if player:get_wielded_item():is_empty() then
|
local wielded_item = player:get_wielded_item()
|
||||||
|
if wielded_item:is_empty() then
|
||||||
return false, "Unable to pulverize, no item in hand."
|
return false, "Unable to pulverize, no item in hand."
|
||||||
end
|
end
|
||||||
|
core.log("action", name .. " pulverized \"" ..
|
||||||
|
wielded_item:get_name() .. " " .. wielded_item:get_count() .. "\"")
|
||||||
player:set_wielded_item(nil)
|
player:set_wielded_item(nil)
|
||||||
return true, "An item was pulverized."
|
return true, "An item was pulverized."
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user