Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseSavegameInterface

Hierarchy

Index

Constructors

constructor

  • Constructs an new interface for the given savegame

    Parameters

    • logger: any
    • data: any

    Returns BaseSavegameInterface

Methods

anticheatCheckEnhancementLevels

  • anticheatCheckEnhancementLevels(): boolean
  • Checks all enhancement levels are between 0 and 512

    Returns boolean

getAllPlaceableBuildingIds

  • getAllPlaceableBuildingIds(): string[]
  • Returns all available buildings in this savegame

    Returns string[]

getSchemaUncached

  • getSchemaUncached(): object
  • Returns the uncached json schema

    Returns object

getValidator

  • getValidator(): any
  • Returns any

getVersion

  • getVersion(): void
  • Returns the interfaces version

    Returns void

internalGetPlayerbase

  • internalGetPlayerbase(): any
  • Returns the playerbase serialized data

    Returns any

performAnticheatCheck

  • performAnticheatCheck(): boolean
  • Detects cheats in the savegmae

    Returns boolean

readAdvBlueprints

  • readAdvBlueprints(): any
  • Returns all blueprints

    Returns any

readAdvBuildings

  • readAdvBuildings(): any
  • Returns all buildings

    Returns any

readAdvPowerups

  • readAdvPowerups(): any
  • Returns all powerups

    Returns any

readAdvResources

  • readAdvResources(): any
  • Returns all resource

    Returns any

readCrystals

  • readCrystals(): any
  • Returns the amount of crystals

    Returns any

readCurrentDay

  • readCurrentDay(): any
  • Returns the current day

    Returns any

readGameover

  • readGameover(): any
  • Checks if the game is over

    Returns any

readHasAllBuildingsPlaced

  • readHasAllBuildingsPlaced(): boolean
  • Returns if the savegame has at least one building from every building type

    Returns boolean

readHeads

  • readHeads(): any
  • Returns the amount of heads

    Returns any

readHighestEnhancementLevel

  • readHighestEnhancementLevel(): number
  • Returns the highest level of enhancement in the savegame

    Returns number

readIngameTimeSeconds

  • readIngameTimeSeconds(): any
  • Returns the ingame time in seconds

    Returns any

readLastUpdate

  • readLastUpdate(): any
  • Returns the time of last update

    Returns any

readNumberOfBuildingWithId

  • readNumberOfBuildingWithId(id: any): number
  • Returns the amount of buildings in the savegame which have the given id

    Parameters

    • id: any

    Returns number

readNumberOfUsedTiles

  • readNumberOfUsedTiles(): number
  • Returns the total amount of used tiles (resources, powerups, blueprints and buildings)

    Returns number

readPlayerbaseCount

  • readPlayerbaseCount(): number
  • Returns the amount of playerbases

    Returns number

readStatBuildingsPlaced

  • readStatBuildingsPlaced(): any
  • Gets the stat: buildings placed

    Returns any

readStatExpGained

  • readStatExpGained(): any
  • Returns how long this game has been played

    Returns any

readStatZombiesKilled

  • readStatZombiesKilled(): any
  • Gets the stat: zombies killed

    Returns any

validate

  • validate(): boolean
  • Validates the data

    Returns boolean