Hierarchy

Constructors

Properties

absoluteTime: number
autoSave: AutoSave = ...
canvasElement: undefined | HTMLCanvasElement
challengeCollection?: ChallengeModifiersCollection
commandManager: default = ...
customMilestoneModifiersAllowed: boolean
difficulty: GameMode
gameplayModifierData: Record<number, any> = {}
initialThumbnailTimeout: undefined | Timer
interval: 16.6666 = INTERVAL
islands: default = ...
itemStylesheetHandler: undefined | default = ...
lastTickTime: undefined | number
milestoneManager: MilestoneManager = ...
modManager: default = ...
nextTickTime: undefined | number
originalPlayOptions: Partial<IPlayOptions>
paused: Set<PauseSource>
playerManager: default = ...
playing: boolean
previousSaveVersion: IVersionInfo
references: default = ...
replay: undefined | default
saveClear: boolean
saveLoad: SaveLoad = ...
saveManager: default
saveSize?: string
saveVersion: String
shouldUpdateTablesAndWeight: boolean
slot: undefined | number
steamworks: default
stringTokenizer: undefined | default
tickSpeed: number
tileDecorations: Uint16Array
time: default
turnMode: TurnMode
uninit: Uninit = ...
upgrades: string[] = []
version: String = gameVersion

The version the save was originally created on

visible: boolean = true
webGlContext: undefined | default
webWorkerManager: WebWorkerManager = ...
worldId: string

Accessors

  • get isChallenge(): boolean
  • Returns boolean

  • get isPaused(): boolean
  • Returns boolean

Methods

  • Creates the renderer. Should only be called once when starting / loading a save

    Parameters

    Returns void

  • Changes the turn mode if it's not correct

    Returns void

  • Returns void

  • Gets the largest damage type weaknesses of a human or creature based on a type and damage value

    Returns

    returns DamageType array or undefined if there are no weaknesses

    Parameters

    • defense: Defense

      Defense of the human or creature

    • damageTypes: DamageType

      Measures the weaknesses compared to damage types passed

    • damage: number

      The damage value given to the human or creature

    Returns DamageType[]

  • Parameters

    Returns number

  • Parameters

    • delay: number
    • timestamp: number = ...

    Returns IMovementTime

  • Returns default<number>[]

  • Parameters

    • identifier: string

    Returns undefined | default<number>

  • Get humans in the game; ie, players, NPCs, and other non-player humans. Parameters include additional players that may not be relevant, such as ghosts, connecting players, absent players, the dedicated server fake player. Only want players?

    See

    PlayerManager.getAll

    Returns

    Array of Human objects

    Parameters

    • Optional includeGhosts: boolean

      True to include players that are ghosts

    • Optional includeConnecting: boolean

      True to include players that are connecting

    • Optional includeDedicatedServer: boolean

      True to include the dedicated server fake player

    • Optional includeAbsent: boolean

      True to include the absent players

    Returns default<number>[]

  • Returns number

  • It's important that this is lowest, so that it happens after modManager's globalSlotReady event

    Returns void

  • Initializes WebGl

    Parameters

    • Optional forceWebGlVersion: number

      Set to force a specific webgl version

    Returns Promise<void>

  • Returns Promise<void>

  • Parameters

    Returns void

  • Returns void

  • Returns void

  • Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    • _manager: any
    • entity: default<unknown, number, unknown, unknown>

    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

  • Resets the game state. This should be called when returning to the main menu from a game and/or right before starting/joining a game. This method should be able to be called multiple times in a row and nothing unexpected should occur.

    Parameters

    • saveType: false | SaveType = SaveType.BackToMainMenu

      Saves the game with the specified save type. Set to false to not save. Defaults to BackToMainMenu.

    • shouldDisconnect: boolean = true

      Marks if the game should disconnect from multiplayer. Defaults to true.

    • hasDisconnected: boolean = false

      Marks if the game just disconnected from multiplayer. Defaults to false.

    Returns Promise<void>

  • Returns void

  • Returns void

  • Returns void

  • Parameters

    Returns void

  • Parameters

    • tickSpeed: number

    Returns void

  • Parameters

    Returns void

  • Compiles webgl programs / shaders and creates renderers

    Parameters

    • restoring: boolean

    Returns Promise<void>

  • Stops the game logic loop timer

    Returns void

  • Parameters

    • ticks: number = 5000
    • biomeType: BiomeType = BiomeType.Coastal

    Returns Promise<void>

  • Collection of things to perform on each tick

    Parameters

    • ticks: number = 1
    • playingHumans: default<number>[] = ...
    • tickFlag: TickFlag = TickFlag.All
    • dueToAction: boolean = false

    Returns void

  • Collection of things to perform on each tick

    Parameters

    • island: default
    • ticks: number
    • playingHumans: default<number>[] = ...
    • tickFlag: TickFlag = TickFlag.All
    • onProgress: ((progess: number) => Promise<void>)
        • (progess: number): Promise<void>
        • Parameters

          • progess: number

          Returns Promise<void>

    • dueToAction: boolean = false

    Returns Promise<void>

  • Returns void

  • Returns string

  • Triggers a game logic loop to run in the next javascript event loop

    Returns void

  • Returns Promise<void>

  • Returns void

  • Parameters

    Returns void

  • Parameters

    • human: undefined | default<number>
    • id: keyof IOptions
    • value: number | boolean

    Returns void

  • Do not call this directly. Use updateOption instead

    Parameters

    • id: keyof IOptions
    • value: number | boolean
    • Optional human: default<number>

    Returns void

  • Returns void

Generated using TypeDoc