function Player:sendLocationWindow()
local window = ModalWindow(modalId, "Fast Travel", "You can fast travel to any of the below locations.")
local choices = 0
for i = 1, #tlocations do
window:addChoice(i, tlocations[i]["name"])
choices = choices + 1
end
if choices > 0 then
window:addButton(1, "Expand")
window:setDefaultEnterButton(1)
end
window:addButton(2, "Exit")
window:setDefaultEscapeButton(2)
window:sendToPlayer(self)
return true
end
function Player:sendTravelWindow(location)
local window = ModalWindow(modalId + 1, location["name"], "You can fast travel to any of the below locations.")
local choices = 0
for i = 1, #location["sublocations"] do
window:addChoice(i, location["sublocations"][i]["name"])
choices = choices + 1
end
if choices > 0 then
window:addButton(1, "Travel")
window:setDefaultEnterButton(1)
end
window:addButton(2, "Back")
window:setDefaultEscapeButton(2)
window:sendToPlayer(self)
return true
end