override inventory base on "damocles_builder" priv
This commit is contained in:
parent
f13e580ef8
commit
90264452e5
@ -18,5 +18,6 @@ read_globals = {
|
||||
"stairsplus",
|
||||
"player_monoids",
|
||||
"epic",
|
||||
"player_monoids"
|
||||
"player_monoids",
|
||||
"sfinv"
|
||||
}
|
||||
|
4
init.lua
4
init.lua
@ -11,6 +11,10 @@ dofile(MP.."/teleport_back.lua")
|
||||
dofile(MP.."/node_here.lua")
|
||||
|
||||
|
||||
if minetest.get_modpath("unified_inventory") and minetest.get_modpath("sfinv") then
|
||||
dofile(MP.."/inventory.lua")
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
dofile(MP.."/moreblocks.lua")
|
||||
end
|
||||
|
10
inventory.lua
Normal file
10
inventory.lua
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
if minetest.check_player_privs(player:get_player_name(), "damocles_builder") then
|
||||
-- leave default inventory
|
||||
return
|
||||
else
|
||||
-- set "plain" inventory formspec
|
||||
sfinv.set_player_inventory_formspec(player)
|
||||
end
|
||||
end)
|
Loading…
x
Reference in New Issue
Block a user