Files
WT-Offline/packages/patcher/src/essential-features.ts
T
N0VAN0M4LY 9503bb3c45 chore(patches): name patch feature tags in English
The features listed by every exe and GUI patch definition now use English
tags, so contributors can read them without knowing Chinese. Each tag keeps
its feature inventory section letter (A- to O-) and translates the inventory
row it stands for. Tags that named the same row in two languages are merged
(store, premium account, marketplace), and the external inventory tag on the
coupon redemption patch joins the coupons tag it describes: 32 tags become 28.

The three essential tags in the patcher and the launcher's feature labels in
both locales follow the rename.

Checked: check-patches, check-gui, root and launcher typecheck, launcher
build, a build-game-copy run into a temporary folder (12 exe and 35 GUI
patches ready, as before), and install:listFeatures in the launcher
returning 28 tags with the three essential ones flagged.
2026-11-29 11:25:44 +08:00

25 lines
1.1 KiB
TypeScript

/**
* Which unavailable patches stop an installation.
*
* Any other missing patch only costs the features it lists, and the player may go on without
* them. A patch tagged with one of these features keeps the copy from running at all, or keeps
* it apart from the online game: without it the copy would read or write the online game's data,
* load the anti-cheat, or connect to Gaijin (working rules 18). The tags are the feature
* inventory's section A rows the patch definitions name in `features`.
*/
import type { PatchFailure } from '@wto/exepatch';
export const ESSENTIAL_FEATURES: ReadonlySet<string> = new Set([
/** The game starts offline at all (e.g. the data pack signature check). */
'A-Offline startup',
/** Nothing of the online game's data or identity is touched. */
'A-Isolation from the official game',
/** Nothing connects to Gaijin. */
'A-No Gaijin connections',
]);
/** The failures that must stop an installation. */
export function blockingFailures(failures: readonly PatchFailure[]): PatchFailure[] {
return failures.filter((failure) => failure.features.some((feature) => ESSENTIAL_FEATURES.has(feature)));
}