v1.3: colour-coded place names, rows sorted by soonest, fly now only while the boat can still be made
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WyQKCL92ZLwPi9qmYQtNdc
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## 1.3 (9 October 2026)
|
||||
|
||||
### New
|
||||
- **Place names are colour coded**: Orgrimmar red, Undercity purple, Grom'gol green, Kargath orange-brown, Thunder Bluff tan, Sparkwater light blue, Revantusk teal, Ratchet gold and Booty Bay pink. A far end renamed with `/ob name` shows in white.
|
||||
- **Rows are sorted by what happens soonest**: the next arrival, departure or time to fly is at the top. "Departing" and "fly now" rows go first, and rows with no timer go last.
|
||||
|
||||
### Fixed
|
||||
- The Ratchet boat's "fly now" stayed up until the boat sailed, even when it was far too late to make it. It now shows for 10 seconds after your time to fly, then moves on to the next sailing you can still make.
|
||||
|
||||
## 1.2.1 (9 October 2026)
|
||||
|
||||
### Fixed
|
||||
|
||||
+39
-6
@@ -273,6 +273,20 @@ local OB_OK, OB_ERR = pcall(function ()
|
||||
local function StartName(r) if Flipped(r) then return Away(r) end return r.flipTo end
|
||||
local RowName = ShownName
|
||||
|
||||
-- Each place has its own colour in the rows; renamed or unknown places stay white.
|
||||
local PLACE_COLOR = {
|
||||
["orgrimmar"] = "ff5544", ["undercity"] = "b48cff", ["gromgol"] = "66dd55",
|
||||
["kargath"] = "e09a55", ["thunder bluff"] = "e8cc77", ["sparkwater"] = "44ccff",
|
||||
["revantusk"] = "33bba0", ["revantusk village"] = "33bba0", ["ratchet"] = "ffdd33",
|
||||
["booty bay"] = "ff88cc",
|
||||
}
|
||||
local function Paint(n) return "|cff" .. (PLACE_COLOR[Norm(n)] or "ffffff") .. n .. "|r" end
|
||||
local function ColoredName(r)
|
||||
local a, b = r.flipTo, Away(r)
|
||||
if Flipped(r) then a, b = b, a end
|
||||
return Paint(a) .. " |cff777777->|r " .. Paint(b)
|
||||
end
|
||||
|
||||
-- Far end timing: learned on a ride (DB.farOff / DB.farDwell), else built in, else the
|
||||
-- rough "halfway through the cycle, same stay" assumption. FarKnown = not a guess.
|
||||
local function FarKnown(r) return (DB.farOff[r.entry] or r.flipOffset) ~= nil end
|
||||
@@ -956,10 +970,14 @@ local OB_OK, OB_ERR = pcall(function ()
|
||||
if not state then return nil end
|
||||
local sail = secs
|
||||
if state == "wait" then sail = secs + Dwell(r) end
|
||||
-- Stay on the boat that is in port (or on its way) until it has actually sailed:
|
||||
-- once the time to fly has passed, show "fly now" rather than jumping to the next
|
||||
-- sailing. Only after this boat leaves does the row move on to the next one.
|
||||
-- Once the time to fly has passed, keep showing "fly now" for 10 s (about the
|
||||
-- slack in the travel time) instead of jumping straight to the next sailing. After
|
||||
-- that this boat can no longer be made, so move on to the next one.
|
||||
local fly = sail - CFG.travel
|
||||
if fly < -10 then
|
||||
sail = sail + Period(r)
|
||||
fly = sail - CFG.travel
|
||||
end
|
||||
return fly, sail
|
||||
end
|
||||
|
||||
@@ -999,17 +1017,32 @@ local OB_OK, OB_ERR = pcall(function ()
|
||||
return nm, state, nil, "|cff888888--|r"
|
||||
end
|
||||
|
||||
-- Rows are sorted by what happens soonest: the next arrival, departure or time to fly.
|
||||
local function Refresh()
|
||||
local n = 0
|
||||
local list = {}
|
||||
for i = 1, table.getn(ROUTES) do
|
||||
local r = ROUTES[i]
|
||||
if Visible(r) then
|
||||
local _, state, secs, txt = RowText(r)
|
||||
local key = secs or 100000
|
||||
if state == "departing" or (state == "fly" and secs <= 0) then key = 0 end
|
||||
table.insert(list, { r = r, state = state, secs = secs, txt = txt, key = key, i = i })
|
||||
end
|
||||
end
|
||||
table.sort(list, function(x, y)
|
||||
if x.key ~= y.key then return x.key < y.key end
|
||||
return x.i < y.i
|
||||
end)
|
||||
local n = 0
|
||||
for k = 1, table.getn(list) do
|
||||
local e = list[k]
|
||||
local r, state, secs, txt = e.r, e.state, e.secs, e.txt
|
||||
do
|
||||
n = n + 1
|
||||
local row = rows[n] or CreateRow(n)
|
||||
row:Show()
|
||||
row.route = r
|
||||
local _, state, secs, txt = RowText(r)
|
||||
local nm = ShownName(r)
|
||||
local nm = ColoredName(r)
|
||||
if cal and cal.need[r.entry] then
|
||||
if (cal.got[r.entry] or 0) >= cal.need[r.entry] then
|
||||
nm = "|cff55ff55+|r " .. nm
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
## Title: |cff33ffccOcto|rBus
|
||||
## Notes: Zeppelin and boat arrival timers for Orgrimmar. Reads live positions from ZepSense.dll; minimap icon toggles the window.
|
||||
## Author: Phridgey
|
||||
## Version: 1.2.1
|
||||
## Version: 1.3
|
||||
## SavedVariables: OctoBusDB
|
||||
|
||||
OctoBus.lua
|
||||
|
||||
@@ -16,8 +16,10 @@ OctoBus needs one extra file, `ZepSense.dll`, which you install by hand in the g
|
||||
| Red X | Transport is away. The timer counts down to docking ("docks"). |
|
||||
| `~` before a time | An estimate from stored data. It goes away once you see the transport dock or leave. |
|
||||
| `departing` (yellow) | The transport is still at the dock past its scheduled time and is about to leave. |
|
||||
| `fly now` (red) | Ratchet boat: it is already time to leave Orgrimmar for this sailing; the row stays on it until the boat sails. |
|
||||
| `fly now` (red) | Ratchet boat: it is time to leave Orgrimmar for this sailing. It shows for 10 seconds, then the row moves on to the next sailing you can still make. |
|
||||
| `fly 4:55 sails 6:40` | Ratchet boat only: leave Orgrimmar in 4:55 to be on the Ratchet dock before it sails in 6:40. If you can no longer make a sailing, it shows the next one. |
|
||||
| Place colours | Each place name has its own colour (Orgrimmar red, Undercity purple, Grom'gol green, and so on). A far end renamed with `/ob name` shows in white. |
|
||||
| Row order | Soonest first: whatever docks, leaves or needs you to fly next is at the top. Rows move as the timers change. |
|
||||
| Bell on a row | Alerts are on for that route (click a row to toggle). |
|
||||
| Title | Click it to switch between the routes for where you are and all routes (`Transports - all`). |
|
||||
| Footer | The route whose data is oldest, e.g. `oldest data: Orgrimmar -> Undercity, seen 3 h ago`. It turns orange after 5 days, as a hint to go and see it again. |
|
||||
|
||||
Reference in New Issue
Block a user