/** * 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 = 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))); }