Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DrawnMap

Hierarchy

Implements

Index

Properties

Readonly event

event: IEventEmitter<this, IDrawnMapEvents> = new EventEmitter<this, E>(this)

tiles

Readonly type

Accessors

isValid

  • get isValid(): boolean
  • Returns boolean

position

  • The top-left position of this map

    Returns Readonly<IVector3>

radius

  • get radius(): number
  • Returns number

Methods

addTreasure

  • addTreasure(x: number, y: number, chest: DoodadType): this
  • Parameters

    • x: number
    • y: number
    • chest: DoodadType

    Returns this

discoverTreasure

  • discoverTreasure(x: number, y: number, discoverer: Human): this
  • Parameters

    • x: number
    • y: number
    • discoverer: Human

    Returns this

getBackground

  • Returns MapBackground

getCenterPosition

  • Returns IVector3

getObfuscator

  • Returns Obfuscation

getRiddle

  • Returns undefined | Translation

getTreasure

  • Returns keyof ITreasure[]

getUndiscoveredTreasure

  • Returns ITreasure[]

hasDiscoveredAll

  • hasDiscoveredAll(): boolean
  • Returns boolean

hasDiscoveredAny

  • hasDiscoveredAny(): boolean
  • Returns boolean

isTreasureDiscovered

  • isTreasureDiscovered(treasure: ITreasure): boolean
  • isTreasureDiscovered(x: number, y: number): boolean
  • Parameters

    Returns boolean

  • Parameters

    • x: number
    • y: number

    Returns boolean

onUnserialized

  • onUnserialized(): void

preSerializeObject

  • preSerializeObject(): void

render

  • Parameters

    Returns Promise<HTMLCanvasElement | undefined>

Static generateIslandTreasureMaps

  • Generates island treasure maps.

    This should only be called a single time, when a world is first generated. This first generation stores a list of things that only get generated the first time, such as doodads. Subsequent loads of the maps will only re-initialise them from the things that are regenerated on each load.

    Parameters

    Returns void

Static initializeIslandTreasureMaps

  • Initialise an island's treasure maps.

    This should be called after island treasure map generation, every time the island is loaded.

    Parameters

    Returns void

Static initializeIslandTreasureMapsDifferences

  • initializeIslandTreasureMapsDifferences(): void
  • Returns void

Static plotRegion

Generated using TypeDoc