Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace ResourcePath

Index

Functions

getDescription

getModPath

  • getModPath(path: string, resourceData: IResourceData, index: number, customPath?: undefined | string): string
  • Returns the mod version of a given resource path.

    Parameters

    • path: string

      The current path of this resource.

    • resourceData: IResourceData

      The resource data of this path type.

    • index: number

      The index of this resource.

    • Optional customPath: undefined | string

      Replaces the imagePath of the description.

      Steps taken:

      1. If the path is not a mod-added resource, it will return the given path. Otherwise:
      2. If the description has a custom path stored in imagePath, the given path is replaced with this path.
      3. Return {modManager.getPath(modIndex)}/{path}

    Returns string

getPath

  • getPath<P>(pathType: P, index: number, customPath?: undefined | string, ...args: ResourceOptionsMap[P]): string
  • Returns the path of a resource.

    Type parameters

    Parameters

    • pathType: P

      The type of resource this is.

    • index: number

      The index of this resource (indexed by this number in resource's enum)

    • Optional customPath: undefined | string
    • Rest ...args: ResourceOptionsMap[P]

    Returns string

getPathDomain

  • getPathDomain<P>(pathType: P, ...args: ResourceOptionsMap[P]): undefined | string
  • Returns the domain for the given PathType, or undefined if the PathType has no domain.

    Type parameters

    Parameters

    • pathType: P
    • Rest ...args: ResourceOptionsMap[P]

    Returns undefined | string

getPathResourceType

  • getPathResourceType(pathType: PathType): "sound" | "image"
  • Returns the resource type of the given PathType.

    Parameters

    Returns "sound" | "image"

getPathTypeName

  • getPathTypeName<P>(pathType: PathType, ...args: ResourceOptionsMap[P]): undefined | string
  • Returns the name of the given PathType

    Type parameters

    Parameters

    • pathType: PathType
    • Rest ...args: ResourceOptionsMap[P]

    Returns undefined | string

getResourceName

  • getResourceName(enumObject: any, index: number, resourceData: IResourceData): string
  • Returns a resource's name.

    Warning: Does not validate that index is in enumObject.

    Parameters

    Returns string

retypePathOptions

  • retypePathOptions(pathType: PathType, args: ResourceOptionsMap[PathType]): { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P }
  • Parameters

    • pathType: PathType
    • args: ResourceOptionsMap[PathType]

    Returns { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P } | { args: ResourceOptionsMap[P]; pathType: P }

Generated using TypeDoc