Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ItemMapManager

Hierarchy

  • ItemMapManager

Index

Methods

get

  • get(): DrawnMap | undefined
  • get(clientSide: true): DrawnMap | "unplotted" | undefined
  • If this item is a tattered map or a drawn map, this will return its associated DrawnMap instance.

    Returns DrawnMap | undefined

  • Parameters

    • clientSide: true

    Returns DrawnMap | "unplotted" | undefined

getObfuscation

  • getObfuscation(): undefined | number
  • Returns undefined | number

    the obfuscation of the linked map, a multiplier that will be applied overtop whatever durability obfuscation there is

has

  • has(): boolean
  • Returns boolean

isOfIsland

  • isOfIsland(): boolean
  • Returns boolean

    whether the associated map is on the current island

randomize

  • randomize(chanceOfGivingCompletedMap?: number, chanceOfGivingMapFromOtherIsland?: number, islandId?: undefined | string, randomDecimal?: undefined | number): boolean
  • Randomises which map is associated with this item.

    Parameters

    • Default value chanceOfGivingCompletedMap: number = DEFAULT_ITEM_MAP_CHANCE_COMPLETED

      By default, 10% chance of becoming associated with an already-completed map.

    • Default value chanceOfGivingMapFromOtherIsland: number = DEFAULT_ITEM_MAP_CHANCE_OTHER_ISLAND

      By default, 50% chance of, rather than becoming associated with an already-completed map, instead becoming associated with a map on another island. Note: If there are no maps on the current island, will always become associated with a map on another island regardless of chance.

    • Optional islandId: undefined | string
    • Optional randomDecimal: undefined | number

    Returns boolean

    whether this item is now associated with a map on this island

randomizeToIsland

  • randomizeToIsland(islandId: string, giveCompleted?: undefined | false | true, randomDecimal?: undefined | number): void
  • Parameters

    • islandId: string
    • Optional giveCompleted: undefined | false | true
    • Optional randomDecimal: undefined | number

    Returns void

set

  • set(islandId: string, mapId: number): boolean
  • Sets the map associated with this item.

    Parameters

    • islandId: string

      The ID of the island containing the associated map.

    • mapId: number

      The index of the map in the island.treasureMaps array.

    Returns boolean

setIsland

  • setIsland(island: string, completed: boolean, randomDecimal: number): boolean
  • If the associated map is already on the given island, does nothing. If not, associates the map with a map on the given island, chosen by the given properties:

    Parameters

    • island: string
    • completed: boolean

      Whether the associated map should be a completed one

    • randomDecimal: number

      A decimal to use to choose which map on this island to use

    Returns boolean

setObfuscation

  • setObfuscation(amount: number): boolean
  • If this item is linked to a map, sets the obfuscation of this instance to the given amount

    Parameters

    • amount: number

    Returns boolean

setObfuscationOf

  • Parameters

    Returns boolean

setUnplotted

  • setUnplotted(island: string, position: IVector3): boolean
  • Sets this map to an unlinked, unplotted map of a given position on the given island. The map will be JIT-generated, afterwards a linked map.

    Parameters

    Returns boolean

Static getMapsInContainer

  • getMapsInContainer(container: IContainer): any[]
  • Parameters

    Returns any[]

Generated using TypeDoc