feat(arknights): track Arknights from its own wiki
The most-named game in the release thread, and the cheapest one to add: the GameId, hue and dailyTasks have been sitting in games.ts since launch with no source behind them. arknights.wiki.gg is a better source than Game8 for this game, but it is not the mp-event shape wikigg.ts reads, so it gets its own parser. Two properties of the page drive the code: - Every row lists CN and Global, about five months apart. Only Global is published; a row without one yields no event rather than borrowing the CN date. A CN date on a Global calendar is a confidently wrong date. - Only the next boundary carries a machine-readable timer — the end while an event runs, the start while it is upcoming — so precision differs per side and flips when the event goes live. An exact instant is accepted only when it falls on the same UTC day as the date beside it, because startsAt.slice(0, 10) is part of the event ID: a start that moved a day would orphan every completion mark on the morning the event began. Also sets resetOffsets for all three regions to UTC-7. Not a blanket per-game offset — Arknights genuinely runs one Global server for every region we model, and the page evidences the clock: every ending event ends at 10:59:59Z, which is 03:59:59 at UTC-7, one second before a 04:00 reset. Six events, counted independently against the page before and after parsing. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8c2ec19c22
commit
1dd58d3f52
+8
-1
@@ -45,7 +45,14 @@ export const GAMES: Record<GameId, GameMeta> = {
|
||||
hsr: { id: "hsr", name: "Honkai: Star Rail", short: "Star Rail", hue: "#7B8CFF" , studio: "HoYoverse", dailyTasks: "Daily training, Trailblaze Power" },
|
||||
zzz: { id: "zzz", name: "Zenless Zone Zero", short: "ZZZ", hue: "#F2A03D" , studio: "HoYoverse", dailyTasks: "Daily missions, battery" },
|
||||
wuwa: { id: "wuwa", name: "Wuthering Waves", short: "Wuwa", hue: "#3DD6A0" , studio: "Kuro Games", dailyTasks: "Daily activity, waveplate" },
|
||||
arknights: { id: "arknights", name: "Arknights", short: "Arknights", hue: "#9AA3B8" , studio: "Hypergryph", dailyTasks: "Daily missions, sanity" },
|
||||
// Arknights runs a single Global (EN) server for all three of our regions on
|
||||
// a fixed UTC-7, so every region gets the same override rather than the
|
||||
// regional default. Evidenced by the source rather than assumed: every ending
|
||||
// event on arknights.wiki.gg carries an exact end of 10:59:59Z, which is
|
||||
// 03:59:59 at UTC-7 — one second before a 04:00 reset. Without this a
|
||||
// European reader's Arknights day would roll at 03:00 UTC while the game
|
||||
// rolls at 11:00, ticking the wrong box for eight hours.
|
||||
arknights: { id: "arknights", name: "Arknights", short: "Arknights", hue: "#9AA3B8" , studio: "Hypergryph", dailyTasks: "Daily missions, sanity", resetOffsets: { asia: -7, america: -7, europe: -7 } },
|
||||
// Endfield has two server groups, not three: Europe is served off the same
|
||||
// machine as the Americas, on a fixed UTC-5. So a European player's day rolls
|
||||
// at 09:00 UTC — 11:00 in Copenhagen in summer, 10:00 in winter — six hours
|
||||
|
||||
Reference in New Issue
Block a user