[lua] function TakeTaxiNode
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- TakeTaxiNode = function(slot)
- if TaxiNodeGetType(slot) ~= "REACHABLE" then return end
- destination = ShortenName(FixTypos(TaxiNodeName(slot))) --ShortenName(TaxiNodeName(slot))
- local t = vars[source]
- if t and t[destination] and t[destination] > 0 then -- saved variables lookup
- endTime = t[destination]
- else
- endTime = GetEstimatedTime(slot)
- end
- if db.confirmflight then -- confirm flight
- StaticPopupDialogs.INFLIGHTCONFIRM = StaticPopupDialogs.INFLIGHTCONFIRM or {
- button1 = OKAY, button2 = CANCEL,
- OnAccept = function(this, data) InFlight:StartTimer(data) end,
- timeout = 0, exclusive = 1, hideOnEscape = 1,
- }
- StaticPopupDialogs.INFLIGHTCONFIRM.text = format(L_confirmpopup, destination, endTime and format(" (%s)", FormatTime(endTime)) or "")
- local dialog = StaticPopup_Show("INFLIGHTCONFIRM")
- if dialog then
- dialog.data = slot
- end
- else -- just take the flight
- self:StartTimer(slot)
- end
- end
Editor
You can edit this paste and save as new: