2019-09-09 06:52:32 -04:00
|
|
|
-- LUALOCALS < ---------------------------------------------------------
|
|
|
|
local minetest, pairs
|
|
|
|
= minetest, pairs
|
|
|
|
-- LUALOCALS > ---------------------------------------------------------
|
|
|
|
|
|
|
|
minetest.register_privilege("pulverize", {
|
2019-12-31 08:49:37 -05:00
|
|
|
description = "Can pulverize inventory items",
|
2019-09-09 06:52:32 -04:00
|
|
|
give_to_singleplayer = false,
|
|
|
|
give_to_admin = false
|
|
|
|
})
|
|
|
|
|
2019-12-31 08:49:37 -05:00
|
|
|
local wrap = {pulverize = true, clearinv = true}
|
2019-09-09 06:52:32 -04:00
|
|
|
for k, v in pairs(minetest.registered_chatcommands) do
|
2019-12-31 08:49:37 -05:00
|
|
|
if wrap[k] then
|
2019-09-09 06:52:32 -04:00
|
|
|
v.privs = v.privs or {}
|
|
|
|
v.privs.pulverize = true
|
|
|
|
minetest.override_chatcommand(k, v)
|
|
|
|
end
|
|
|
|
end
|