Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Sextant

Hierarchy

Index

Constructors

constructor

Properties

atlas

atlas: AtlasNode[] | undefined

mods

mods: Mod[]

type

type: Type = Type.master

Static type

type: Type = Type

Methods

applicableTo

  • applicableTo(node: AtlasNode): ApplicableFlags

applyTo

chooseMod

  • Parameters

    Returns Mod | undefined

findAdjacentWithSpawnweight

  • Parameters

    Returns AtlasNode | undefined

getAvailableMods

  • getAvailableMods(): Mod[]
  • returns a copy of #mods

    we can stick with a shallow copy since Mod are supposed to be immutable

    Returns Mod[]

isApplicableTo

  • isApplicableTo(container: AtlasNode, whitelist?: string[]): boolean
  • Parameters

    • container: AtlasNode
    • Default value whitelist: string[] = []

    Returns boolean

isModApplicableTo

isModSpawnableOn

  • isModSpawnableOn(mod: Mod, node: AtlasNode): SpawnableFlags

modsFor

  • modsFor(node: AtlasNode, whitelist?: string[]): { mod: Mod; spawnable: Flags; spawnweight: number }[]
  • Parameters

    • node: AtlasNode
    • Default value whitelist: string[] = []

    Returns { mod: Mod; spawnable: Flags; spawnweight: number }[]

rollMod

  • adds a mod from chooseMod ignoring if it's applicable

    Parameters

    Returns AtlasNode

spawnweightFor

  • spawnweightFor(mod: Mod, container: AtlasNode): number | undefined
  • Parameters

    Returns number | undefined

Static blockedMods

  • creates a list of mod that are either a) already applied to this node because they are directly in range b) already applied to adjacent nodes and would create duplicates if applied to this node in other words: consider every mod from maps within a sextant distance of 2

    Parameters

    Returns Mod[]

Static build

  • Parameters

    Returns Sextant

Static buildMods

  • Parameters

    Returns Mod[]

Static modFilter

  • Parameters

    Returns boolean

Generated using TypeDoc