mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-09 04:16:30 +00:00
i pushed to the wrong repo ._. (#5)
* Hide crafting grid in player inventory * Put all the MTG stuff in a modpack --------- Co-authored-by: CrazyladMT <crazyladttd@outlook.com>
This commit is contained in:
parent
8ff3299dcc
commit
3728e0d29e
736 changed files with 1 additions and 0 deletions
|
|
@ -1,28 +0,0 @@
|
|||
-- mods/default/chat.lua
|
||||
|
||||
local function match_old(privs)
|
||||
local ok = false
|
||||
for k, v in pairs(privs) do
|
||||
if k == "give" and v then
|
||||
ok = true
|
||||
elseif v then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return ok
|
||||
end
|
||||
|
||||
-- Change /pulverize and /clearinv to not require give, like it used to be
|
||||
-- before Luanti 5.15
|
||||
for _, cmd in ipairs({"pulverize", "clearinv"}) do
|
||||
local def = core.registered_chatcommands[cmd]
|
||||
if def then
|
||||
if match_old(def.privs) then
|
||||
core.override_chatcommand(cmd, {
|
||||
privs = {interact=true},
|
||||
})
|
||||
else
|
||||
minetest.log("info", "Privileges of command /" .. cmd .. " look modified, not overriding them.")
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue