Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TestImmutableContainer

Hierarchy

Implements

Index

Constructors

constructor

Properties

mods

mods: any[]

Methods

addMod

  • addMod(mod: any): this
  • adds a new non-existing mod

    Parameters

    • mod: any

    Returns this

any

  • any(): boolean
  • checks if this container has any mods

    Returns boolean

asArray

  • asArray(): any[]

builder

  • builder(): any

getTags

  • getTags(): Tag[]

hasMod

  • hasMod(mod: any): boolean
  • Parameters

    • mod: any

    Returns boolean

hasModGroup

  • hasModGroup(other: any): boolean
  • Parameters

    • other: any

    Returns boolean

hasRoomFor

  • hasRoomFor(mod: any): boolean
  • checks if theres more place for a mod with their generationtype

    Parameters

    • mod: any

    Returns boolean

inDomainOf

  • inDomainOf(domain: number): boolean

indexOfMod

  • indexOfMod(mod: any): number
  • Parameters

    • mod: any

    Returns number

indexOfModWithId

  • indexOfModWithId(id: string): number

level

  • level(): number

maxModsOfType

  • maxModsOfType(mod: any): number

numberOfModsOfType

  • numberOfModsOfType(mod_type: number): number

removeAllMods

  • removeAllMods(): this

removeMod

  • removeMod(other: any): this
  • removes an existing mod

    Parameters

    • other: any

    Returns this

stats

  • stats(): {}
  • lists all the stats that are offered by its mods

    mods can have multiple stats so we sum their values grouped by stat id

    Returns {}

    • [key: string]: Stat

statsExtended

withMutations

  • withMutations(mutate: (builder: any) => any): this
  • Parameters

    • mutate: (builder: any) => any
        • (builder: any): any
        • Parameters

          • builder: any

          Returns any

    Returns this

Static withBuilder

  • Parameters

    • builder: { mods: any[] }
      • mods: any[]

    Returns TestImmutableContainer

Generated using TypeDoc