Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Island

Represents the worlds island Items, Creatures, Npcs, etc.. all exist on the island

Hierarchy

  • Island

Implements

Index

Constructors

constructor

  • new Island(position?: IVector2, startingSeed?: undefined | number): Island
  • Parameters

    • Optional position: IVector2
    • Optional startingSeed: undefined | number

    Returns Island

Properties

biomeType

biomeType: BiomeTypes = BiomeType.Coastal

contaminatedWater

contaminatedWater: IWaterContamination[] = []

corpses

corpses: SaferArray<Corpse> = []

creatureSpawnTimer

creatureSpawnTimer: number = 0

creatures

creatures: SaferArray<Creature> = []

doodads

doodads: SaferArray<Doodad> = []

items

items: SaferArray<Item> = []

lastCreationIds

lastCreationIds: SaferNumberIndexedObject<number>

loadCount

loadCount: number = 0

mapGenVersion

mapGenVersion: string

Optional name

name: undefined | string

npcs

npcs: SaferArray<NPC> = []

position

position: IVector2

Optional referenceId

referenceId: undefined | number

saveVersion

saveVersion: string

temperature

temperature: TemperatureManager = new TemperatureManager(this)

tileContainers

tileContainers: ITileContainer[] = []

tileData

tileEvents

tileEvents: SaferArray<TileEvent> = []

time

time: TimeManager = new TimeManager(0)

treasureMaps

treasureMaps: DrawnMap[] = []

version

version: string = gameVersion

wellData

Accessors

biome

id

  • get id(): string
  • Returns string

Methods

findUnusedId

  • findUnusedId<T>(creationId: CreationId, things: T[]): number
  • Type parameters

    • T

    Parameters

    Returns number

getIslandDistance

  • getIslandDistance(): number
  • Gets the total distance away the current island is from 0, 0 as a positive value.

    Returns number

    The distance as a positive number.

hydrateFromOldGame

  • hydrateFromOldGame(oldGame: IGameOld): void
  • Parameters

    Returns void

registerEventBus

  • registerEventBus(): void
  • Returns void

unregisterEventBus

  • unregisterEventBus(): void
  • Returns void

Static idToPosition

  • idToPosition(id: string): IVector2 | undefined
  • Parameters

    • id: string

    Returns IVector2 | undefined

Static positionToId

  • positionToId(position: IVector2): string
  • Parameters

    Returns string

Object literals

seeds

seeds: object

base

base: number = 0

milestoneModifierSaved

milestoneModifierSaved: number = 0

saved

saved: number = 0

Generated using TypeDoc