illuna/unified_inventory.lua

14 lines
559 B
Lua
Raw Normal View History

unified_inventory.register_button("illuna_travelcenter", {
type = "image",
image = "travelnet_inv.png",
2018-08-04 17:37:59 +02:00
tooltip = "Teleport to the Illuna Travelcenter",
hide_lite = true,
2018-08-04 17:37:59 +02:00
action = function(player)
local playername = player:get_player_name()
local travelcenterPos = minetest.settings:get("travelcenter_pos")
local color = minetest.settings:get("color_success")
player:setpos(minetest.string_to_pos(travelcenterPos))
minetest.chat_send_player(playername, core.colorize(color, "Alrighty, have fun traveling."))
end
})