Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AtlasNode

Hierarchy

Implements

Index

Constructors

constructor

Properties

mods

mods: Mod[]

props

Methods

activeMods

  • Parameters

    Returns Mod[]

addMod

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

    Parameters

    Returns this

affectingMods

  • Parameters

    Returns Mod[]

any

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

    Returns boolean

asArray

  • asArray(): Mod[]

builder

  • builder(): Builder

distance

  • Parameters

    Returns number

getAllMods

  • Parameters

    Returns Mod[]

getTags

  • getTags(): Tag[]

hasMod

  • hasMod(mod: Mod): boolean
  • Parameters

    Returns boolean

hasModGroup

  • hasModGroup(other: Mod): boolean

hasRoomFor

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

    Parameters

    Returns boolean

inDomainOf

  • inDomainOf(mod_domain: number): boolean

inSextantRange

  • returns a list of nodes with sextant distance <= depth sextant distance: (a, b) => 1, if a.isInSextantRange(b) +inf, otherwise

    Parameters

    • atlas: AtlasNode[]
    • Default value max_depth: number = 1

    Returns AtlasNode[]

inactiveMods

  • Parameters

    Returns Mod[]

indexOfMod

  • indexOfMod(mod: Mod): number

indexOfModWithId

  • indexOfModWithId(id: string): number

isInSextantRange

  • isInSextantRange(other: AtlasNode): boolean
  • Parameters

    Returns boolean

level

  • level(): number

maxModsOfType

  • maxModsOfType(): number

numberOfModsOfType

  • numberOfModsOfType(mod_type: number): number

pos

  • pos(): string
  • Returns string

removeAllMods

  • removeAllMods(): this

removeMod

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

    Parameters

    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: Builder) => Builder): this
  • Parameters

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

          • builder: Builder

          Returns Builder

    Returns this

Static build

Static withBuilder

  • Parameters

    • builder: Builder

    Returns AtlasNode

Generated using TypeDoc