Skip to main content

InventoryPrerequisiteConflicts

Namespace with functions for identifying asset prerequisite conflicts.

Index

Type Aliases

ErrMessage

ErrMessage: | CannotBeUsedOverGag | MustBeUsedOverGag

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): ErrMessage

  • 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: ErrMessage; invert: boolean }
      • errMessage: ErrMessage

        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 ErrMessage

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

GagPrerequisite

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

  • 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: ErrMessage; invert: boolean }
      • errMessage: ErrMessage

        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 ErrMessage

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