Skip to main content

AssetResolveCopyConfig

Namespace for resolving CopyConfig fields in (extended) asset configs.

Index

Functions

_AssignBuyGroup

  • _AssignBuyGroup(configList): void
  • Parameters

    • configList: readonly { BuyGroup?: string; Name?: string; Value?: number }[]

    Returns void

_ExtendedValidator

  • _ExtendedValidator(config, superConfig, key, superKey): boolean

_Resolve

  • _Resolve<T>(config, assetName, groupName, configRecord, configType, configValidator, setBuyGroup): T

  • Parameters

    • config: T

      The (extended) asset config

    • assetName: string

      The name of the corresponding asset

    • groupName: AssetGroupName

      The name of the corresponding asset group

    • configRecord: Partial<Record<AssetGroupName, Record<string, T>>>

      A (nested) record containing the configs of all assets

    • configType: string

      The name of the config type. Used for error reporting

    • configValidator: AssetCopyConfigValidator<T> = null

      An optional validator for comparing the config with its to-be copied counterpart(s)

    • setBuyGroup: boolean = false

      Whether to automatically assign a buygroup to the config and, if required, all CopyConfig-referenced super configs

    Returns T

    • The original config merged with its to-be copied super configs. Returns null if an error is encountered.

AssetDefinition

ExtendedItemConfig