Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ModManager

Hierarchy

  • ModManager

Implements

Index

Constructors

constructor

  • Returns ModManager

Methods

cacheHooks

  • cacheHooks(): void

callHook

  • callHook(hook: Hook, ...args: any[]): any
  • Parameters

    • hook: Hook
    • Rest ...args: any[]

    Returns any

callHookReduce

  • callHookReduce(hook: Hook, ...args: any[]): any

callHookWithDefault

  • callHookWithDefault<T>(hook: Hook, defaultValue: T, ...args: any[]): T
  • Type parameters

    • T

    Parameters

    • hook: Hook
    • defaultValue: T
    • Rest ...args: any[]

    Returns T

canLoad

  • canLoad(index: number, fromModsMenu?: boolean, count?: number): CanLoadState
  • Parameters

    • index: number
    • Default value fromModsMenu: boolean = false
    • Default value count: number = 0

    Returns CanLoadState

canLoadFromIdentifier

getAuthor

  • getAuthor(index: number): string
  • Parameters

    • index: number

    Returns string

getCreatedDate

  • getCreatedDate(index: number): number | undefined
  • Parameters

    • index: number

    Returns number | undefined

getDescription

  • getDescription(index: number): string

getEnabledMods

  • getEnabledMods(): number[]

getFile

  • getFile(modIndex: number, file: string, callback: function): boolean
  • Parameters

    • modIndex: number
    • file: string
    • callback: function
        • (data: string, success: boolean): void
        • Parameters

          • data: string
          • success: boolean

          Returns void

    Returns boolean

getFolderName

  • getFolderName(index: number): string

getIdentifier

  • getIdentifier(index: number): string

getIndexFromName

  • getIndexFromName(name: string): number[]

getIndexFromPath

  • getIndexFromPath(path: string): number | undefined

getIndexFromPublishId

  • getIndexFromPublishId(publishFileId: string): number[]

getInstallDate

  • getInstallDate(index: number): number | undefined
  • Parameters

    • index: number

    Returns number | undefined

getLastUpdatedDate

  • getLastUpdatedDate(index: number): number | undefined

getLoadedModByName

  • getLoadedModByName(name: string): IModInfo | undefined

getLoadedMods

getModFromIndex

getMods

getName

  • getName(index: number): string
  • Parameters

    • index: number

    Returns string

getPath

  • getPath(index: number): string
  • Parameters

    • index: number

    Returns string

getProvided

getPublishFileId

  • getPublishFileId(index: number): string | undefined

getRequiredMods

  • getRequiredMods(index: number): string[]

getState

getSteamIdOwner

  • getSteamIdOwner(index: number): string | undefined
  • Parameters

    • index: number

    Returns string | undefined

getType

getVersion

  • getVersion(index: number): string
  • Parameters

    • index: number

    Returns string

isEnabled

  • isEnabled(index: number): boolean
  • Parameters

    • index: number

    Returns boolean

isEnabledByName

  • isEnabledByName(name: string): boolean

isInitializing

  • isInitializing(index: number): ModState
  • Parameters

    • index: number

    Returns ModState

isLoaded

  • isLoaded(index: number): boolean
  • Parameters

    • index: number

    Returns boolean

isLoadedByName

  • isLoadedByName(name: string): boolean

isValid

  • isValid(index: number): boolean
  • Parameters

    • index: number

    Returns boolean

load

  • load(index: number): void
  • Parameters

    • index: number

    Returns void

loadAll

  • loadAll(options: Partial<IPlayOptions>, callback: function): void
  • Parameters

    • options: Partial<IPlayOptions>
    • callback: function
        • (err: string | undefined, mods: string[]): void
        • Parameters

          • err: string | undefined
          • mods: string[]

          Returns void

    Returns void

reload

  • reload(index: number): boolean
  • Parameters

    • index: number

    Returns boolean

reloadByName

  • reloadByName(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

removeMod

  • removeMod(id: number, uninstall?: boolean): void
  • Parameters

    • id: number
    • Default value uninstall: boolean = false

    Returns void

save

  • save(index: number): void
  • Parameters

    • index: number

    Returns void

saveAll

  • saveAll(): void

setCreatedDate

  • setCreatedDate(index: number, createdDate: number): void
  • Parameters

    • index: number
    • createdDate: number

    Returns void

setInstallDate

  • setInstallDate(index: number, installDate: number): void
  • Parameters

    • index: number
    • installDate: number

    Returns void

setLastUpdated

  • setLastUpdated(index: number, lastUpdated: number): void
  • Parameters

    • index: number
    • lastUpdated: number

    Returns void

setPublishId

  • setPublishId(index: number, publishedFileId: string): void
  • Parameters

    • index: number
    • publishedFileId: string

    Returns void

setState

  • setState(index: number, state: ModState, force?: boolean, cacheHooks?: boolean, callback?: function, unloaded?: boolean): boolean
  • Parameters

    • index: number
    • state: ModState
    • Default value force: boolean = false
    • Default value cacheHooks: boolean = true
    • Optional callback: function
        • (): void
        • Returns void

    • Default value unloaded: boolean = false

    Returns boolean

setSteamIdOwner

  • setSteamIdOwner(index: number, steamIdOwner: string): void
  • Parameters

    • index: number
    • steamIdOwner: string

    Returns void

setupMod

  • setupMod(folderName: string, modType: ModType, callback: function, initialModState?: ModState): void
  • Parameters

    • folderName: string
    • modType: ModType
    • callback: function
        • (id?: number): void
        • Parameters

          • Optional id: number

          Returns void

    • Default value initialModState: ModState = ModState.Enabled

    Returns void

setupMods

  • setupMods(callback: function): void
  • Parameters

    • callback: function
        • (): void
        • Returns void

    Returns void

uninitialize

  • uninitialize(index: number): void
  • Parameters

    • index: number

    Returns void

uninitializeAll

  • uninitializeAll(): void

unload

  • unload(index: number): void
  • Parameters

    • index: number

    Returns void

unloadAll

  • unloadAll(reset?: boolean): void
  • Parameters

    • Default value reset: boolean = false

    Returns void

Generated using TypeDoc