Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IGame

Hierarchy

Implemented by

Index

Properties

Methods

Properties

absoluteTime

absoluteTime: number

autoSaveTimer

autoSaveTimer: number

cartographyTexture

cartographyTexture: WebGLTexture

contaminatedWater

contaminatedWater: IPointZ[]

corpses

corpses: ICorpse[]

crafted

crafted: object

Type declaration

  • [index: number]: boolean

creatureSpawnTimer

creatureSpawnTimer: number

creatures

creatures: ICreature[]

dailyChallenge

dailyChallenge: boolean

debugRenderer

debugRenderer: ITextureDebugRenderer

doodads

doodads: IDoodad[]

fadeInAmount

fadeInAmount: number

fillCount

fillCount: number

fillTile

fillTile: boolean[]

halfMapSize

halfMapSize: number

highscores

highscores: IHighscore[]

hintIndex

hintIndex: number

interval

interval: number

isLoadingSave

isLoadingSave: boolean

isRealTime

isRealTime: boolean

items

items: IItemArray

lastPlayedVersion

lastPlayedVersion: string | null

loadedResources

loadedResources: boolean

mapSize

mapSize: number

mapSizeSq

mapSizeSq: number

messageTimer

messageTimer: number

newCrafted

newCrafted: object

Type declaration

  • [index: number]: boolean

notifier

notifier: INotifier

particle

particle: IParticle

paused

paused: boolean

playedCount

playedCount: number

playing

playing: boolean

saveClear

saveClear: boolean

saveVersion

saveVersion: string | null

savedHighscore

savedHighscore: boolean

seeds

seeds: ISeeds

slot

slot: number

spawnCoords

spawnCoords: any

spriteTexture

spriteTexture: WebGLTexture

spriteTextureSizeInversed

spriteTextureSizeInversed: Vec2

tile

tileContainers

tileContainers: ITileContainer[]

tileData

tileData: ITileData[]

tileEvents

tileEvents: ITileEvent[]

tileTexture

tileTexture: WebGLTexture

tileTextureSizeInversed

tileTextureSizeInversed: Vec2

time

unloading

unloading: boolean

updateRender

updateRender: boolean

version

version: string

visible

visible: boolean

Methods

addPlayer

addZoomLevel

  • addZoomLevel(amount: number): void
  • Parameters

    • amount: number

    Returns void

animateSkeletalRemains

  • animateSkeletalRemains(player: IPlayer, x: number, y: number, z: number): void
  • Parameters

    • player: IPlayer
    • x: number
    • y: number
    • z: number

    Returns void

changeTile

  • changeTile(newTile: any, changeX: number, changeY: number, changeZ: number, stackTiles: boolean): void
  • Parameters

    • newTile: any
    • changeX: number
    • changeY: number
    • changeZ: number
    • stackTiles: boolean

    Returns void

checkAndRemoveBlood

  • checkAndRemoveBlood(player: IPlayer): boolean
  • Parameters

    Returns boolean

checkForHiddenMob

  • checkForHiddenMob(player: IPlayer, x: number, y: number, z: number): void
  • Parameters

    • player: IPlayer
    • x: number
    • y: number
    • z: number

    Returns void

checkWaterFill

  • checkWaterFill(x: number, y: number, z: number, needed: number): void
  • Parameters

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

    Returns void

consumeWaterTile

  • consumeWaterTile(x: number, y: number, z: number): void
  • Parameters

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

    Returns void

directionToMovement

displayMessageIfCanSeeTile

  • displayMessageIfCanSeeTile(x: number, y: number, z: number, message: Message, messageType: MessageType, ...messageArgs: any[]): boolean
  • Parameters

    • x: number
    • y: number
    • z: number
    • message: Message
    • messageType: MessageType
    • Rest ...messageArgs: any[]

    Returns boolean

enableFlowFieldDebug

  • enableFlowFieldDebug(): void
  • Returns void

fireBreath

  • fireBreath(x: number, y: number, z: number, facingDirection: FacingDirection, itemName?: string): void
  • Parameters

    • x: number
    • y: number
    • z: number
    • facingDirection: FacingDirection
    • Optional itemName: string

    Returns void

getAmbientLightLevel

  • getAmbientLightLevel(): number
  • Returns number

getAttack

  • getAttack(): number
  • Returns number

getBenignity

  • getBenignity(): number
  • Returns number

getBlackness

  • getBlackness(): number
  • Returns number

getCompletedMilestoneCount

  • getCompletedMilestoneCount(): number
  • Returns number

getFireMessage

  • getFireMessage(decay: number): Message
  • Parameters

    • decay: number

    Returns Message

getHeight

  • getHeight(z0: number, z1: number, d: number): number
  • Parameters

    • z0: number
    • z1: number
    • d: number

    Returns number

getMalignity

  • getMalignity(): number
  • Returns number

getMovementFinishTime

  • getMovementFinishTime(): number
  • Returns number

getName

getNameFromDescription

getNearestPlayer

  • getNearestPlayer(x: number, y: number): IPlayer | undefined
  • Parameters

    • x: number
    • y: number

    Returns IPlayer | undefined

getOrCreateTile

  • getOrCreateTile(x: number, y: number, z: number): ITile
  • Parameters

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

    Returns ITile

getPlayerAtPosition

  • getPlayerAtPosition(x: number, y: number, z: number, includeGhosts?: boolean): IPlayer | undefined
  • Parameters

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

    Returns IPlayer | undefined

getPlayerAtTile

  • getPlayerAtTile(tile: ITile, includeGhosts?: boolean): IPlayer | undefined
  • Parameters

    • tile: ITile
    • Optional includeGhosts: boolean

    Returns IPlayer | undefined

getPlayerByName

  • getPlayerByName(name: string): IPlayer | undefined
  • Parameters

    • name: string

    Returns IPlayer | undefined

getPlayers

  • getPlayers(includeGhosts?: boolean): IPlayer[]
  • Parameters

    • Optional includeGhosts: boolean

    Returns IPlayer[]

getReputation

  • getReputation(): number
  • Returns number

getSerializationProperties

  • getSerializationProperties(_: string): string[]

getSkillPercent

  • Parameters

    Returns number

getStrength

  • getStrength(): number
  • Returns number

getTile

  • getTile(x: number, y: number, z: number): ITile
  • Parameters

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

    Returns ITile

getTileInFrontOfPlayer

  • Parameters

    Returns ITile

getTileUnsafe

  • getTileUnsafe(x: number, y: number, z: number): ITile
  • Parameters

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

    Returns ITile

getWrappedCoord

  • getWrappedCoord(x: number): number
  • Parameters

    • x: number

    Returns number

hurtTerrain

  • hurtTerrain(player: IPlayer | undefined, x: number, y: number, z: number, tile: ITile): boolean
  • Parameters

    • player: IPlayer | undefined
    • x: number
    • y: number
    • z: number
    • tile: ITile

    Returns boolean

isTileEmpty

  • isTileEmpty(x: number, y: number, z: number): boolean
  • Parameters

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

    Returns boolean

isTileFull

  • isTileFull(x: number, y: number, z: number): boolean
  • Parameters

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

    Returns boolean

isTileFullEx

  • isTileFullEx(tile: ITile): boolean
  • Parameters

    Returns boolean

makeCaveEntrance

makeMiniMap

  • makeMiniMap(offsetX: number, offsetY: number, offsetZ: number, skillCheck?: boolean): void
  • Parameters

    • offsetX: number
    • offsetY: number
    • offsetZ: number
    • Optional skillCheck: boolean

    Returns void

onGlobalSlotLoaded

  • onGlobalSlotLoaded(_: number, success: boolean): void
  • Parameters

    • _: number
    • success: boolean

    Returns void

onSaveLoaded

  • onSaveLoaded(slot: number): void
  • Parameters

    • slot: number

    Returns void

outputFireMessage

  • outputFireMessage(player: IPlayer, decay: number): void
  • Parameters

    Returns void

packGround

  • packGround(x: number, y: number, z: number): void
  • Parameters

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

    Returns void

passTurn

  • Parameters

    Returns void

play

  • Parameters

    Returns void

postLoadResources

  • postLoadResources(): void
  • Returns void

processWaterContamination

  • processWaterContamination(): void
  • Returns void

rangeFinder

  • rangeFinder(weaponRange: number, playerSkillLevel: number): number
  • Parameters

    • weaponRange: number
    • playerSkillLevel: number

    Returns number

removePlayer

  • removePlayer(pid: number): void
  • Parameters

    • pid: number

    Returns void

resetGameState

  • resetGameState(): void
  • Returns void

resizeRenderer

  • resizeRenderer(): void
  • Returns void

saveGame

  • saveGame(saveType: SaveType, callback?: function): void
  • Parameters

    • saveType: SaveType
    • Optional callback: function
        • (slot?: number, bytes?: number, saveObject?: SaveObject): void
        • Parameters

          • Optional slot: number
          • Optional bytes: number
          • Optional saveObject: SaveObject

          Returns void

    Returns void

setGlContextSize

  • setGlContextSize(width: number, height: number): void
  • Parameters

    • width: number
    • height: number

    Returns void

setPaused

  • setPaused(paused: boolean, chatMessage?: boolean): void
  • Parameters

    • paused: boolean
    • Optional chatMessage: boolean

    Returns void

setRealTime

  • setRealTime(enabled: boolean): void
  • Parameters

    • enabled: boolean

    Returns void

setTile

  • setTile(x: number, y: number, z: number, tile: ITile): ITile
  • Parameters

    • x: number
    • y: number
    • z: number
    • tile: ITile

    Returns ITile

setupSave

  • setupSave(_: number): void
  • Parameters

    • _: number

    Returns void

shouldRender

  • shouldRender(): number
  • Returns number

synchronizeFlowFields

  • synchronizeFlowFields(excludeLocal?: boolean): void
  • Parameters

    • Optional excludeLocal: boolean

    Returns void

tickRealtime

  • tickRealtime(): void
  • Returns void

updateCraftTableAndWeight

  • updateCraftTableAndWeight(): void
  • Returns void

updateCraftTableAndWeightNextTick

  • updateCraftTableAndWeightNextTick(): void
  • Returns void

updateFieldOfViewNextTick

  • updateFieldOfViewNextTick(): void
  • Returns void

updateFlowFieldTile

  • updateFlowFieldTile(x: number, y: number, z: number): void
  • Parameters

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

    Returns void

updateGame

  • updateGame(resting?: boolean): void
  • Parameters

    • Optional resting: boolean

    Returns void

updateOption

  • updateOption(player: IPlayer | undefined, id: string, value: boolean): void
  • Parameters

    • player: IPlayer | undefined
    • id: string
    • value: boolean

    Returns void

updateReputation

  • updateReputation(reputation: number): void
  • Parameters

    • reputation: number

    Returns void

Generated using TypeDoc