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

Hierarchy

Implements

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • Optional game: Game
    • Optional position: IVector2
    • Optional seed: number
    • Optional mapSize: number

    Returns default

Properties

biomeOptions?: unknown
biomeType: BiomeTypes = BiomeType.Coastal
brokenReferencesCount: number = 0
contaminatedWater: IWaterContamination[] = []
corpses: default = ...
creatures: default = ...
details?: IIslandDetails
doodads: default = ...
event: IEventEmitter<default, IIslandEvents>
flowFieldManager: default = ...
game: Game
id: `${number},${number}`
items: default = ...
loadCount: number = 0
mapGenBuildTime?: number
mapGenVersion: String

The version the mapgen for this island uses

mapSize: number
mapSizeSq: number
modifiersCollection?: IslandModifiersCollection
moveTypesInFov: Map<"-1-0" | "-1-1" | "-1-2" | "-1-4" | "-1-8" | "-1-16" | "-1-32" | "-1-64" | "-1-128" | "-1-256" | "-1-512" | "-1-1024" | "-1-2048" | "-1-15" | "0-0" | "0-1" | "0-2" | "0-4" | "0-8" | "0-16" | "0-32" | "0-64" | "0-128" | "0-256" | "0-512" | "0-1024" | "0-2048" | "0-15" | "1-0" | "1-1" | "1-2" | "1-4" | "1-8" | "1-16" | "1-32" | "1-64" | "1-128" | "1-256" | "1-512" | "1-1024" | "1-2048" | "1-15", Set<default<unknown, number, NPC | Player>>> = ...

Entity move types in fov on this island

name?: string
npcs: default = ...
players: Set<default<unknown, number, NPC | Player>> = ...

Set of players on this island

ports: PortManager = ...
position: IVector2
previousSaveVersion: undefined | IVersionInfo
referenceId?: number

Do not use this property directly, instead use `game.references.getReference()

saveBuildTime: number = saveData.gameBuildTime
saveVersion: String

The version this island was last loaded on

seededRandom: Random<LegacySeededGenerator | PCGSeededGenerator>
seeds: ISeeds
simulatedTickHelper: TickHelper = ...

Helps instruct when to tick when in simulated turn mode

spawnPoint: IVector3 = ...
temperature: default = ...
tileContainers: ITileContainer[] = []
tileData: SaferNumberIndexedObject<SaferNumberIndexedObject<SaferNumberIndexedObject<ITileData[]>>> = {}
tileEvents: default = ...
treasureMaps: default[] = []
version: String = gameVersion

The version this island was originally made on

wellData: SaferNumberIndexedObject<IWell> = {}
world: default = ...
zones: default = ...

Accessors

  • get hasLoadedItemReferences(): boolean
  • Returns boolean

  • get isActive(): boolean
  • Check if this island has players on it

    Returns boolean

  • get isDefaultIsland(): boolean
  • Returns boolean

  • get isFastForwarding(): boolean
  • Returns boolean

  • get isLoaded(): boolean
  • Returns boolean

  • get isLocalIsland(): boolean
  • Returns boolean

  • get isTransient(): boolean
  • Returns boolean

  • get mapGenVersionInfo(): Info
  • Returns Info

  • get tiles(): SaferNumberIndexedObject<default>
  • Returns SaferNumberIndexedObject<default>

Methods

  • Parameters

    Returns void

  • Parameters

    • tile: default

      The tile to apply from

    • towardsTileOrDirection: default | default | Direction

      The Tile, Vector2 (direction vector, not point), or Direction to do the ranged action towards

    • range: number

      The range to use the action at. If towardsTileOrDirection is a Tile, this will be capped by the tile's distance

    • Optional accuracy: number

      1.0 = perfectly accurate in target direction, 0.5 = can be perpendicular, 0.0 = can be in any direction around the check tile

    Returns IRangedResolvedDirection

  • Parameters

    • tile: default

      The tile to apply from

    • towardsTileOrDirection: default | default | Direction

      The Tile, Vector2 (direction vector, not point), or Direction to do the ranged action towards

    • range: number

      The range to use the action at. If towardsTileOrDirection is a Tile, this will be capped by the tile's distance

    • accuracy: undefined | number

      1.0 = perfectly accurate in target direction, 0.5 = can be perpendicular, 0.0 = can be in any direction around the check tile

    • clientSide: true

      Returns a list of directions to raycast to that ensures that all potential end tiles will be tested against

    Returns IRangedResolvedDirection[]

  • Calculates the light level and light color of a tile.

    Returns

    32bit number representing RED GREEN BLUE ALPHA

    Parameters

    Returns number

  • Parameters

    Returns IWell

  • Parameters

    • tile: default

      The tile to check from

    • ranged: IRangedResolvedDirection

      The range & direction vector to check towards. Generate this information using applyRangedAccuracy

    • Optional includePlayers: boolean

      Whether players can be hit by this check

    Returns IMobCheck

  • Checks if island.tileData is synced with Tile.data

    Returns void

  • Returns void

  • Parameters

    • seed: number = 0

    Returns Random<PCGSeededGenerator>

  • Parameters

    • x: number
    • y: number
    • z: number
    • index: number
    • rendererData: number
    • quality: Quality

    Returns default

  • Returns void

  • Parameters

    • isSynced: boolean

    Returns void

  • Fast forwards an island by running lots of ticks. Defaults to IslandFastForward tick flag with no playing humans.

    Parameters

    Returns Promise<void>

  • Parameters

    Returns void

  • Gets the default terrain type that should be under a tile (in the case of melting or removing it in some way).

    Returns

    The default terrain type with a fallback to dirt (which shouldn't happen without mods or bugs).

    Parameters

    • tile: default

      Tile that we are getting the default terrain type for.

    Returns TerrainType

  • Parameters

    • x: number
    • y: number

    Returns East | North | West | South

  • Returns ImmutableObject<IGameOptions>

  • Gets the growing speed (or chance to grow more every tick).

    Parameters

    • terrainType: TerrainType
    • Optional quality: Quality

      Quality of the item or tile to check the growing speed of.

    • Optional magicValue: number

    Returns number

  • Gets the total distance away the current island is from 0, 0 as a positive value.

    Returns

    The distance as a positive number.

    Returns number

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns number

  • Returns number

  • Returns number

  • Parameters

    • useGenerated: boolean = false

    Returns string

  • Returns default[]

  • Parameters

    • index: number
    • x: number
    • y: number
    • z: number
    • rendererData: number
    • quality: Quality

    Returns default

  • Parameters

    • calc: ((player: default<unknown, number, NPC | Player>) => undefined | number)
    • Optional round: boolean

    Returns number

  • Parameters

    • Optional includeGhosts: boolean
    • Optional includeConnecting: boolean

    Returns default<unknown, number, NPC | Player>[]

  • Parameters

    • quality: Quality
    • itemDurability: number
    • Optional getMax: boolean

    Returns number

  • Parameters

    Returns number

  • Returns default

  • Returns default

  • Gets the items/resources from terrain based on the TerrainResources definition and checks if it is based on the current biome type.

    Returns

    undefined if nothing set, or an array of ITerrainLootItem.

    Parameters

    Returns undefined | ITerrainLootItem[]

  • Parameters

    • x: number
    • y: number
    • z: number
    • Optional disableLog: boolean

    Returns default

  • Parameters

    • x: number
    • y: number
    • z: number

    Returns undefined | default

  • Parameters

    Returns void

  • Only allow loading references once Even if an island is unloaded, the loaded references will remain

    Parameters

    • allowFixes: boolean

    Returns void

  • Parameters

    Returns void

  • Marks that the human had a turn In manual turn mode, it will tick the humans stat timers & the game

    Parameters

    Returns void

  • This is called on each active island on each game tick (16ms) when in simulated mode

    Parameters

    • timeStamp: number

    Returns void

  • Returns void

  • Returns

    a range value for the weapon being shot based on the weapon range and the players skill with that weapon type. This value then becomes the maximum potential range of the current shot.

    Parameters

    • weaponRange: number
    • human: default<unknown, number, NPC | Player>
    • skillUse: SkillType
    • get: "min" | "max" | "random" = "random"

    Returns number

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    • x: number
    • y: number
    • z: number
    • tile: default

    Returns default

  • Synchronizes player events Usually called when a new player joins

    Parameters

    • playerIds: number[]

    Returns void

  • Collection of things to perform on each tick

    Parameters

    Returns void

  • Called when the island is ticking during simulated or real-time mode

    Returns void

  • Returns string

  • Parameters

    Returns void

  • Unload the island from memory Removes all players and stores tiles references

    Returns void

Generated using TypeDoc