Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RunRef

A Run stores the split times for a specific game and category of a runner.

Hierarchy

Index

Constructors

constructor

  • new RunRef(ptr: number): RunRef
  • This constructor is an implementation detail. Do not use this.

    Parameters

    • ptr: number

    Returns RunRef

Properties

ptr

ptr: number

Methods

attemptCount

  • attemptCount(): number
  • Returns the amount of runs that have been attempted with these splits.

    Returns number

attemptHistoryIndex

  • Accesses the an attempt history element by its index. This does not store the actual segment times, just the overall attempt information. Information about the individual segments is stored within each segment. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns AttemptRef

attemptHistoryLen

  • attemptHistoryLen(): number
  • Returns the amount attempt history elements are stored in this Run.

    Returns number

autoSplitterSettings

  • autoSplitterSettings(): string
  • Accesses the Auto Splitter Settings that are encoded as XML.

    Returns string

categoryName

  • categoryName(): string
  • Accesses the name of the category this Run is for.

    Returns string

clone

  • Clones the Run object.

    Returns Run

customComparison

  • customComparison(index: number): string
  • Accesses a custom comparison stored in this Run by its index. This includes Personal Best but excludes all the other Comparison Generators. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns string

customComparisonsLen

  • customComparisonsLen(): number
  • Returns the amount of custom comparisons stored in this Run.

    Returns number

extendedCategoryName

  • extendedCategoryName(showRegion: boolean, showPlatform: boolean, showVariables: boolean): string
  • Returns an extended category name that possibly includes the region, platform and variables, depending on the arguments provided. An extended category name may look like this:

    Any% (No Tuner, JPN, Wii Emulator)

    Parameters

    • showRegion: boolean
    • showPlatform: boolean
    • showVariables: boolean

    Returns string

extendedFileName

  • extendedFileName(useExtendedCategoryName: boolean): string
  • Returns a file name (without the extension) suitable for this Run that is built the following way:

    Game Name - Category Name

    If either is empty, the dash is omitted. Special characters that cause problems in file names are also omitted. If an extended category name is used, the variables of the category are appended in a parenthesis.

    Parameters

    • useExtendedCategoryName: boolean

    Returns string

extendedName

  • extendedName(useExtendedCategoryName: boolean): string
  • Returns a name suitable for this Run that is built the following way:

    Game Name - Category Name

    If either is empty, the dash is omitted. If an extended category name is used, the variables of the category are appended in a parenthesis.

    Parameters

    • useExtendedCategoryName: boolean

    Returns string

gameIconLen

  • gameIconLen(): number
  • Accesses the amount of bytes the game icon's data takes up.

    Returns number

gameIconPtr

  • gameIconPtr(): number
  • Accesses the game icon's data. If there is no game icon, this returns an empty buffer.

    Returns number

gameName

  • gameName(): string
  • Accesses the name of the game this Run is for.

    Returns string

hasBeenModified

  • hasBeenModified(): boolean
  • Returns whether the Run has been modified and should be saved so that the changes don't get lost.

    Returns boolean

len

  • len(): number
  • Returns the amount of segments stored in this Run.

    Returns number

metadata

  • Accesses additional metadata of this Run, like the platform and region of the game.

    Returns RunMetadataRef

offset

  • Accesses the time an attempt of this Run should start at.

    Returns TimeSpanRef

saveAsLss

  • saveAsLss(): string
  • Saves a Run as a LiveSplit splits file (*.lss). If the run is actively in use by a timer, use the appropriate method on the timer instead, in order to properly save the current attempt as well.

    Returns string

segment

  • Accesses a certain segment of this Run. You may not provide an out of bounds index.

    Parameters

    • index: number

    Returns SegmentRef

Generated using TypeDoc