Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Version

Index

Variables

Const versionInfoRegExp

versionInfoRegExp: RegExp = /^(beta|release)?(\d+)\.(\d+)(?:\.(\d+))?$/

Const versionInfoRegExpSemver

versionInfoRegExpSemver: RegExp = /^(\d+)\.(\d+)\.(\d+)(?:-(beta))?$/

Functions

create

  • create(stage: "beta" | "release", major: number, minor: number, patch?: number): IVersionInfo
  • Parameters

    • stage: "beta" | "release"
    • major: number
    • minor: number
    • Default value patch: number = 0

    Returns IVersionInfo

getVersionDisplayString

  • getVersionDisplayString(version?: string | IVersionInfo): string
  • Parameters

    • Default value version: string | IVersionInfo = gameVersion

    Returns string

getVersionInfo

  • Parameters

    • version: string

    Returns IVersionInfo

isAtLeast

  • Returns whether the given version is atLeast another version. This can be used, for example, to see if a save or mod was created/edited after a specific thing was implemented.

    Parameters

    Returns boolean

isCompatible

  • Returns whether the given version is compatible with the game's version. This is used to check, for example, if a mod is compatible with the game's version.

    Parameters

    Returns boolean

isSameVersion

Generated using TypeDoc