make travelcenter button actually work
This commit is contained in:
parent
a26ce76b23
commit
f33dd34f46
@ -1,12 +1,13 @@
|
||||
unified_inventory.register_button("illuna_travelcenter", {
|
||||
type = "image",
|
||||
image = "travelnet_inv.png",
|
||||
tooltip = "Teleport to the Travelcenter",
|
||||
tooltip = "Teleport to the Illuna Travelcenter",
|
||||
hide_lite = true,
|
||||
action = function(player, param)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
local travelcenterPos = minetest.setting_get("travelcenter_pos")
|
||||
player:setpos(travelcenterPos)
|
||||
--minetest.chat_send_player(name, core.colorize(color_success, "Alrighty, have fun exploring."))
|
||||
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
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user