And again abount unified_Inventory i fix the bug with set and teleport to home position without "home" privelege.
i can post diff/patch file, but easier way add in unified_inventory/register.lua 41 row next code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
action = function(player)
local player_name = player:get_player_name()
if minetest.check_player_privs(player_name, {home=true}) then
unified_inventory.set_home(player, player:getpos())
local home = unified_inventory.home_pos[player_name]
if home ~= nil then
minetest.sound_play("dingdong",
{to_player=player_name, gain = 1.0})
minetest.chat_send_player(player_name,
S("Home position set to: %s"):format(minetest.pos_to_string(home)))
end
else
minetest.chat_send_player(player_name,
S("You don't have the home priviledge!"))
end
end,
this for "Set home" and 63 row:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
action = function(player)
local player_name = player:get_player_name()
if minetest.check_player_privs(player_name, {home=true}) then
minetest.sound_play("teleport",
{to_player=player:get_player_name(), gain = 1.0})
unified_inventory.go_home(player)
else
minetest.chat_send_player(player_name,
S("You don't have the home priviledge!"))
end
end,
for "Go Home"..
This work as button "Set time", it's a just send message that no privelege, but now i look around and learn lua, i want to remove this button if no privelege at all, but at this time i do not known how to do this..