Skip to main content

InventoryPrerequisiteConflicts

Namespace with functions for identifying asset prerequisite conflicts.

Index

Variables

GagPriorities

GagPriorities: Partial<Record<AssetGroupName, number>> = ...

The effective "layering" priorities of gags and (potentially) gag-like objects. Used for prerequisite checks that only apply to lower gags.

Functions

GagEffect

  • GagEffect(C, blockingEffects, asset, options): string

  • Parameters

    • C: Character

      The character on which we check for prerequisites

    • blockingEffects: readonly EffectName[]

      The prerequisites we check for on lower gags

    • optionalasset: Asset = null

      The new gag

    • optionaloptions: { errMessage: string; invert: boolean }
      • errMessage: string

        The to-be returned message if the gag is blocked

      • invert: boolean

        Whether the prerequisite check should be inverted (i.e. if "not any" instead of "any")

    Returns string

    • Returns the error message if the gag is blocked, or an empty string if not

GagPrerequisite

  • GagPrerequisite(C, blockingPrereqs, asset, options): string

  • Parameters

    • C: Character

      The character on which we check for prerequisites

    • blockingPrereqs: readonly AssetPrerequisite[]

      The prerequisites we check for on lower gags

    • asset: Asset = null

      The new gag

    • optionaloptions: { errMessage: string; invert: boolean }
      • errMessage: string

        The to-be returned message if the gag is blocked

      • invert: boolean

        Whether the prerequisite check should be inverted (i.e. if "not any" instead of "any")

    Returns string

    • Returns the error message if the gag is blocked, or an empty string if not