Options
All
  • Public
  • Public/Protected
  • All
Menu

YORG.io 3 Docs

Index

Classes

Variables

Functions

Object literals

Variables

Const ACHIEVEMENT_CATEGORIES

ACHIEVEMENT_CATEGORIES: string[] = achivementCategories

Const ALL_DIRECTIONS

ALL_DIRECTIONS: Vector[] = [TOP, RIGHT, BOTTOM, LEFT]

Const ALL_RANGES

ALL_RANGES: string[] = ["today", "week", "alltime"]

Let APPLICATION_ERROR_OCCURED

APPLICATION_ERROR_OCCURED: boolean = false

Const ARIVAL_WORLDSPACE_THRESHOLD

ARIVAL_WORLDSPACE_THRESHOLD: 12 = 12

Const Ajv

Ajv: any = require("ajv")

Const BACKEND_ERRORS

BACKEND_ERRORS: object = errors

Type declaration

  • badResponse: string
  • checksumMismatch: string
  • checksumMissing: string
  • databaseError: string
  • failedToDecompress: string
  • failedToLockSession: string
  • failedToParse: string
  • internalServerError: string
  • invalidRequestSchema: string
  • invalidSession: string
  • networkError: string
  • notFound: string
  • offline: string
  • rateLimited: string
  • serverOverloaded: string
  • sessionExpired: string
  • unauthenticated: string
  • unknownError: string
  • unsupportedVersion: string
  • fetchSavegame: object
    • unknownKey: string
  • freeCoins: object
    • alreadyUsed: string
    • unknownCategory: string
  • gameover: object
    • alreadyGameover: string
    • keyNotFound: string
  • iap: object
    • invalidTransactionId: string
    • invalidTransactionStatus: string
  • leaderboard: object
    • invalidMode: string
  • linkEmail: object
    • emailSendFailed: string
    • emailTaken: string
    • invalidEmail: string
  • login: object
    • banned: string
    • failedToLockUserForLogin: string
    • invalidAuthKey: string
  • mpProfile: object
    • blockedFromMultiplayer: string
  • mp_gameservers: object
    • serversDown: string
  • purchase: object
    • insufficientDiamonds: string
    • essencePacks: object
      • packNotKnown: string
    • perk: object
      • perkAlreadyUnlocked: string
      • unknownPerkId: string
  • recoverAccount: object
    • emailNotConfirmed: string
    • emailNotKnown: string
    • emailSendFailed: string
    • invalidEmail: string
    • recoverTooFastPleaseWait: string
  • register: object
    • invalidPlayerName: string
    • noRecaptchaToken: string
    • playerNameTaken: string
    • recaptchaApiError: string
  • reportBug: object
    • decompressionFailed: string
    • deserializeFailed: string
    • invalidBuffer: string
    • invalidFileCount: string
    • noFilesAttached: string
    • validationFailed: string
  • resolveLobbyToken: object
    • badToken: string
    • tokenNotFoundOrExpired: string
    • versionMismatch: string
  • steamConnect: object
    • steamBadTicket: string
    • steamDoesNotOwnApp: string
    • steamNoUsernameGenerated: string
    • steamVacBanned: string
    • steamVacPublisherBanned: string
  • steamPurchase: object
    • notASteamUser: string
    • steamFinalizeTxnError: string
    • steamInitTxnError: string
  • togglePerk: object
    • perkNotOwned: string
  • unlinkEmail: object
    • alreadyUnlinked: string
  • updateSavegame: object
    • alreadyGameover: string
    • anticheat: string
    • invalidSavegameKey: string
    • metaDoesNotMatch: string
    • olderThanOnServer: string
    • schemaValidationFailed: string
    • tooFarForLateRegister: string
    • tooFarFromCurrentTime: string
    • versionNotSupported: string
  • useRecoveryToken: object
    • invalidEmail: string
    • invalidTokenFormat: string
    • tokenNotFound: string
    • tokenTimedOut: string
  • xsolla: object
    • tokenError: string

Const BOTTOM

BOTTOM: 4 = 4

Let BaseTranslations

BaseTranslations: any = require("../../translations/base.gen")

Const CORDOVA_NOT_FOUND_ERR

CORDOVA_NOT_FOUND_ERR: 1 = 1

Const DESTROY_OBJECT

DESTROY_OBJECT: 2 = 2

Const DISABLE_TRACKING

DISABLE_TRACKING: true = true

Const DISPLAY_SECS

DISPLAY_SECS: 1 = 1

Let DPI

DPI: any = null

Const EXPLOSION_TIME_SECS

EXPLOSION_TIME_SECS: 0.5 = 0.5

Const FILE_NOT_FOUND

FILE_NOT_FOUND: "file_not_found" = "file_not_found"

Const FLUSH_DELAY

FLUSH_DELAY: 2000 = 2000

Const GATE_OFFSET_X

GATE_OFFSET_X: number = globalConfig.halfTileSize

Const GATE_OFFSET_Y

GATE_OFFSET_Y: 2.5 = 2.5

Let GLOBAL_APP

GLOBAL_APP: any = null

Used for the bug reporter, and the click detector which both have no handles to this. It would be nicer to have no globals, but this is the only one. I promise!

type

{Application}

Const GRID_FLAG_BOTTOM

GRID_FLAG_BOTTOM: 2 = 2

Const GRID_FLAG_RIGHT

GRID_FLAG_RIGHT: 1 = 1

Howl

Howl: any

Howler

Howler: any

Const INCREMENTAL_SEARCH

INCREMENTAL_SEARCH: any[] = []

Const INSIDE

INSIDE: 0 = 0

Const IS_DEBUG

IS_DEBUG: boolean = G_IS_DEV && typeof window !== "undefined" &&window.location.port === "3005" &&(window.location.host.indexOf("localhost:") >= 0 ||window.location.host.indexOf("192.168.0.") >= 0) &&window.location.search.indexOf("nodebug") < 0

Const IS_MOBILE

IS_MOBILE: boolean = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent)

Const JSON_parse

JSON_parse: function = JSON.parse.bind(JSON)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const JSON_stringify

JSON_stringify: function = JSON.stringify.bind(JSON)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const KEEP_COUNT

KEEP_COUNT: 60 = 60

Const KEEP_OBJECT

KEEP_OBJECT: 1 = 1

Const LEFT

LEFT: 1 = 1

Const LIFESPAN_MS

LIFESPAN_MS: 450 = 450

Const LOCAL_STORAGE_NO_WRITE_PERMISSION

LOCAL_STORAGE_NO_WRITE_PERMISSION: "local-storage-no-write-permission" = "local-storage-no-write-permission"

Const LOCAL_STORAGE_UNAVAILABLE

LOCAL_STORAGE_UNAVAILABLE: "local-storage-unavailable" = "local-storage-unavailable"

Const LOG_TRACKING

LOG_TRACKING: false = G_IS_DEV && false

Const Loader

Loader: LoaderImpl = new LoaderImpl()

Const MAX_GROUPS_TO_KEEP

MAX_GROUPS_TO_KEEP: 3 = 3

Let MAX_INTERVAL_SECS

MAX_INTERVAL_SECS: number = 25

Const MAX_KEEP_LOG_LINES

MAX_KEEP_LOG_LINES: 20 = 20

Const MAX_MOVE_DISTANCE_PX

MAX_MOVE_DISTANCE_PX: 20 | 40 = IS_MOBILE ? 20 : 40

Let MIN_INTERVAL_SECS

MIN_INTERVAL_SECS: number = 15

Const Math_PI

Math_PI: 3.1415926 = 3.1415926

Const Math_abs

Math_abs: function = Math.abs.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_atan2

Math_atan2: function = Math.atan2.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_ceil

Math_ceil: function = Math.ceil.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_cos

Math_cos: function = Math.cos.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_exp

Math_exp: function = Math.exp.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_floor

Math_floor: function = Math.floor.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_hypot

Math_hypot: function = Math.hypot.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_max

Math_max: function = Math.max.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_min

Math_min: function = Math.min.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_pow

Math_pow: function = Math.pow.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_random

Math_random: function = Math.random.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_round

Math_round: function = Math.round.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_sign

Math_sign: function = Math.sign.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_sin

Math_sin: function = Math.sin.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_sqrt

Math_sqrt: function = Math.sqrt.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const Math_tan

Math_tan: function = Math.tan.bind(Math)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const PERKS

PERKS: Perk[] = [new Perk(m.transporter_collect_graves, { hasVideo: true }),new Perk(m.allow_setting_priority, { hasVideo: true }),new Perk(m.advanced_synchronization, {}),new Perk(m.map_desert, {}),new Perk(m.map_ice, {}),new Perk(m.difficulty_medium, {}),new Perk(m.difficulty_hard, {}),new Perk(m.difficulty_sandbox, {}),new Perk(m.skin_relaxed_basic_zombie, {}),new Perk(m.no_ads, { hidden: true }),]

Const PERK_CATEGORIES

PERK_CATEGORIES: string[] = perkCategories

Const PROMISE_ABORTED

PROMISE_ABORTED: "promise-aborted" = "promise-aborted"

Const PULSE_DURATION

PULSE_DURATION: 0.7 = 0.7

Let QUANTIZIED_CANVAS_CACHE

QUANTIZIED_CANVAS_CACHE: object

Type declaration

Const RANGE_ALL_TIME

RANGE_ALL_TIME: "alltime" = "alltime"

Const RANGE_TODAY

RANGE_TODAY: "today" = "today"

Const RANGE_WEEK

RANGE_WEEK: "week" = "week"

Const RAW_PERKS

RAW_PERKS: object = metaPerks

Type declaration

Const RETRY_DELAY

RETRY_DELAY: 3000 = 3000

Const RIGHT

RIGHT: 2 = 2

Const Rusha

Rusha: any = require("rusha")

Const SPLIT_AFTER

SPLIT_AFTER: 50 = 50

Const STATUS_EXPLODING

STATUS_EXPLODING: "exploding" = "exploding"

Const STATUS_TRAVELLING

STATUS_TRAVELLING: "travelling" = "travelling"

Const STOP_PROPAGATION

STOP_PROPAGATION: "stop_propagation" = "stop_propagation"

Const STORAGE_SIZE_MB

STORAGE_SIZE_MB: 100 = 100

Const STREET_DOWN

STREET_DOWN: 1 = 1

Const STREET_RIGHT

STREET_RIGHT: 2 = 2

Let Sentry

Sentry: any = null
type

{import("@sentry/node")}

Const T

T: any = BaseTranslations

Const TOOLTIP_RESOURCE_ICON_SIZE

TOOLTIP_RESOURCE_ICON_SIZE: 20 = 20

Const TOP

TOP: 8 = 8

Const TRACKING_SEVERITY_ERROR

TRACKING_SEVERITY_ERROR: "error" = "error"

Const TRACKING_SEVERITY_FATAL

TRACKING_SEVERITY_FATAL: "fatal" = "fatal"

Const TRACKING_SEVERITY_INFO

TRACKING_SEVERITY_INFO: "info" = "info"

Const TRACKING_SEVERITY_WARN

TRACKING_SEVERITY_WARN: "warn" = "warn"

Const TRUCK_BASE_SPEED

TRUCK_BASE_SPEED: number = globalConfig.physicsDeltaSeconds *globalConfig.truckTravelSpeed *(globalConfig.tileSize * 0.5)

Const TS

TS: any = T.hud.buildings_category_dialog

Const USER_INTERACT_MOVE

USER_INTERACT_MOVE: "move" = "move"

Const USER_INTERACT_TOUCHEND

USER_INTERACT_TOUCHEND: "touchend" = "touchend"

Const USER_INTERACT_ZOOM

USER_INTERACT_ZOOM: "zoom" = "zoom"

Const WIKI_TYPE_BUILDING

WIKI_TYPE_BUILDING: "building" = "building"

Const WIKI_TYPE_UPGRADE

WIKI_TYPE_UPGRADE: "upgrade" = "upgrade"

Const achievements

achievements: Achievement[] = [new Achievement(m.link_email),new Achievement(m.reach_day_5, new ProgressMaxDay(5)),new Achievement(m.kill_50_zombies, new ProgressKillZombies(50)),new Achievement(m.place_5_buildings, new ProgressBuildingsPlaced(5)),new Achievement(m.reach_level_5, new ProgressLevel(5)),new Achievement(m.enhance_level_25),new Achievement(m.play_15_minutes, new ProgressTimePlayed(15 * 60)),new Achievement(m.play_1_hour, new ProgressTimePlayed(60 * 60)),new Achievement(m.place_50_buildings, new ProgressBuildingsPlaced(50)),new Achievement(m.have_10k_crystals),new Achievement(m.reach_level_15, new ProgressLevel(15)),new Achievement(m.enhance_level_50),new Achievement(m.reach_day_20, new ProgressMaxDay(20)),new Achievement(m.kill_500_zombies, new ProgressKillZombies(500)),new Achievement(m.build_10_transporters),new Achievement(m.place_10_solarpanels_in_desert),new Achievement(m.have_1mio_crystals),new Achievement(m.reach_day_100, new ProgressMaxDay(100)),new Achievement(m.place_500_buildings, new ProgressBuildingsPlaced(500)),new Achievement(m.enhance_level_75),new Achievement(m.reach_day_40_no_walls),new Achievement(m.reach_level_25, new ProgressLevel(25)),new Achievement(m.kill_3500_zombies, new ProgressKillZombies(3500)),new Achievement(m.play_5_hours, new ProgressTimePlayed(5 * 60 * 60)),new Achievement(m.every_building_built),new Achievement(m.reach_day_200, new ProgressMaxDay(420)),new Achievement(m.reach_level_50, new ProgressLevel(50)),new Achievement(m.reach_day_30_cannons_only),new Achievement(m.play_24_hours, new ProgressTimePlayed(24 * 60 * 60)),new Achievement(m.place_3500_buildings, new ProgressBuildingsPlaced(3500)),new Achievement(m.kill_15k_zombies, new ProgressKillZombies(15000)),new Achievement(m.have_1bil_crystals),new Achievement(m.explore_whole_ice_map),new Achievement(m.enhance_level_100),new Achievement(m.reach_level_75, new ProgressLevel(75)),new Achievement(m.reach_day_300, new ProgressMaxDay(1000)),new Achievement(m.place_10k_buildings, new ProgressBuildingsPlaced(10000)),new Achievement(m.kill_100k_zombies, new ProgressKillZombies(100000)),new Achievement(m.enhance_level_125),new Achievement(m.unlocked_all_achievements)]

Const achivementCategories

achivementCategories: string[] = [beginner, easy, advanced, hard, insane]

Let actionUidIndex

actionUidIndex: number = 0

Const additionalGameSounds

additionalGameSounds: any[] = []

Const additionalGameSprites

additionalGameSprites: any[] = []

Const adfree

adfree: "adfree" = "adfree"

Const advanced

advanced: "advanced" = "advanced"

Const aiKey

aiKey: any = sha1(accessNestedPropertyReverse(globalConfig, ["endpoint", "info"]))

Const ajv

ajv: any = new Ajv({allErrors: false,uniqueItems: false,unicode: false,nullable: false})

Const ajvGlobalInstance

ajvGlobalInstance: any = new Ajv({})

Const allApplicationSettings

allApplicationSettings: (EnumSetting | BoolSetting)[] = [// APPnew EnumSetting("graphicsQuality", {options: graphicsQualitiesOrdered,valueGetter: qualityId => qualityId,textGetter: qualityId => T.settings.graphics_qualities[qualityId].title,descGetter: qualityId => T.settings.graphics_qualities[qualityId].desc,category: categoryApp,restartRequired: true,magicValue: "auto-detect"}),new EnumSetting("language", {options: translationMetadata.sort((a, b) => b.progress - a.progress),valueGetter: language => language.code,textGetter: language => language.localName,descGetter: language =>T.common.translation_progress.replace("%amount%",Math_floor(language.progress * 100.0) + "%"),category: categoryApp,restartRequired: true,magicValue: "auto-detect"}),new EnumSetting("uiScale", {options: uiScales.sort((a, b) => a.size - b.size),valueGetter: scale => scale.id,textGetter: scale => T.settings.uiScales[scale.id],category: categoryApp,restartRequired: false,changeCb: (app, id) => app.updateAfterUiScaleChanged()}),new BoolSetting("showKeybindings", categoryApp),// GAMEnew BoolSetting("enableTutorial", categoryGame),new BoolSetting("showBuildingLevels", categoryGame),new BoolSetting("stayInPlacementMode", categoryGame),new BoolSetting("pauseWhileUiOpen", categoryGame),new BoolSetting("showSellConfirmation", categoryGame),new BoolSetting("showWarningOnMissingResources", categoryGame),new BoolSetting("showZombieIndicators", categoryGame),new BoolSetting("automaticPlacementSuggestions", categoryGame),new BoolSetting("showCrystalsDebt", categoryGame),new BoolSetting("showMinimap", categoryGame),new BoolSetting("showFPS", categoryGame),]
type

{Array}

Const allPackets

allPackets: (ClientSimulationResultPacket | ForcedResyncPacket | InitialGameDumpPacket | ValidateAndPerformClientActionPacket | TrackFrameEntryPacket | JoinedMatchingQueuePacket)[] = [PingPacket,PongPacket,LoginPacket,LoginFailurePacket,LoginSuccessPacket,SelectMatchmodePacket,MatchmodeSelectionFailurePacket,JoinedMatchingQueuePacket,LeaveMatchingQueuePacket,LeftMatchingQueuePacket,UnexpectedPacketErrorPacket,BadPacketErrorPacket,ReconnectPacket,ReconnectSuccessPacket,GracefulDisconnectPacket,PotentialMatchFoundPacket,AcceptMatchPacket,MatchAbortedPacket,MatchCreatedJoinGameserverPacket,MatchAbortedBackInMatchmodeSelectPacket,MatchAbortedBackInMatchingQueuePacket,ClientLoadFinishedGetGameDumpPacket,InitialGameDumpPacket,ClientReadyToSimulatePacket,GrantLogicFramePacket,ClientSimulationResultPacket,RequestClientActionPacket,ValidateAndPerformClientActionPacket,GameAbortedDuringLoadPacket,AllPlayersJoinedStartLoadingPacket,ForcedResyncPacket,ClientReadyAfterResyncPacket,ContinueGameAfterResyncPacket,TrackFrameEntryPacket,GameDesyncedPacket,GameoverPacket,SendChatMessagePacket,SyncChatMessagePacket,CreateLobbyPacket,LobbyCreationFailurePacket,LobbyUpdatePacket,JoinLobbyPacket,LobbyJoinFailurePacket,LobbyKickPlayerPacket,LobbyYouGotKickedPacket,SendLobbyChatMessage,SyncLobbyChatMessage,LobbySwapPlayersPacket,LobbyStartGamePacket,]

Const allUpgradeOptions

allUpgradeOptions: UpgradeOptionAllPlus1[] = [// UpgradeOptionOnePlus1,UpgradeOptionOnePlus10,UpgradeOptionAllPlus1,UpgradeOptionBringToSameLevel]

Let app

app: any = null

Const argv

argv: any = require("minimist")(process.argv.slice(2))

Let assertionErrorShown

assertionErrorShown: boolean = false

Const asyncCompressor

asyncCompressor: AsynCompression = new AsynCompression()

Const atlasFiles

atlasFiles: any = require.context("../../../res_built/atlas/", false, /.*\.json/i).keys().map(f => f.replace(/^\.\//gi, "")).map(f => require("../../../res_built/atlas/" + f)).map(data => new AtlasDefinition(data))

Const authSchema

authSchema: object = schemaObject({id: {type: "string",minLength: 1},session: {type: "string",minLength: 40,maxLength: 40,},playername: {type: "string",minLength: 1,maxLength: 32},elo: {type: "integer",minimum: 0},casualElo: {type: "integer",minimum: 0},division: schemaStringEnum(multiplayerConfig.data.divisions),enabledPerks: {type: "array",items: {type: "integer"},maxLength: 256},tokenCreationTime: {type: "number",minimum: 0}})

Type declaration

  • additionalProperties: boolean
  • properties: any
  • required: string[]
  • type: string

Const authSchemaValidator

authSchemaValidator: any = ajvGlobalInstance.compile(authSchema)

Const avgSoundDurationSeconds

avgSoundDurationSeconds: 0.25 = 0.25

Const backendKey

backendKey: any = sha1(globalConfig.info.endpoint)

Const backgroundCanvasRes

backgroundCanvasRes: 8 = 8

Const backgroundCanvasSize

backgroundCanvasSize: number = globalConfig.tileSize - 10

Const badgePadding

badgePadding: -1 = -1

Const badgeSize

badgeSize: 5 = 5

Const barWidth

barWidth: 4 = 4

Const baseExperienceCache

baseExperienceCache: object

Type declaration

Const baseReverseDic

baseReverseDic: object

Type declaration

Let baseSpriteCache

baseSpriteCache: MiniSpriteCache = new MiniSpriteCache({ prefix: "walls/base/" })

Const beginner

beginner: "beginner" = "beginner"

Const bgFps

bgFps: 30 = 30

Const bigReward

bigReward: 5 = 5

Let bitmask

bitmask: number = 1

Const blueprintSpriteAlpha

blueprintSpriteAlpha: 1 = 1

Const borderPaddingPx

borderPaddingPx: number = circleSize / 2 + 14

Const buildableRegionsRects

buildableRegionsRects: object
type

{Object.<string, RegionRect>}

Type declaration

Const buildings

buildings: "buildings" = "buildings"

Const cacheH

cacheH: 10 = 10

Const cacheW

cacheW: 50 = 50

Let cachedBackgroundCanvasByLayout

cachedBackgroundCanvasByLayout: object

Type declaration

Const cachedBadPacketResponse

cachedBadPacketResponse: Uint8Array = new BadPacketErrorPacket().serialize()

Const categories

categories: string[] = ["miners", "factories", "defensive", "others"]

Const categoryApp

categoryApp: "app" = "app"

Const categoryGame

categoryGame: "game" = "game"

Const changelog

changelog: (object | object | object)[] = [{date: "03.10.2019",entries: ["Huge performance improvements when loading games and recomputing (Up to 10 times)"]},{date: "02.10.2019",entries: ["The resource statistics dialog shows now much more details", // https://prnt.sc/pds1qb"You can now chat and report players after a multiplayer game finished", // http://prntscr.com/pdtqjy"You can now click the zombies and crystal storage indicators on the screen borders to focus the camera on them", // https://prnt.sc/pdrqsj"Balancing: The shield tower now requires much more resources at higher levels","Minor ui tweaks","The page should now load faster"]},{date: "30.09.2019",entries: ["Decrease boss zombie damage and health in multiplayer","(hopefully) Fix crash in sandbox when buildings are enhanced to high levels"]},{date: "29.09.2019",entries: ["Added new lasertower upgrades!","Allow to purchase essence","Update translations","Improve page load time","Fix buildings which are not yet researched being shown","Fix cache issues breaking the game"]},{date: "28.09.2019",entries: ["Fix day not updating when the game runs in background","Added language icon to main menu"]},{date: "26.09.2019",entries: ["Fix music overlapping","Balancing: Increase mage zombies damage against walls by 25% and his overall damage by 50%"]},{date: "25.09.2019",entries: ["Fix bug in multiplayer causing most of the desyncs","Add settings to show crystals debt, disable it by default","The pulse zombie boss now removes all shields from your walls to counter the shield generator","Reduce wall health in multiplayer","Update translations"]},{date: "24.09.2019",entries: ["Balancing: Decrease crystals gained from zombies","Balancing: Decrease playerbase damage at higher levels","Fix server rejecting savegames","Fix multiple crashes and errors","Multiplayer: Hopefully fix desync errors by waiting longer after a resync"]},{date: "23.09.2019",entries: ["Balancing: Vastly increase cost of buildings at higher levels","Add shortcut to toggle ui (F2)","Fix crossbow not hitting armored zombies","Fix reactor having broken storage indicators","Added steam standalone (closed beta)"]},{date: "22.09.2019",entries: ["Added iron arrows, steel arrows and uranium arrows, as well as the required upgrades for them!","Added uranium cannon balls!","Added lightning tower upgrades!","Added laser range upgrade!","Added uranium shields upgrade to the shield generator","All factories now have a storage indicator so you can see if they have enough resources!","The storage indicators have been reworked to better show the storage when multiple resources are stored (they now show only the highest, except if its not full, then they fill up with the others - just try it out!)","Rebalance again, since everything was way too cheap","Rebalance waves (change which zombies spawns when)","Fix buildings toolbar sometimes being hidden after deleting a building fast","Fix shieldgenerator consuming way too much resources","Fix crash in multiplayer","Fix rendering bug with invisible zombies","Decrease global health from playerbase"]},{date: "21.09.2019",entries: ["Rebalanced whole game, it might be totally unbalanced now!","Increased level cap to 512","Walls can now be shielded!","Walls now have new artwork at level 50 and 75!","Fix zombies sometimes getting invincible after resync","Vastly reduce transporter build duration","Relax multiplayer spam filter"]},{date: "19.09.2019",entries: ["Fix sandbox games flagged by anticheat","Improve anticheat, flag cheaters internally","LOTS of bugfixes (the sandbox crash still exists tho)","Fixes on the backend and gameservers","Prepare or steam standalone"]},{date: "18.09.2019",entries: ["Fix attempting to reload the page in multiplayer causing to dc, even when clicking abort on the confirmation","Multiplayer: Extend grace period to 4 minutes","Buff wall health by up to 500% on higher levels","Decrease global health granted from playerbase from 45% to 25% again","Properly sync on gameover so the right day is shown in the leaderboard","Fix zombie gravestones not spawned in singleplayer","Multiplayer: Reduce mage zombie health by 30% and its damage by 20%","Multiplayer: Now showing an announcement when the grace period is over","Multiplayer: Automatically choose random map theme for every game"]},{date: "17.09.2019",entries: ["Different powerups! Arrows, Cannons and Crystals, each with 3 different levels","Change delete keybinding from 'DEL' to 'X'","Multiplayer: Allow defense view and resource statistics in multiplayer","Multiplayer: Fixing zombies getting stuck on resources sometimes","Multiplayer: Decrease Mage Zombie damage by 65%","Multiplayer: Increase Mage Zombie damage to walls by 300%","Multiplayer: Increase Wall Health by 50%","Multiplayer: Decrease build duration of all buildings by 20%","Multiplayer: Increase zombie health by 20%","Multiplayer: Increase zombie damage by 10%","Multiplayer: Decrease signal repeater base build duration to 8 seconds and decrease it later by up to 40%","Multiplayer: Increase global health bonus from playerbase from 25% to 45%"]},{date: "15.09.2019",entries: ["Multiplayer: Properly show players playing and players in lobby","Show beta warning","Backend: Improve performance"]},{date: "13.09.2019",entries: ["Multiplayer: Rebalance crystalmines to start at level 12 (so you don't have to upgrade it directly)","Multiplayer: Increase essence gained from 40/minute to 60/minute","Multiplayer: Limit amount of zombie spanwers, you get one in the beginning and then one each 3 minutes","Show info to restart the app after purchasing the no-ads purchase","Lots of internal server improvements, moved to different provider (Now can scale horizontally)","Rate limit server endpoints","Reduce name-change cost","Allow underscore and minus sign in player names","Reduce sawmill upgrade cost"]},{version: [1, 0, 9],entries: ["Bumped app version"]},{date: "11.09.2019",entries: ["Add avertisements in browser version","Implement no-ads purchase","Fix purchasing sandbox and hard mode unlocking each other","Lots of internal server improvements"]},{date: "10.09.2019",entries: ["Integrated XSolla for in app purchases","Added disable ads purchase (Not working yet)","Some css fixes","Fix massive lag in multiplayer"]},{date: "09.09.2019",entries: ["Buff spawner and pulse zombies health","Improve multiplayer network stability","Attempt to redo actions which were cancelled during a resync","Fix pulse zombies and spawner zombies causing a desnyc"]},{date: "08.09.2019",entries: ["Multiplayer: Increase essence gain","Fix ui breaking by tab navigation","Distinguish messages in the all chat with a badge","Warn if not using chrome for the multiplayer","Unify tooltip for all structures, also those with no research","Added background video to main menu","Multiplayer: Vastly increase of zombie factory on higher levels (4+)","Multiplayer: Fix zombies not attacking after desync","Lots of ui fixes","Fix leaderboards not updated properly","Lots of bugfixes"]},{date: "07.09.2019",entries: ["Multiplayer: ELO / Divisions system!"]},{date: "04.09.2019",entries: ["Improved signal repeater connections rendering","Show enemies in minimap on high and extreme graphics quality","Added multiplayer overview","Lots of minor fixes and changes","Fix crash when clicking bug reporter"]},{date: "03.09.2019",entries: ["Debuff zombie spawner level 4 zombies from level 55 to level 50","Added name change purchase"]},{date: "02.09.2019",entries: ["Fix occasional crash when clicking the minimap","Fix resources not always being properly emitted","Multiplayer: Fix lots of network issues, show in chat whos lagging","Multiplayer: Show opponents ping","Multiplayer: Fix sounds and alerts shown for destroyed buildings of opponents","Multiplayer: 2v2: Fixing zombies getting stuck on your allies buildings"]},{date: "01.09.2019",entries: ["Multiplayer: PvP 2v2 mode! (experimental)","Fix zombies bugging through walls","Multiplayer: Increase essence cost of zombie spawner research","Multiplayer: Decrease upgrade costs by 10%","Multiplayer: Decrease signal repeater cost by 30%","Add minimap +/- buttons","Fix minimap dragging","Multiplayer: Fix lots of issues causing desyncs and crashes","Multiplayer: Fix global health enhancement being permanent after resync","You can now press space to center on your playerbase"]},{date: "30.08.2019",entries: ["Added keybinding to upgrade buildings","Multiplayer: Show announcements when spanwing zombies","Multiplayer: Client side action prediction","Multiplayer: Fix enemies disappearing after desync","Multiplayer: Added grace period of 2:30 in which you can't produce zombies","Multiplayer: The river is now always revealed in fog","Multiplayer: Visualize where your zombies are when they are hidden in fog","Multiplayer: Fix buildings not getting destroyed","Improve fog rendering, animate fog on higher graphics qualities","Add first zombie skin","Rebalance achievements and store prices","Further ui improvements"]},{date: "29.08.2019",entries: ["Added chat in multiplayer","Fixed lots of issues in multiplayer","Fixed missing solarpanel translations","Fix laser not working","Fix solarpanels not working in multiplayer","Added bug reporter button in multiplayer"]},{date: "28.08.2019",entries: ["Show health bars in multiplayer","Buff crystal storage in multiplayer, also fix issue that arcs do not spread"]},{date: "27.08.2019",entries: ["Lots of multiplayer fixes, it now runs much more stable","Show cost and duration when placing buildings","Reworked the logo and ui","The leaderboard is now categorized by difficulty as well","Add confirmation when reloading the page while playing","Show warning if building is set to none priority",]},{date: "25.08.2019",entries: ["Added river which divides the map and slows down zombies in multiplayer","Fix desync regarding resource deliveries in multiplayer","Multiplayer should be now more stable, except for zombies","Zombies now jump over their own buildings (e.g. walls) in multiplayer"]},{date: "24.08.2019",entries: ["Lots of multiplayer fixes","Add defense view","Fix game not updating when window has no focus"]},{date: "23.08.2019",entries: ["Rewrote whole multiplayer to be cheat-safe (Now very buggy tho)","Multiplayer: Allow to spawn zombies which attack","Fix offline badge showing up even when not offline"]},{date: "18.07.2019",entries: ["Allow moving the map with the arrow keys","New lightningtower artwork","Do not show 'click to rebuild' if the building is in fog because a signal repeater was destroyed","Fix placement ui being too bright on desert / arctic","Fix spotlight damage radius not being equal to the one shown by the light itself","Fix occasional crashes"]},{date: "18.07.2019",entries: ["You now recieve back 70% of the essence you spent when you sell a building!","Added new spotlight artwork as well as new artwork for its research!","Zombies now look towards the buildings they attack","Improved priority tooltip design, added explanatory dialog","Fix crash when trying to place a building outside of the map","Fix being able to place buildings on the map border","Fix white background in firefox"]},{date: ["17.07.2019"],entries: ["Crystals shown are now computed differently: They take into account how much your blueprints need, so you can actually go in debt now!","When unlocking new buildings, those are shown with a badge in the toolbar until you placed them","Allow to zoom out more","Fix destroy indicators not working and thus zombies not granting crystals","Fix wrong numbers for crystals being shown in the resource statistics","Keybindings: Allow accessing sidebar options from everywhere"]},{date: ["17.07.2019"],entries: ["Buildings not connected to your playerbase network now show a warning sign","Signal repeaters not connected to your playerbase do not work anymore and do only reveal the fog by a bit","Fix global health enhancement not showing up after unlocking","Fix saving not working and thus loosing savegames","Fix resource statistics not properly updating","Fix crash when using laser tower",]},{date: ["15.07.2019"],entries: ["Lots of further performance optimization"]},{date: ["14.07.2019"],entries: ["Added resource overview","Fix equalize levels not always working properly","Improved tutorial and added more steps","Improved unlock text in buildings dialog","Automatically disable tutorial after reaching day 30","Added more tips","Updated translations"]},{date: ["13.07.2019"],entries: ["There is now a tutorial (Lots of more steps are planned, this is more proof of concept)","Reduced lag when saving the game by a lot","Improved rendering performance","Improved ingame settings menu","Added setting to disable automatic placement","The game now continues to run in background"]},{date: ["12.07.2019"],entries: ["Huge performance improvements","Download high resolution textures in background, so you can start playing much faster now, especially with a slow internet connection","Imrpoved ingame settings menu"]},{date: ["11.08.2019"],entries: ["Pulse zombies! They emit pulses which deactivate buildings for a while","Improved blueprint design and progress bars","Lots of performance improvements especially when enhancing buildings","Further balancing, made zombies stronger and upgrades more expensive","Fix upgrade path being rendered wrong on mobile"]},{date: ["10.08.2019"],entries: ["Huge balancing update, almost all numbers have changed","Allow keybindings to pause / resume game while in dialogs / tooltips","Added sounds when enhancing buildings","Experience points are now properly gained in singleplayer","Fixed crash in multiplayer mode","Lots of minor fixes"]},{date: ["09.08.2019"],entries: ["Added spotlight upgrades - It is no longer useless!","Redesign building tooltip to fit better on all resolutions","Fix building tooltip not properly refreshing","Fix zombies getting no damage when saving and loading a game"]},{date: ["08.08.2019"],entries: ["Added fancy gameover animation!","Added setting for the automatic pause when opening the user interface, which is now disabled by default","Added zombie sounds","Add sound when playerbase health is low","Lots of refactorings regarding the hud","Fix splash damage damaging buildings of same faction","Fix levels being rendered too small on android","Fix spotlight rendering","Minor rendering fixes","Update translations"]},{date: ["01.08.2019"],entries: ["Fixed crash when trying to recover your account"]},{version: [1, 0, 8],entries: ["Bumped app version due to lots of changes and a database reset"]},{date: "31.07.2019",entries: ["Added 20 new achievements!","Lots of server side improvements","Improve singleplayer user interface","Fix keyboard detected on mobile devices","Fix buildings dialog closing directly after clicking a building","Fix some issues regarding clicks and touches","Update translations",]},{date: "30.07.2019",entries: ["Refactored singleplayer savegames so you can have multiple savegames!","Full database reset due to the new savegame structure","Added screen shake when playerbase gets attacked",]},{date: "28.07.2019",entries: ["Refactored multiplayer and setup an EU gameserver cluster","Started to rework the mainmenu","Preparations in order to support multiple singleplayer savegames"]},{date: "25.07.2019",entries: ["Added zombie spawner, but right now it doesn't do anything","Added enhancements to the spotlight and increased its damage","Lots of internal refactorings and cleanup to prepare for upcoming updates!"]},{date: "24.07.2019",entries: ["Multiplayer: Enhancing buildings now works and is synchronized","Fix savegames marked as 'offline' by server"]},{date: "23.07.2019",entries: ["Multiplayer: Deleting buildings now works and is synchronized","Multiplayer: Upgrading buildings now works and is synchronized",]},{date: "22.07.2019",entries: ["Multiplayer: You can now place buildings in multiplayer!","Multiplayer: Disallow to open tooltip for non-owned buildings","Multiplayer: Fix unintentional coop behaviour (Buildings connecting)","Multiplayer: Allow destroying blueprints","Multiplayer: Fix tooltip not updating when blueprint transformed into building"]},{date: "20.07.2019",entries: ["Huge internal refactorings in order to support multiplayer","Multiplayer: Now synchronizing and showing bases and your buildable areas"]},{date: "18.07.2019",entries: ["Multiplayer: You can now start a match with a random opponent (But you will only get to the loading screen)","Multiplayer: Automatically refresh player counts in queue in the select matchmode state"]},{date: "17.07.2019",entries: ["Reduce panning animation on desktop","Started to work on multiplayer"]},{date: "15.07.2019",entries: ["Change level colors to be more consistent","Added keybindings so you can choose the building placement location with the arrow keys!","Made the auto-placement for walls smarter, it now uses more diagonal connections","Fix crash regarding keybindings","Improve wall rendering performance and improve the connection logic between walls and buildings","Fig bug when rotating device while the game is loading"]},{date: "14.07.2019",entries: ["There are now keybindings in the desktop version! Later you will be able to configure them","Balancing: Made building enhancements stronger for less costs","Balancing: Decrease exploding zombie damage","Grey out category symbols which are not available","Lots of internal refactorings again","Fixes spikes showing high numbers unformatted","Reduce render resolution on lower graphics qualities, increase it on extreme",]},{date: "13.07.2019",entries: ["Fix crash on game over","Lots of internal refactorings and improvements"]},{date: "12.07.2019",entries: ["Made fast forward free, and added a game speed panel","Lots of internal refactorings, especially regarding touch and mouse handling - please report any bugs you find!","Lots of rendering performance improvements again (Hopefully didn't break anything)","Fix camera panning, again","You can now click the difficulty icon on the top left to show information about it","Update translations"]},{date: "11.07.2019",entries: ["Spawner boss zombie! It attacks with lightning arcs and spawns other zombies!","Add arrowstorage and cannonstorage artwork for higher levels","Show upgraded sprites later: They now change at level 10, 25, 50, 75 and 100","Implement knockback of the crossbow update","Add upgrades to the cannonstorage which makes it store better ammunition","Fix walls connecting to resources not blocking diagonal movement","Fix zombies attacking powerups"]},{date: "11.07.2019",entries: ["Reworked cannon upgrades - It now can be upgraded to a machine gun or a catapult!","Factories and miners now prefer buildings which are closer to them","Improve performance by mergin close travelling resources which are similar","Fix crystal storage indicator not always being shown","Fix app not working on devices with a mouse and touchpen"]},{date: "10.07.2019",entries: ["Invisible zombies! Build and upgrade signal repeaters to reveal them!","Increase all map sizes by 25%","Buildings are now instantly placed in sandbox mode","Now showing a hint on the top if the crystal storage is low health","Fix rendering bug regarding chunks","Artwork: Improved signal repeater sprites","Artwork: Improved sawmill sprites","Artwork: Improved crystal storage sprites"]},{date: "09.07.2019",entries: ["Lots of performance improvements","Add 'none' priority which makes buildings consume no resources anymore","The screen now gets red if the crystal storage reaches low health","Balancing: Reduce zombie health by 25%","Balancing: Reduce mage zombie damage by 40%","Decrease cannon resource usage by 50%","Improve camera panning (experimental)","Show arrow to crystal storage when not in view (similar to zombie indicators)","Fix sandbox games getting rejected by the server","Artwork: New signal repeater connections","Change maximum level to 128 to prevent precision issues"]},{date: "08.07.2019",entries: ["Massive rendering performance improvements","Fix wall diagonal connections"]},{date: "07.07.2019",entries: ["Powerups! Connect them to your base to gain global improvements!","Armored Zombies!","Arrowtowers without the crossbow update can no longer damage armored zombies","The signal repeater upgrades work now!","Storages now emit the resources faster","Improve wall and spikes placement mode (prefer tiles further away from the base)","Fix high number spelling","Fix walls not connecting to resources","Balancing: Build duration on easy is now reduced by 50%, on hard its increased by 30%","Balancing: Increase spike damage, decrease resources used","Update translations","Change ui click sound","Increase forest and desert map size","Do not show 'level up all' and 'bring to same level' if theres only one of that building"]},{date: "07.07.2019",entries: ["Walls now connect diagonally","Rendering performance improvements","Improve error message when no tile is available","Fix bug where walls would not block diagonal movement","Fix 'this tile is already occupied' showing in fog, so you can determine where resources are","Balancing: Zombies now ignore blueprints in easy mode","Balancing: Increase wall health by 200%","Balancing: Buff zombies in early levels","Balancing: Triple zombie health but decrease damage (So they stay alive longer, but do less damage)","Backend: Fix compression error when updating savegame"]},{date: "05.07.2019",entries: ["Reworked arrow tower, it now has supper cool upgrades! (Like crossbow, double shot, etc)","Balancing: Make zombies stronger at later levels","Balancing: Reduce transporter health","Balancing: Reduce global health increasement from the crystal storage","Balancing: Increase wall health"]},{date: "04.07.2019",entries: ["Added 'upgrade all' and 'bring to same level'","Fix invalid translations being accepted","Fix leaderboard showing sandbox games","Fix savegame comparison dialog showing unecessarily","Fix street rendering bug","Fix background rendering bug","Fix zombies pointing away from the structures they attack","Fix very high numbers breaking the ui","Fix numbers showing wrong in blueprint tooltip","Reduce signal repeater cost again","Lots of performance and memory improvements again","Decrease emit interval of buildings to improve performance on higher levels"]},{date: "03.07.2019",entries: ["Lots performance improvements and refactorings, I might have introduced rendering bugs tho, please report them if you find any","Map layouts are now random!","Artwork: New artwork for the desert and arctic map","The fog is no longer transparent, making it more exciting to explore","Update translations","Fix introductory dialog not showing","Fix bug with street rendering","Fix small rendering bug with transporter connections","Interface: Close sidebar on user interaction","Interface: Show reason why a sidebar option is not available","Interface: Added setting to display FPS"]},{date: "02.07.2019",entries: ["Added easter egg","Modified the font to be monospace for digits, so that the numbers don't 'jump' arround","Balancing: Buff mage zombie (+damage, +health)","Update translations","You can now toggle pause with the space key","Internal refactorings"]},{date: "01.07.2019",entries: ["Add sidebar with forward until night option ","Add setting to enable/disable zombie indicators","Decrease zombie damage","Balancing: Do not apply global health to walls","Fix crash when spamming walls","Fix crash when clicking sell building twice very fast","Fix crash when changing a setting and going back","Fix some internal warnings","Fix multi placement aborting when no adjacent spot was found","Fix spotlight not showing low storage","Fix time achievements gained while the game is paused.","Artwork: Add particle when cannonballs hit the ground","Artwork: Improve crystal storage sprite and add some glow","Interface: Improve day/night indicator and show difficulty","Interface: Reduce the duration of the 'achievement unlocked' notification","Interface: Updated main menu background","Interface: Properly scale the ui on desktop browsers"]},{date: "30.06.2019",entries: ["Difficulties now work, the zombies get stronger and the buildings more expensive","The playerbase health bonus now applies with 25% to all buildings (Later this will be an upgrade)","Show health bar in building tooltip","Added Mage zombies","You now have unlimited crystals and heads in sandbox mode","Nerv archer zombie range again","Increase gravestone collector range by 30%","Rebalance building costs and times","Fix bug reporter reporting invalid savegame","Buff zombies on higher levels","Update translations","Add page which lists translation errors (See #announcements in the discord)","Make health upgrades on wall and crystal storage more expensive and scale less","Fix offline indicator showing in the beginning","Fix high amounts of coins and crystals being displayed wrong","Nerv lightning tower by decreasing its range","Fix floorspikes storage indicator","Update difficulty descriptions","Do not show introduction in sandbox mode","Added enhancements to spikes","Increase cannon and arrowtower damage","Fix bug where the health bar would show on full health as well due to precision errors"]},{date: "29.06.2019",entries: ["Fix bug reporter","Update translations","Add chinese (traditional)","Fix some artifacts on image gradients caused by lossy compression in production builds","Fix bug where it stays night"]},{date: "28.06.2019",entries: ["Show nights survived in gameover screen","Update translations","Improve offline indicators","Backend: Fixed crash reports being reported twice","Fix fractional storage on some buildings","You can now click on the offline indicator to find out why your savegame is not synchronized","Improve fog so it shows more clearly which tiles are explored and which not","Increase day duration by 15 seconds","Backend: Add maintenance mode","Added 'Report Bug' button to ingame settings"]},{date: "27.06.2019",entries: ["Fix achievement progress not properly shown","Nerv zombies in lower levels, buff them in higher ones","Increase arrow tower range by 25%","Update translations","Finish german translation"]},{date: "26.06.2019",entries: ["Instead of just stones there are now stones, iron ores, coal ores and uranium ores","Added ui scale setting","Made cannonball storage cheaper","Fixed spelling in preload state","Fixed 'core thread did not respond' error","Fixed bad file content error in some cases","Fixed coins not getting updated in main menu","Backend: Fixed some unstable endpoints","Updated translations","Fixed error animation on some dialogs","New miner connections artwork","New streets artwork","Automatically scroll to unlocked achivements when clicking the notification","Fixed crash if the game is gameover just in the moment where the automatic save happens","Fixed zombies spawning too close to the base"]},{date: "25.06.2019",entries: ["Added changelog and also added some past entries (incomplete)","Fixed coins being called coins in the purchase dialog","Fixed leaderboard ui when playernames are long","Added confirmation dialogs when choosing either the client or server savegame","Show meaningful error codes when the savegame failed to sync","Added cannon storage","Enhance the storage visualizer when a tower can store multiple resources","Added arrow storage","Make solarpanel scale worse, so the reactor gets more relevant at later levels","Remove the damage upgrade from the playerbase, since it was too strong","Update crystalmine artwork"]},{date: "24.06.2019",entries: ["Added nuclear reactor","New arrowfactory artwork","Improved spotlight artwork","Improved lightning tower artwork","Fixed spikes","Unified building costs (Now all cost crystals + one of a resource)","Fixed tooltip fog being too small on desktop","Fixed notch rendering","Improve ui icons in the buildings and resource tooltip"]},{date: "23.06.2019",entries: ["Reduced zombie size","Changed app name to YORG.io 3","Added a dialog to compare savegames when the stored savegame on the server differs","Improved main menu background"]},{version: [1, 0, 7],entries: ["Base app version since changelog was added"]}]

Const charmap

charmap: "!#%&'()*+,-./:;<=>?@[]^_`{|}~¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿABCDEFGHIJKLMNOPQRSTUVWXYZ" = "!#%&'()*+,-./:;<=>?@[]^_`{|}~¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿABCDEFGHIJKLMNOPQRSTUVWXYZ"

Const circleShadowBlur

circleShadowBlur: 6 = 6

Const circleSize

circleSize: 9 = 9

Const circleStrokeWidth

circleStrokeWidth: 3 = 3

Const circularJson

circularJson: any = require("circular-json")

Const classnamesCache

classnamesCache: object

Type declaration

Const clipboardCopy

clipboardCopy: any = require("clipboard-copy")

Const colorCircleBorder

colorCircleBorder: "#111519" = "#111519"

Const colorDisabled

colorDisabled: "#888" = "#888"

Const colorEnabledMain

colorEnabledMain: "#30e0ff" = "#30e0ff"

Const colorEnabledPath1

colorEnabledPath1: "#e08839" = "#e08839"

Const colorEnabledPath2

colorEnabledPath2: "#a3e039" = "#a3e039"

Const colorMayGetEnabled

colorMayGetEnabled: "#eee" = "#eee"

Const consumerPrioritiesOrdered

consumerPrioritiesOrdered: string[] = [enumConsumerPriority.none,enumConsumerPriority.low,enumConsumerPriority.regular,enumConsumerPriority.high,enumConsumerPriority.maximum]

Const cryptPrefix

cryptPrefix: string = String.fromCodePoint(1)

Let currentData

currentData: any = null

Let currentEventsQueue

currentEventsQueue: any[] = []

Let cursor

cursor: any = null

Const data

data: any = require("./uitest/menu.uitest.json")

Const day

day: "day" = "day"

Const desiredMsDelay

desiredMsDelay: number = 1000 / bgFps

Const difficulty

difficulty: "difficulty" = "difficulty"

Const easy

easy: "easy" = "easy"

Const emailValidator

emailValidator: any = require("email-validator")

Const encryptKey

encryptKey: string = globalConfig.info.sgSalt

Const enemySpriteCache

enemySpriteCache: MiniSpriteCache = new MiniSpriteCache({ prefix: "enemies/" })

Const enumBuffs

enumBuffs: object

Type declaration

Const essentialBareGameAtlases

essentialBareGameAtlases: any = atlasDefinitions.qualityPreload

Const essentialBareGameSounds

essentialBareGameSounds: string[] = [SOUNDS.openTooltip,SOUNDS.achievementUnlock,SOUNDS.playerbaseLowHealth,SOUNDS.placeBuilding,SOUNDS.blueprintFinished,SOUNDS.cannonShot,SOUNDS.basicZombieAttackHit,MUSIC.backgroundDay]

Const essentialBareGameSprites

essentialBareGameSprites: any = G_ALL_UI_IMAGES

Const essentialMainMenuSounds

essentialMainMenuSounds: string[] = [SOUNDS.matchFound,MUSIC.mainMenu]

Const essentialMainMenuSprites

essentialMainMenuSprites: any = G_ALL_UI_IMAGES.filter(src => src.startsWith("ui/"))

Const essentialRegisterSounds

essentialRegisterSounds: string[] = [SOUNDS.uiClick,SOUNDS.uiError,SOUNDS.dialogError,SOUNDS.dialogOk,SOUNDS.swishShow,SOUNDS.swishHide]

Const essentialRegisterSprites

essentialRegisterSprites: string[] = ["logo.png","ui/main_bg.lossless.noinline.png","ui/main_bg_square.lossless.noinline.png"]

Let eventGroupsToFlush

eventGroupsToFlush: any[] = []

Const expHelper

expHelper: any = require("../backend/shared/api/experience")

Const explosionSound2Duration

explosionSound2Duration: 2.6 = 2.6

Const explosionSoundDuration

explosionSoundDuration: 2.5 = 2.5

Const explosionTimeSeconds

explosionTimeSeconds: 1.5 = 1.5

Const exponentialGrowth

exponentialGrowth: 1 = 1

Const factions

factions: SingleplayerMetaFaction[] = [new SingleplayerMetaFaction()]

Const flatted

flatted: any = require("flatted")

Const floorSpriteCoordinates

floorSpriteCoordinates: false = false

Let flushTimeout

flushTimeout: any = null

Const freeCanvasList

freeCanvasList: any[] = []

Const fromCharCode

fromCharCode: fromCharCode = String.fromCharCode

Let gBuildingRegistry

gBuildingRegistry: SingletonFactory = new SingletonFactory("building")
type

{SingletonFactoryTemplate}

Let gBuildingsByCategory

gBuildingsByCategory: any = null
type

{Object.<string, Array>}

Let gClientActionRegistry

gClientActionRegistry: Factory = new Factory("clientaction")
type

{FactoryTemplate}

Let gComponentRegistry

gComponentRegistry: Factory = new Factory("component")
type

{FactoryTemplate}

Let gDamageFormRegistry

gDamageFormRegistry: Factory = new Factory("damageform")
type

{FactoryTemplate}

Let gDamageTypeRegistry

gDamageTypeRegistry: Factory = new Factory("damagetype")
type

{FactoryTemplate}

Let gDestroyIndicatorRegistry

gDestroyIndicatorRegistry: Factory = new Factory("destroyindicator")
type

{FactoryTemplate}

Let gDifficultyRegistry

gDifficultyRegistry: SingletonFactory = new SingletonFactory("difficulty")
type

{SingletonFactoryTemplate}

Let gEnemyActionRegistry

gEnemyActionRegistry: Factory = new Factory("enemyaction")
type

{FactoryTemplate}

Let gEnemyBehaviourRegistry

gEnemyBehaviourRegistry: Factory = new Factory("enemybehaviour")
type

{FactoryTemplate}

Let gEnemyRegistry

gEnemyRegistry: SingletonFactory = new SingletonFactory("enemy")
type

{SingletonFactoryTemplate}

Let gFactionRegistry

gFactionRegistry: SingletonFactory = new SingletonFactory("faction")
type

{SingletonFactoryTemplate}

Let gGameSpeedRegistry

gGameSpeedRegistry: Factory = new Factory("gamespeed")
type

{FactoryTemplate}

Let gGraphicsQualityRegistry

gGraphicsQualityRegistry: SingletonFactory = new SingletonFactory("graphicsquality")
type

{SingletonFactoryTemplate}

Let gMapLayoutRegistry

gMapLayoutRegistry: SingletonFactory = new SingletonFactory("map")
type

{SingletonFactoryTemplate}

Let gMapThemeRegistry

gMapThemeRegistry: SingletonFactory = new SingletonFactory("mapTheme")
type

{SingletonFactoryTemplate}

Let gMatchmodeRegistry

gMatchmodeRegistry: SingletonFactory = new SingletonFactory("matchmode")
type

{SingletonFactoryTemplate}

Let gProjectileRegistry

gProjectileRegistry: Factory = new Factory("projectile")
type

{FactoryTemplate}

Let gTargetModeRegistry

gTargetModeRegistry: Factory = new Factory("targetmode")
type

{FactoryTemplate}

Let gTutorialStepRegistry

gTutorialStepRegistry: Factory = new Factory("tutorialstep")
type

{FactoryTemplate}

Const globalConfig

globalConfig: object = configBase

Type declaration

  • allowMinerDiagonal: boolean
  • borderTiles: number
  • gameSpeed: number
  • halfTileSize: number
  • initialZoom: number
  • innerTilesEndX: null
  • innerTilesEndY: null
  • innerTilesStartX: null
  • innerTilesStartY: null
  • maxZoomLevel: number
  • minZoomLevel: number
  • minZoomLevelForGlow: number
  • minZoomLevelForSmoke: number
  • minZoomLevelForTrucks: number
  • newStreetPlacePenaltyCost: number
  • numTilesX: null
  • numTilesY: null
  • physicsDeltaMs: number
  • physicsDeltaSeconds: number
  • physicsUpdateRate: number
  • rendering: object
  • sellReturnRate: number
  • tileSize: number
  • transporterRadiusTiles: number
  • transporterVisionRadius: number
  • truckTravelSpeed: number
  • warmupTimeSecondsFast: number
  • warmupTimeSecondsRegular: number
  • info: object
    • endpoint: string
    • file: string
    • sgSalt: string
  • smoothing: object
    • quality: string
    • smoothArcs: boolean
    • smoothAtlasMipmaps: boolean
    • smoothBlueprints: boolean
    • smoothDestroyIndicators: boolean
    • smoothMainCanvas: boolean
    • smoothNightAnnouncement: boolean
    • smoothRenderingChunkMipmaps: boolean
    • smoothRenderingChunks: boolean
    • smoothWavesCanvas: boolean

Const globalJsonSchemaDefs

globalJsonSchemaDefs: object

Type declaration

Const globalSchemaCache

globalSchemaCache: object

A full schema declaration

typedef

{Object.<string, BaseDataType>} Schema

Type declaration

Const graphScalePxH

graphScalePxH: number = graphScalePxW * 0.6

Const graphScalePxW

graphScalePxW: 80 = 80

Const graphicsQualitiesOrdered

graphicsQualitiesOrdered: string[] = ["low", "medium", "high", "extreme"]

Const growthOutscale

growthOutscale: 0.19 = 0.19

Const h

h: any = multiplayerConfig.mapNumTilesY

Const halfTileSize

halfTileSize: number = globalConfig.halfTileSize

Const hard

hard: "hard" = "hard"

Const hasOwnProperty

hasOwnProperty: hasOwnProperty = Object.prototype.hasOwnProperty

Const hideAfterHudTransformChangeDuration

hideAfterHudTransformChangeDuration: 0.1 = 0.1

Const highReward

highReward: 10 = 10

Const hugeReward

hugeReward: 15 = 15

Const impactCache

impactCache: MiniSpriteCache = new MiniSpriteCache({ prefix: "sprites_lossless/laser_impact_particle_" })

Const implosionTime

implosionTime: number = timeUntilExplodeSecs + 1.4

Const importantComponents

importantComponents: string[] = ["Upgrades", "Enhancements", "ZombieFactory"]

Const inner

inner: any = multiplayerConfig.borderTiles

Const innerH

innerH: number = h - 2 * inner

Const innerW

innerW: number = w - 2 * inner

Const insane

insane: "insane" = "insane"

Let internalIdToAchievement

internalIdToAchievement: object

Type declaration

Let ipcRenderer

ipcRenderer: any = null

Returns the IPC renderer, or null if not within the standalone

returns

Const kbCancel

kbCancel: 27 = 27

Const kbEnter

kbEnter: 13 = 13

Const keepPings

keepPings: 10 = 10

Const keepaliveIntervalMs

keepaliveIntervalMs: 500 = 500

Const keyStrBase64

keyStrBase64: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="

Const keyStrUriSafe

keyStrUriSafe: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$" = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$"

Const keys

keys: any = multiplayerConfig.packing.pack

Let lastCanvas

lastCanvas: any = null
type

{HTMLCanvasElement}

Let lastContext

lastContext: any = null
type

{CanvasRenderingContext2D}

Let lastRecordedTouchdown

lastRecordedTouchdown: any = null

Let lastTick

lastTick: number = 0

Let lastTimestamp

lastTimestamp: number = 0

Let lastTouchElement

lastTouchElement: any = null

Let lastTouches

lastTouches: any = null

Const level

level: "level" = "level"

Const lineShadowBlur

lineShadowBlur: 5 = 5

Const linesWidth

linesWidth: 4 = 4

Const lzString

lzString: any = require("../lzstring")

Const m

m: object = metaAchievements

Type declaration

Const mainExplosionDuration

mainExplosionDuration: 0.9 = 0.9

Const map

map: "map" = "map"

Const mapEntityRadius

mapEntityRadius: number = globalConfig.halfTileSize

Const maxAdditionalActionDelay

maxAdditionalActionDelay: 2 = 2

Const maxConnectAttempts

maxConnectAttempts: 3 = 3

Const maxDtMs

maxDtMs: 1000 = 1000

Const maxOngoingSounds

maxOngoingSounds: 10 = 10

Let maxReconnectDurationSeconds

maxReconnectDurationSeconds: number = 10

Const maxRows

maxRows: 3 = 3

Const maximumDpi

maximumDpi: 3 = 3

Const mediumReward

mediumReward: 3 = 3

Const meta

meta: SingleplayerMetaMatchMode = new SingleplayerMetaMatchMode()

Const metaMapResource

metaMapResource: MetaMapResource = new MetaMapResource()

Const metaPowerUp

metaPowerUp: MetaPowerUp = new MetaPowerUp()

Const minIntervalForParticles

minIntervalForParticles: 0.25 = 0.25

Const minSecondsBetweenSyncs

minSecondsBetweenSyncs: 10 = 10

Const minimumDpi

minimumDpi: 0.25 = 0.25

Const minimumTimeBetweenVideoAdsMs

minimumTimeBetweenVideoAdsMs: number = G_IS_DEV ? 10000 : 15 * 60 * 1000

Const minimumZombieRange

minimumZombieRange: 0.9 = 0.9

Const misc

misc: "misc" = "misc"

Const miscCache

miscCache: MiniSpriteCache = new MiniSpriteCache({ prefix: "", suffix: "" })

Const missingSpriteIds

missingSpriteIds: object

Type declaration

Const multiplayerConfig

multiplayerConfig: any = require("./multiplayer_config.json")

Let nextId

nextId: number = 1

Const niceNumberValues

niceNumberValues: number[] = [0,0.01,0.025,0.05,0.075,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.5,3,3.5,4,4.5,5,6,7,8,9,10,12.5,15,17.5,20,25,30,35,40,45,50,60,70,80,90,100,125,150,175,200,225,250,275,300,350,400,450,500,600,700,800,900,1000,1250,1500,1750,2000,2500,3000,3500,4000,4500,5000,6000,7000,8000,9000,10000]

Const nullGates

nullGates: CachedGatesResult = new CachedGatesResult({})

Const numInOneRow

numInOneRow: 9 = 9

Const numLevels

numLevels: 512 = 512

Const numSteps

numSteps: number = Object.keys(T.preload.status).length

Let oldEventQueueLoaded

oldEventQueueLoaded: boolean = false

Const ongoingClickDetectors

ongoingClickDetectors: any[] = []
type

{Array}

Const options

options: any = queryString.parse(location.search)

Const os

os: any = require("os")

Const packetRegistry

packetRegistry: PacketRegistry = new PacketRegistry()

Let pageHiddenPropName

pageHiddenPropName: any

Let pageVisibilityEventName

pageVisibilityEventName: any

Const particleLifetimeSeconds

particleLifetimeSeconds: 0.1 = 0.1

Let pastLogLines

pastLogLines: any[] = []

Const performanceNow

performanceNow: function = performance.now.bind(performance)

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const perkCategories

perkCategories: string[] = [adfree,skin,singleplayer,map,difficulty,]

Let playbackStartTime

playbackStartTime: number = 0

Const playerbaseRadius

playerbaseRadius: number = globalConfig.halfTileSize + 1

Const playtime

playtime: "playtime" = "playtime"

Const prefabs

prefabs: TutorialStepWaitCrystalmineWorking[] = [TutorialStepPlaceCrystalmine,TutorialStepWaitCrystalmineWorking,TutorialStepPlaceStonemine,TutorialStepPlaceCannonballfactory,TutorialStepPlaceCannon,TutorialStepPlaceOtherCrystalmines,TutorialStepPlaceOtherStonemines,TutorialStepEnhanceCrystalmine,TutorialStepPlaceTransporter,TutorialStepFinalStep]

Const present

present: any = require("present")

Const priorityMultiplicators

priorityMultiplicators: object

Type declaration

Const queryString

queryString: any = require("query-string")

Const radius

radius: 6.5 = 6.5

Const randomNames

randomNames: any = require("../core/namelist.json")

Const recaptchaSiteKey

recaptchaSiteKey: "6LeEu7gUAAAAAKyZYe1cOJUOKtU78RhQpQ7JZuPf" = "6LeEu7gUAAAAAKyZYe1cOJUOKtU78RhQpQ7JZuPf"

Let recieveQueue

recieveQueue: any[] = []

Const reconnectIntervalMs

reconnectIntervalMs: 3000 | 3500 = G_IS_DEV ? 3000 : 3500

Let recordStartTime

recordStartTime: number = 0

Const recordedEvents

recordedEvents: any[] = []

Const registerClickDetectors

registerClickDetectors: boolean = G_IS_DEV && true

Let registerIntervalMs

registerIntervalMs: number = 10000

Const registeredCanvas

registeredCanvas: any[] = []

Let removeReconnectsIntervalSeconds

removeReconnectsIntervalSeconds: number = 1

Const request

request: any = require("request-promise-native")

Const resetDtMs

resetDtMs: 16 = 16

Const resourceIconMiniCache

resourceIconMiniCache: MiniSpriteCache = new MiniSpriteCache({ prefix: "sprites/resource_icons/" })

Const resourceSpriteCache

resourceSpriteCache: MiniSpriteCache = new MiniSpriteCache({prefix: "sprites/resource_containers/"})

Const reverseGameEndReason

reverseGameEndReason: object = reverseMap(enumGameEndReason)

Type declaration

Const reverseKeys

reverseKeys: any = multiplayerConfig.packing.unpack

Const reverseMpDiamondHistoryEntryType

reverseMpDiamondHistoryEntryType: object = reverseMap(enumDiamondHistoryEntryType)

Type declaration

Const reverseMpHistoryEntryType

reverseMpHistoryEntryType: object = reverseMap(enumMpHistoryEntryType)

Type declaration

Const reverseSteamTransactionStatus

reverseSteamTransactionStatus: object = reverseMap(enumSteamTransactionStatus)

Type declaration

Const reverseXSollaTransactionStatus

reverseXSollaTransactionStatus: object = reverseMap(enumXSollaTransactionStatus)

Type declaration

Const riverSlowdown

riverSlowdown: 0.4 = 0.4

Const rusha

rusha: any = require("rusha")

Const safepackPrefix

safepackPrefix: "pack$" = "pack$"

Const salt

salt: any = accessNestedPropertyReverse(globalConfig, ["file", "info"])

Const schema

schema: any = require("./1014-schema.json")

Let sendQueue

sendQueue: any[] = []

Const sgSalt

sgSalt: string = globalConfig.info.sgSalt

Const sharedExperienceModule

sharedExperienceModule: any = require("../backend/shared/api/experience")

Const simResultEnemySchema

simResultEnemySchema: object = schemaObject({id: schemaStringEnum(multiplayerConfig.data.enemies),x: {type: "number",minimum: -1000,maximum: 10000},y: {type: "number",minimum: -1000,maximum: 10000},components: componentsSchema,uid: schemaUid(),faction: schemaStringEnum(multiplayerConfig.data.factions),level: {type: "integer",minimum: 0,maximum: 9999}})

Type declaration

  • additionalProperties: boolean
  • properties: any
  • required: string[]
  • type: string

Const simResultResourceSchema

simResultResourceSchema: object = schemaObject({id: schemaStringEnum(multiplayerConfig.data.resourceType),tile: schemaSerializedTile(),uid: schemaUid(),type: {type: "string",enum: ["resource"]}})

Type declaration

  • additionalProperties: boolean
  • properties: any
  • required: string[]
  • type: string

Const simResultSchema

simResultSchema: object = schemaObject({structures: {type: "array",items: simResultStructureSchema},trucks: {type: "array",items: simResultTruckSchema},enemies: {type: "array",items: simResultEnemySchema}})

Type declaration

  • additionalProperties: boolean
  • properties: any
  • required: string[]
  • type: string

Const simResultStructureSchema

simResultStructureSchema: object = schemaObject({id: schemaStringEnum(multiplayerConfig.data.buildings),tile: schemaSerializedTile(),components: componentsSchema,uid: schemaUid(),type: {type: "string",enum: ["blueprint", "building"]},faction: schemaStringEnum(multiplayerConfig.data.factions)})

Type declaration

  • additionalProperties: boolean
  • properties: any
  • required: string[]
  • type: string

Const simResultTruckSchema

simResultTruckSchema: object = schemaObject({resource: schemaStringEnum(multiplayerConfig.data.resources),amount: {type: "number",minimum: 0},destinationUid: schemaUid(),timeOfDelivery: {type: "number",minimum: 0}})

Type declaration

  • additionalProperties: boolean
  • properties: any
  • required: string[]
  • type: string

Const singleplayer

singleplayer: "singleplayer" = "singleplayer"

Const skin

skin: "skin" = "skin"

Const smallReward

smallReward: 1 = 1

Const smoothCanvas

smoothCanvas: true = true

Const spikeBgCacheByLayout

spikeBgCacheByLayout: object

Type declaration

Const stateRegistry

stateRegistry: StateRegistry = new StateRegistry()

Const statisticsIntervalSeconds

statisticsIntervalSeconds: 3 = 3
typedef

{{ row: Element, tdProduced: Element, tdConsumed: Element, tdBalance: Element, tdStored: Element }} Mapping

Const statsRecomputeIntervalSeconds

statsRecomputeIntervalSeconds: 1 = 1

Const statusFlying

statusFlying: "flying" = "flying"

Const statusOnFloor

statusOnFloor: "on-floor" = "on-floor"

Const supportedProps

supportedProps: string[] = ["health"]

Const supportedProviders

supportedProviders: string[] = [decodeHashedString("DYewxghsAWIM4Bcg"), // localhostdecodeHashedString("J4ewTg5gzAdAliIA"), // yorg3.iodecodeHashedString("EYUwLghgdAng9gJwOYGYoEs5A"), // beta.yorg3.iodecodeHashedString("DYSwbgpgdAng9gJwOYGYojkA") // live.yorg3.io]

Const targetModeRadiusSubstractWS

targetModeRadiusSubstractWS: 7 = 7

Const tileSize

tileSize: number = globalConfig.tileSize

Const timeOnFloor

timeOnFloor: 1 = 1

Const timeUntilExplodeSecs

timeUntilExplodeSecs: 2.7 = 2.7

Let topSpriteCache

topSpriteCache: MiniSpriteCache = new MiniSpriteCache({ prefix: "walls/" })

Const totalDurationSecs

totalDurationSecs: number = implosionTime + 0.2

Let touchStartPos

touchStartPos: any = null

Let trackingContext

trackingContext: any = null

Const translationMetadata

translationMetadata: any = require("../../translations/meta.gen")

Const trim

trim: any = require("trim")

Const uWS

uWS: any = require("uWebSockets.js")

Const uiScales

uiScales: object[] = [{id: "super_small",size: 0.6},{id: "small",size: 0.8},{id: "regular",size: 1},{id: "large",size: 1.2},{id: "huge",size: 1.4}]

Const uidKey

uidKey: "__object_pool_uid" = "__object_pool_uid"

Let userHintNotBraveShown

userHintNotBraveShown: boolean = false

Const userProfileSchema

userProfileSchema: object = schemaObject({version: {enum: [1013]},player: schemaObject({name: {type: "string",minLength: 3,maxLength: 64},exp: {type: "integer",minimum: 0},diamonds: {type: "integer",minimum: 0},globalRank: {type: "integer",minimum: 0},stats: schemaObject({buildingsPlaced: {type: "integer",minimum: 0},gamesStarted: {type: "integer",minimum: 0},maxDayReached: {type: "integer",minimum: 0},totalSecondsPlayed: {type: "integer",minimum: 0},zombiesKilled: {type: "integer",minimum: 0}}),soundsMuted: { type: "boolean" },musicMuted: { type: "boolean" },unlockedAchievements: {type: "array",items: {type: "integer",minimum: 0}},unlockedPerks: {type: "array",items: {type: "integer",minimum: 0}},enabledPerks: {type: "array",items: {type: "integer",minimum: 0}},emailLink: schemaObject({email: {type: ["string", "null"],minLength: 5},linkTime: {type: ["number", "null"],minimum: 0}}),freeCoins: schemaObject({discord: { type: "boolean" },twitter: { type: "boolean" },reddit: { type: "boolean" },youtube: { type: "boolean" },facebook: { type: "boolean" },})}),apiAuthKey: {type: ["string", "null"],minLength: 40,maxLength: 40}})

Type declaration

  • additionalProperties: boolean
  • properties: any
  • required: string[]
  • type: string

Const userProfileSchemaValidator

userProfileSchemaValidator: any = ajv.compile(userProfileSchema)

Const validators

validators: object

Type declaration

Const velocityFade

velocityFade: 0.98 = 0.98

Const velocityMax

velocityMax: 20 = 20

Const velocitySmoothing

velocitySmoothing: 0.5 = 0.5

Const velocityStrength

velocityStrength: 0.4 = 0.4

Const w

w: any = multiplayerConfig.mapNumTilesX

Const wallAdditionalOffset

wallAdditionalOffset: number = mapEntityRadius

Const wallAdditionalRadius

wallAdditionalRadius: 18 = 18

Const wavesData

wavesData: (object | object | object | object | object | object | object | object | object | object | object | object)[] = [// Day number is line number - 10{ basic: 3 },{ basic: 4 },{ basic: 5 },{ basic: 7 },{ basic: 0, archer: 2 },{ basic: 7 },{ basic: 0, archer: 5 },{ basic: 6 },{ basic: 7 },{ basic: 7, archer: 2 },{ basic: 8 },{ basic: 5, axe: 2 },{ basic: 9 },{ basic: 1, axe: 6 },{ basic: 10 },{ basic: 8, exploding: 2 },{ basic: 9 },{ basic: 1, axe: 8 },{ basic: 14 },{ basic: 2, archer: 10 },{ basic: 6 },{ basic: 18 },{ basic: 15 },{ basic: 18 },{ basic: 4, axe: 6, archer: 10 },{ basic: 19 },{ basic: 19 },{ basic: 19, invisible: 1 },{ basic: 23 },{ basic: 15, invisible: 2 },{ basic: 23 },{ basic: 23 },{ basic: 0, invisible: 10 },{ basic: 10 },{ basic: 10 },{ basic: 10, exploding: 5 },{ basic: 8 },{ basic: 0, exploding: 10 },{ basic: 8 },{ basic: 25 },{ basic: 0, armored_axe: 3 },{ basic: 25 },{ basic: 0, armored_axe: 10 },{ basic: 15 },{ basic: 15 },{ basic: 20 },{ basic: 3, mage: 2 },{ basic: 15 },{ basic: 15 },{ basic: 0, mage: 4 },{ basic: 4 },{ basic: 15, archer: 20 },{ basic: 15 },{ basic: 10, axe: 10 },{ basic: 15 },{ basic: 10, archer: 20, exploding: 3 },{ basic: 15 },{ basic: 10, armored_axe: 12 },{ basic: 15 },{ basic: 15 },{ basic: 15 },{ basic: 5, exploding: 12 },{ basic: 15 },{ basic: 3 },{ basic: 0, spawner_boss: 1 },{ basic: 3 },{ basic: 5 },{ basic: 9 },{ basic: 0, invisible: 5 },{ basic: 0, invisible: 25 },{ basic: 10 },{ basic: 10, armored_axe: 12 },{ basic: 15 },{ basic: 5, archer: 25 },{ basic: 5, archer: 25 },{ basic: 5 },{ basic: 5 },{ basic: 5 },{ basic: 5, pulse_boss: 1 },{ basic: 5 },{ basic: 15 },{ basic: 25 },{ basic: 5, mage: 10 },{ basic: 25 },{ basic: 25 },{ basic: 3, axe: 3, armored_axe: 3, archer: 3, invisible: 3, exploding: 3 },// { basic: 3, axe: 0, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 4, axe: 0, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 4, axe: 0, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 0, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 0, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 1, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 1, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 2, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 0, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 1 },// { basic: 5, axe: 2, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 2, armored_axe: 0, archer: 0, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 1, armored_axe: 0, archer: 1, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 1, armored_axe: 0, archer: 1, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 2, armored_axe: 1, archer: 1, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 2, armored_axe: 1, archer: 1, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 2, armored_axe: 0, archer: 2, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 2, armored_axe: 0, archer: 2, invisible: 0, exploding: 0, mage: 0 },// { basic: 5, axe: 1, armored_axe: 0, archer: 1, invisible: 1, exploding: 1, mage: 0 },// { basic: 4, axe: 1, armored_axe: 1, archer: 1, invisible: 0, exploding: 1, mage: 0, spawner_boss: 1 },// { basic: 5, axe: 1, armored_axe: 0, archer: 1, invisible: 1, exploding: 1, mage: 0 },// { basic: 5, axe: 2, armored_axe: 0, archer: 1, invisible: 0, exploding: 2, mage: 0 },// { basic: 5, axe: 2, armored_axe: 0, archer: 1, invisible: 0, exploding: 2, mage: 0 },// { basic: 5, axe: 2, armored_axe: 0, archer: 2, invisible: 0, exploding: 2, mage: 0 },// { basic: 5, axe: 2, armored_axe: 0, archer: 2, invisible: 0, exploding: 2, mage: 0 },// { basic: 5, axe: 2, armored_axe: 1, archer: 2, invisible: 2, exploding: 3, mage: 0 },// { basic: 5, axe: 2, armored_axe: 1, archer: 2, invisible: 3, exploding: 3, mage: 0 },// { basic: 5, axe: 3, armored_axe: 0, archer: 2, invisible: 0, exploding: 3, mage: 0 },// { basic: 5, axe: 3, armored_axe: 0, archer: 2, invisible: 0, exploding: 3, mage: 0 },// { basic: 5, axe: 3, armored_axe: 1, archer: 3, invisible: 5, exploding: 3, mage: 1 },// { basic: 5, axe: 3, armored_axe: 1, archer: 3, invisible: 12, exploding: 3, mage: 0 },// { basic: 3, axe: 1, armored_axe: 0, archer: 1, invisible: 0, exploding: 0, mage: 1 },// { basic: 3, axe: 1, armored_axe: 0, archer: 1, invisible: 0, exploding: 0, mage: 0 },// { basic: 1, axe: 1, armored_axe: 0, archer: 2, invisible: 9, exploding: 1, mage: 0 },// { basic: 1, axe: 1, armored_axe: 0, archer: 2, invisible: 9, exploding: 1, mage: 1 },// { basic: 3, axe: 1, armored_axe: 3, archer: 2, invisible: 0, exploding: 2, mage: 0 },// { basic: 3, axe: 1, armored_axe: 3, archer: 2, invisible: 0, exploding: 2, mage: 0 },// { basic: 5, axe: 2, armored_axe: 1, archer: 4, invisible: 0, exploding: 3, mage: 1 },// { basic: 5, axe: 2, armored_axe: 1, archer: 4, invisible: 0, exploding: 3, mage: 0 },// { basic: 3, axe: 2, armored_axe: 1, archer: 2, invisible: 0, exploding: 1, mage: 0, pulse_boss: 1 },// { basic: 5, axe: 2, armored_axe: 1, archer: 4, invisible: 0, exploding: 3, mage: 0 },// { basic: 5, axe: 2, armored_axe: 1, archer: 4, invisible: 0, exploding: 3, mage: 1 }]

Const workCanvasSize

workCanvasSize: 512 = 512

Const zombieBaseDamageMultiply

zombieBaseDamageMultiply: 0.45 = 0.45

Const zombieBaseHealthMultiply

zombieBaseHealthMultiply: 3 = 3

Const zombieLevelOffset

zombieLevelOffset: 250 = 250

Const zombieStatGrowth

zombieStatGrowth: 1.35 = 1.35

Const zombieToSpawn

zombieToSpawn: MetaMageZombie = MetaMageZombie

Const zombies

zombies: "zombie_kills" = "zombie_kills"

Functions

Mash

  • Mash(): (Anonymous function)
  • Returns (Anonymous function)

Math_degrees

  • Math_degrees(radians: any): number
  • Parameters

    • radians: any

    Returns number

Math_radians

  • Math_radians(degrees: any): number
  • Parameters

    • degrees: any

    Returns number

_compress

  • _compress(uncompressed: any, bitsPerChar: any, getCharFromInt: any): string
  • Parameters

    • uncompressed: any
    • bitsPerChar: any
    • getCharFromInt: any

    Returns string

_decompress

  • _decompress(length: any, resetValue: any, getNextValue: any): string
  • Parameters

    • length: any
    • resetValue: any
    • getNextValue: any

    Returns string

accessNestedPropertyReverse

  • accessNestedPropertyReverse(obj: any, keys: any): any
  • Access an object in a very annoying way, used for obsfuscation.

    Parameters

    • obj: any
    • keys: any

    Returns any

addPropertyToSchemaObject

  • addPropertyToSchemaObject(schema: any, id: any, data: any): any
  • Parameters

    • schema: any
    • id: any
    • data: any

    Returns any

angleToSpriteIndex

  • angleToSpriteIndex(offset: any, inverse?: boolean): number
  • Converts a direction into a index from 0 .. 7, used for miners, zombies etc which have 8 sprites

    Parameters

    • offset: any

      direction

    • Default value inverse: boolean = false

      if inverse, the direction is reversed

    Returns number

    in range [0, 7]

arrayDelete

  • arrayDelete(array: any, index: any): void
  • Deletes from an array at the given index

    Parameters

    • array: any
    • index: any

    Returns void

arrayDeleteValue

  • arrayDeleteValue(array: any, value: any): any
  • Deletes the given value from an array

    Parameters

    • array: any
    • value: any

    Returns any

artificialDelayedPromise

  • artificialDelayedPromise(promise: any, minTimeMs?: number): any
  • Delayes a promise so that it will resolve after a minimum amount of time only

    Parameters

    • promise: any

      The promise to delay

    • Default value minTimeMs: number = 500

      The time to make it run at least

    Returns any

    The delayed promise

assert

  • assert(cond: any, ...args: any[]): void
  • Parameters

    • cond: any
    • Rest ...args: any[]

    Returns void

autoDetectLanguage

  • autoDetectLanguage(): any
  • Returns any

bootApp

  • bootApp(): void
  • Returns void

buildRawLogStringAndPayload

  • buildRawLogStringAndPayload(context: any, args: any): object
  • Parameters

    • context: any
    • args: any

    Returns object

    • params: object
      • context: string
    • rawString: string

cachebust

  • cachebust(path: any): any
  • Generates a cachebuster string. This only modifies the path in the browser version

    Parameters

    • path: any

    Returns any

catchErrors

  • catchErrors(message: any, source: any, lineno: any, colno: any, error: any): boolean
  • Parameters

    • message: any
    • source: any
    • lineno: any
    • colno: any
    • error: any

    Returns boolean

checkConsumerFitsEmitter

  • checkConsumerFitsEmitter(consumerBuilding: any, emitterBuilding: any): any
  • Checks if consumer -> emitter works

    Parameters

    • consumerBuilding: any
    • emitterBuilding: any

    Returns any

checkEmitterFitsConsumer

  • checkEmitterFitsConsumer(emitterBuilding: any, consumerBuilding: any): any
  • Checks if emitter -> consumer works

    Parameters

    • emitterBuilding: any
    • consumerBuilding: any

    Returns any

checkTimerExpired

  • checkTimerExpired(now: any, lastTick: any, tickRate: any): boolean
  • Safe check to check if a timer is expired. quantizes numbers

    Parameters

    • now: any

      Current time

    • lastTick: any

      Last tick of the timer

    • tickRate: any

      Interval of the timer

    Returns boolean

clamp

  • clamp(v: any, minimum?: number, maximum?: number): number
  • Clamps a value between [min, max]

    Parameters

    • v: any
    • Default value minimum: number = 0

      Default 0

    • Default value maximum: number = 1

      Default 1

    Returns number

clear2DArray

  • clear2DArray(array: any, w: any, h: any, filler: any): void
  • Clears a given 2D array with the given fill method

    Parameters

    • array: any
    • w: any

      Width

    • h: any

      Height

    • filler: any

      Either Fill method, which should return the content for each cell, or static content

    Returns void

Let clearAllocations

  • clearAllocations(): void
  • Returns void

Let clearFrameTimers

  • clearFrameTimers(): void
  • Returns void

cloneObject

  • cloneObject(obj: any): any
  • Clones an object

    Parameters

    • obj: any

    Returns any

compress

  • compress(uncompressed: any): string
  • Parameters

    • uncompressed: any

    Returns string

compressInt

  • compressInt(i: any): string
  • Compresses an integer into a tight string representation

    Parameters

    • i: any

    Returns string

compressToBase64

  • compressToBase64(input: any): string
  • Parameters

    • input: any

    Returns string

compressToUTF16

  • compressToUTF16(input: any): string
  • Parameters

    • input: any

    Returns string

compressU8

  • compressU8(uncompressed: any): Uint8Array
  • Parameters

    • uncompressed: any

    Returns Uint8Array

compressU8WHeader

  • compressU8WHeader(uncompressed: any, header: any): Uint8Array
  • Parameters

    • uncompressed: any
    • header: any

    Returns Uint8Array

compressWithChecksum

  • compressWithChecksum(object: any): string
  • Parameters

    • object: any

    Returns string

compressX64

  • compressX64(input: any): string
  • Parameters

    • input: any

    Returns string

computeOutCode

  • computeOutCode(x: any, y: any, xmin: any, xmax: any, ymin: any, ymax: any): number
  • Parameters

    • x: any
    • y: any
    • xmin: any
    • xmax: any
    • ymin: any
    • ymax: any

    Returns number

consumeNext

  • consumeNext(): void
  • Returns void

createDump

  • createDump(app: any, root: any, reason?: any): object
  • Tries to extract as much data as possible from the game root

    Parameters

    • app: any
    • root: any
    • Default value reason: any = null

    Returns object

    • canvasData: null
    • currentSavegame: null
    • pastLogLines: any[]
    • reason: any
    • root: any

debug

  • debug(context: any, ...args: any[]): void
  • Parameters

    • context: any
    • Rest ...args: any[]

    Returns void

decodeHashedString

  • decodeHashedString(s: any): string
  • Parameters

    • s: any

    Returns string

decompress

  • decompress(compressed: any): string
  • Parameters

    • compressed: any

    Returns string

decompressFromBase64

  • decompressFromBase64(input: any): string
  • Parameters

    • input: any

    Returns string

decompressFromUTF16

  • decompressFromUTF16(compressed: any): string
  • Parameters

    • compressed: any

    Returns string

decompressInt

  • decompressInt(s: any): number
  • Decompresses an integer from its tight string representation

    Parameters

    • s: any

    Returns number

decompressU8WHeader

  • decompressU8WHeader(compressed: any): string
  • Parameters

    • compressed: any

    Returns string

decompressWithChecksum

  • decompressWithChecksum(binary: any): any
  • Parameters

    • binary: any

    Returns any

decompressX64

  • decompressX64(input: any): string
  • Parameters

    • input: any

    Returns string

deserializeSchema

  • deserializeSchema(obj: any, schema: any, data: any, baseclassErrorResult?: any): any
  • Deserializes data into an object

    Parameters

    • obj: any

      The object to store the deserialized data into

    • schema: any

      The schema to use

    • data: any

      The serialized data

    • Default value baseclassErrorResult: any = null

      Convenience, if this is a string error code, do nothing and return it

    Returns any

    String error code or nothing on success

detectOptimalGraphicsQuality

  • detectOptimalGraphicsQuality(): any
  • Returns any

disableImageSmoothing

  • disableImageSmoothing(context: any): void
  • Disables image smoothing on a context

    Parameters

    • context: any

    Returns void

drawLineFast

  • drawLineFast(context: any, __namedParameters: object): void
  • Parameters

    • context: any
    • __namedParameters: object
      • color: any
      • lineSize: number
      • x1: any
      • x2: any
      • y1: any
      • y2: any

    Returns void

drawLineFastClipped

  • drawLineFastClipped(context: any, rect: any, __namedParameters: object): void
  • Parameters

    • context: any
    • rect: any
    • __namedParameters: object
      • color: any
      • lineSize: number
      • x0: any
      • x1: any
      • y0: any
      • y1: any

    Returns void

drawRotatedSprite

  • drawRotatedSprite(__namedParameters: object): void
  • Parameters

    • __namedParameters: object
      • angle: any
      • offsetX: number
      • offsetY: number
      • parameters: any
      • size: any
      • sprite: any
      • x: any
      • y: any

    Returns void

enableImageSmoothing

  • enableImageSmoothing(context: any): void
  • Enables images smoothing on a context

    Parameters

    • context: any

    Returns void

Let enterProfilingScope

  • enterProfilingScope(scope: any): void
  • Parameters

    • scope: any

    Returns void

epsilonCompare

  • epsilonCompare(a: any, b: any, epsilon?: number): boolean
  • Compare two floats for epsilon equality

    Parameters

    • a: any
    • b: any
    • Default value epsilon: number = 0.00001

    Returns boolean

epsilonIsZero

  • epsilonIsZero(a: any): boolean
  • Compare a float for epsilon equal to 0

    Parameters

    • a: any

    Returns boolean

error

  • error(context: any, ...args: any[]): void
  • Parameters

    • context: any
    • Rest ...args: any[]

    Returns void

expontialDecayedPow

  • expontialDecayedPow(growth: any, level: any): number
  • Parameters

    • growth: any
    • level: any

    Returns number

extendSchema

  • extendSchema(base: any, newOne: any): any
  • Extends a schema by adding the properties from the new schema to the existing base schema

    Parameters

    • base: any
    • newOne: any

    Returns any

extractHandleContext

  • extractHandleContext(handle: any): string
  • Parameters

    • handle: any

    Returns string

fastArrayDelete

  • fastArrayDelete(array: any, index: any): void
  • Deletes from an array by swapping with the last element

    Parameters

    • array: any
    • index: any

    Returns void

fastArrayDeleteValue

  • fastArrayDeleteValue(array: any, value: any): any
  • Deletes from an array by swapping with the last element. Searches for the value in the array first

    Parameters

    • array: any
    • value: any

    Returns any

fastArrayDeleteValueIfContained

  • fastArrayDeleteValueIfContained(array: any, value: any): any
  • see

    fastArrayDeleteValue

    Parameters

    • array: any
    • value: any

    Returns any

fetchLocalTranslations

  • fetchLocalTranslations(languageCode: any): Promise<void> | Promise<Object>
  • Parameters

    • languageCode: any

    Returns Promise<void> | Promise<Object>

findNiceIntegerValue

  • findNiceIntegerValue(num: any): number
  • Finds a nice integer value

    see

    findNiceValue

    Parameters

    • num: any

    Returns number

findNiceValue

  • findNiceValue(num: any): any
  • Finds a value which is nice to display, e.g. 15669 -> 15000. Also handles fractional stuff

    Parameters

    • num: any

    Returns any

formatBigNumber

  • formatBigNumber(num: any, divider?: any): string
  • Formats a big number

    Parameters

    • num: any
    • Default value divider: any = T.common.number_format.divider_thousands || " "

      THe divider for numbers like 50,000 (divider=',')

    Returns string

formatBigNumberFull

  • formatBigNumberFull(num: any, divider?: any): string
  • Formats a big number, but does not add any suffix and instead uses its full representation

    Parameters

    • num: any
    • Default value divider: any = T.common.number_format.divider_thousands || " "

      THe divider for numbers like 50,000 (divider=',')

    Returns string

formatComponents

  • formatComponents(components: any): string
  • Parameters

    • components: any

    Returns string

formatPriceHTML

  • formatPriceHTML(price: any, iconSize: any, root?: any): string
  • Parameters

    • price: any

      E.g. { head: 32, crystal: 10 }

    • iconSize: any
    • Default value root: any = null

    Returns string

formatSeconds

  • formatSeconds(secs: any): any
  • Formats seconds into a readable string like "5h 23m"

    Parameters

    • secs: any

      Seconds

    Returns any

formatSecondsToTimeAgo

  • formatSecondsToTimeAgo(secs: any): any
  • Formats an amount of seconds into something like "5s ago"

    Parameters

    • secs: any

      Seconds

    Returns any

formatSensitive

  • formatSensitive(key: any): string
  • Formats a sensitive token by only displaying the first digits of it. Use for stuff like savegame keys etc which should not appear in the log.

    Parameters

    • key: any

    Returns string

formatSimulationResult

  • formatSimulationResult(dump: any, indent?: string): string
  • Parameters

    • dump: any
    • Default value indent: string = ""

    Returns string

freeCanvas

  • freeCanvas(canvas: any): void
  • Frees a canvas

    Parameters

    • canvas: any

    Returns void

generateSavegameSchema

  • generateSavegameSchema(): void
  • Returns void

generateSelector

  • generateSelector(element: any): string
  • Generates a selector

    Parameters

    • element: any

    Returns string

generateSimulationResult

  • generateSimulationResult(root: any): object
  • Parameters

    • root: any

    Returns object

    • enemies: any[]
    • structures: any[]
    • trucks: any

getAchievementById

  • Parameters

    • id: any

    Returns Achievement

getAchievementByInternalId

  • getAchievementByInternalId(internalId: any): Achievement
  • Parameters

    • internalId: any

    Returns Achievement

Let getAllocations

  • getAllocations(): object
  • Returns object

getApplicationSettingById

getBackendKey

  • getBackendKey(): any
  • Returns any

getBadgedHTML

  • getBadgedHTML(content: any): string
  • Returns the html to render a badge

    Parameters

    • content: any

    Returns string

getBalancingForDifficulty

  • getBalancingForDifficulty(difficulty: any): object
  • Parameters

    • difficulty: any

    Returns object

    • baseExponentialGrowth: number
    • baseGrowthOutscale: number
    • crystalmine: object
      • speed: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • essenceGainPerMinute: number
    • enemyCrystalReward: function
      • enemyCrystalReward(level: any): number
      • Parameters

        • level: any

        Returns number

    • arrowTower: object
      • damage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • arrowfactory: object
      • capacity: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • arrowstorage: object
      • storage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • cannon: object
      • damage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • cannonballfactory: object
      • capacity: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • cannonstorage: object
      • storage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • coalmine: object
      • speed: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • ironmine: object
      • speed: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • laserTower: object
      • damage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • lightningTower: object
      • damage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • playerbase: object
      • damage: object
        • base: number
        • growth: number
      • health: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • powerstorage: object
      • storage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • reactor: object
      • capacity: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • resourcestorage: object
      • storage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • sawmill: object
      • speed: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • shieldgenerator: object
      • speed: object
        • baseCost: number
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • solarpanels: object
      • speed: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • spikes: object
      • damage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • spotlight: object
      • damage: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • steelfactory: object
      • capacity: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • stonemine: object
      • speed: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • transporter: object
      • costGrowth: number
      • costMultiplier: number
      • durationGrowth: number
    • uraniummine: object
      • speed: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • wall: object
      • health: object
        • baseCost: any
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • zombiefactory: object
      • spawnlevel: object
        • baseCost: number
        • baseValue: number
        • costGrowth: number
        • valueGrowth: number
    • zombies: object
      • archer: function
        • archer(level: any): object
        • Parameters

          • level: any

          Returns object

          • attackInterval: number
          • damage: any
          • health: any
          • range: number
          • speed: number
      • armored_axe: function
        • armored_axe(level: any): object
        • Parameters

          • level: any

          Returns object

          • attackInterval: number
          • damage: any
          • health: any
          • range: number
          • speed: number
      • axe: function
        • axe(level: any): object
        • Parameters

          • level: any

          Returns object

          • attackInterval: number
          • damage: any
          • health: any
          • range: number
          • speed: number
      • basic: function
        • basic(level: any): object
        • Parameters

          • level: any

          Returns object

          • attackInterval: number
          • damage: any
          • health: any
          • range: number
          • speed: number
      • exploding: function
        • exploding(level: any): object
        • Parameters

          • level: any

          Returns object

          • damage: any
          • health: any
          • range: number
          • speed: number
      • invisible: function
        • invisible(level: any): object
        • Parameters

          • level: any

          Returns object

          • attackInterval: number
          • damage: any
          • health: any
          • range: number
          • speed: number
      • mage: function
        • mage(level: any): object
        • Parameters

          • level: any

          Returns object

          • attackInterval: number
          • damage: any
          • health: any
          • maxSplitTargets: number
          • range: number
          • speed: number
          • splitRange: number
          • splits: number
      • pulseZombie: function
        • pulseZombie(level: any): object
        • Parameters

          • level: any

          Returns object

          • health: any
          • maxSplitTargets: number
          • pulseInterval: number
          • range: number
          • spawnInterval: number
          • speed: number
          • splitRange: number
          • splits: number
          • stunDuration: number
          • stunRadius: number
      • spawnerBossZombie: function
        • spawnerBossZombie(level: any): object
        • Parameters

          • level: any

          Returns object

          • attackInterval: number
          • damage: any
          • health: any
          • maxSplitTargets: number
          • range: number
          • spawnInterval: number
          • speed: number
          • splitRange: number
          • splits: number

getBaseValue

  • getBaseValue(alphabet: any, character: any): any
  • Parameters

    • alphabet: any
    • character: any

    Returns any

getBrowserInfo

  • getBrowserInfo(): object
  • Returns object

    • dpi: any
    • languages: any[]
    • userAgent: string
    • viewport: object
      • screen: object
        • h: number
        • w: number
      • window: object
        • h: number
        • w: number

getBuildId

  • getBuildId(): string
  • Returns the build id

    Returns string

getBuildingIconHTML

  • getBuildingIconHTML(buildingId: any, size: any): string
  • Returns the html to render an icon for the given building

    Parameters

    • buildingId: any
    • size: any

    Returns string

Let getCurrentAllocationScopeId

  • getCurrentAllocationScopeId(): string
  • Returns string

getDeviceDPI

  • getDeviceDPI(): any
  • Returns the current dpi

    Returns any

getDeviceInfo

  • getDeviceInfo(): object
  • Returns object

    • device: object
      • cordova: any
      • isVirtual: any
      • manufacturer: any
      • model: any
      • platform: any
      • serial: any
      • uuid: any
      • version: any
    • platform: string

getEnvironmentId

  • getEnvironmentId(): string
  • Returns the environment id (dev, prod, etc)

    Returns string

getExperienceForLevel

  • getExperienceForLevel(level: any): number
  • Parameters

    • level: any

    Returns number

Let getFrameTimers

  • getFrameTimers(): object
  • Returns object

getIPCRenderer

  • getIPCRenderer(): any
  • Returns any

getIconHTML

  • getIconHTML(id: any, size: any): string
  • Returns the html to render an icon

    Parameters

    • id: any

      URL of the icon

    • size: any

      Pixel size

    Returns string

getLevelBasedOnExp

  • getLevelBasedOnExp(experience: any): number
  • Parameters

    • experience: any

    Returns number

getMapEntityIconHTML

  • getMapEntityIconHTML(entityId: any, size: any): string
  • Returns the html to render an icon for the map entity type

    Parameters

    • entityId: any

      map entity id

    • size: any

    Returns string

Let getMaximumTimers

  • getMaximumTimers(): object
  • Returns object

getMetaAchievementById

  • getMetaAchievementById(id: any): any
  • Returns an achievement by its "nice" string id

    Parameters

    • id: any

    Returns any

getMetaAchievementByInternalId

  • getMetaAchievementByInternalId(internalId: any): any
  • Returns an achievement by its internal id

    Parameters

    • internalId: any

    Returns any

getMetaPerkById

  • getMetaPerkById(id: any): any
  • Parameters

    • id: any

    Returns any

getMetaPerkByInternalId

  • getMetaPerkByInternalId(internalId: any): any
  • Parameters

    • internalId: any

    Returns any

getNameOfProvider

  • getNameOfProvider(): any
  • Returns any

getPerkById

  • getPerkById(id: any): Perk
  • Parameters

    • id: any

    Returns Perk

getPerkByInternalId

  • getPerkByInternalId(id: any): Perk
  • Parameters

    • id: any

    Returns Perk

getPlatformName

  • getPlatformName(): "unknown" | "standalone" | "browser" | "android" | "ios"
  • Returns a platform name

    Returns "unknown" | "standalone" | "browser" | "android" | "ios"

getResourceIconHTML

  • getResourceIconHTML(resourceId: any, size: any): string
  • Returns the html to render an icon for the given resource

    Parameters

    • resourceId: any
    • size: any

    Returns string

getSavegameInterface

  • getSavegameInterface(logger: any, savegame: any): any
  • Returns if the given savegame has any supported interface

    Parameters

    • logger: any
    • savegame: any

    Returns any

getStringForKeyCode

  • getStringForKeyCode(code: any): any
  • Returns a keycode -> string

    Parameters

    • code: any

    Returns any

getTotalBaseExperienceForLevel

  • getTotalBaseExperienceForLevel(level: any): any
  • Parameters

    • level: any

    Returns any

handleKeydown

  • handleKeydown(params: any): boolean
  • Parameters

    • params: any

    Returns boolean

handleScroll

  • handleScroll(params: any): boolean
  • Parameters

    • params: any

    Returns boolean

handleTouchEnd

  • handleTouchEnd(event: any): void
  • Parameters

    • event: any

    Returns void

handleTouchMove

  • handleTouchMove(event: any): void
  • Parameters

    • event: any

    Returns void

handleTouchStart

  • handleTouchStart(event: any): void
  • Parameters

    • event: any

    Returns void

handleTouchend

  • handleTouchend(params: any): boolean
  • Parameters

    • params: any

    Returns boolean

handleTouchmove

  • handleTouchmove(params: any): boolean
  • Parameters

    • params: any

    Returns boolean

handleTouchstart

  • handleTouchstart(params: any): boolean
  • Parameters

    • params: any

    Returns boolean

hslToRgb

  • hslToRgb(h: any, s: any, l: any): number[]
  • Converts an HSL color value to RGB. Conversion formula adapted from http://en.wikipedia.org/wiki/HSL_color_space. Assumes h, s, and l are contained in the set [0, 1] and returns r, g, and b in the set [0, 255].

    Parameters

    • h: any

      The hue

    • s: any

      The saturation

    • l: any

      The lightness

    Returns number[]

    The RGB representation

initAssert

  • initAssert(): void
  • Returns void

initBehaviourRegistry

  • initBehaviourRegistry(): void
  • Returns void

initBuildingRegistry

  • initBuildingRegistry(): void
  • Returns void

initBuildingsByCategory

  • initBuildingsByCategory(buildings: any): void
  • Parameters

    • buildings: any

    Returns void

initClientActionRegistry

  • initClientActionRegistry(): void
  • Returns void

initComponentRegistry

  • initComponentRegistry(): void
  • Returns void

initDamageFormRegistry

  • initDamageFormRegistry(): void
  • Returns void

initDamageTypeRegistry

  • initDamageTypeRegistry(): void
  • Returns void

initDestroyIndicatorRegistry

  • initDestroyIndicatorRegistry(): void
  • Returns void

initDifficultyRegistry

  • initDifficultyRegistry(): void
  • Returns void

initDrawUtils

  • initDrawUtils(): void
  • Returns void

initEnemyActionRegistry

  • initEnemyActionRegistry(): void
  • Returns void

initEnemyRegistry

  • initEnemyRegistry(): void
  • Returns void

initErrorHandler

  • initErrorHandler(): void
  • Returns void

initEvent

  • initEvent(name: any): Event
  • Parameters

    • name: any

    Returns Event

initExtensions

  • initExtensions(): void
  • Returns void

initFactionRegistry

  • initFactionRegistry(): void
  • Returns void

initGameSpeedRegistry

  • initGameSpeedRegistry(): void
  • Returns void

initGraphicsQualityRegistry

  • initGraphicsQualityRegistry(): void
  • Returns void

initIncrementalSearch

  • initIncrementalSearch(): void
  • Returns void

initMapLayoutRegistry

  • initMapLayoutRegistry(): void
  • Returns void

initMatchmodeRegistry

  • initMatchmodeRegistry(): void
  • Returns void

initPolyfills

  • initPolyfills(): void
  • Returns void

initProjectileRegistry

  • initProjectileRegistry(): void
  • Returns void

initTargetModeRegistry

  • initTargetModeRegistry(): void
  • Returns void

initThemeConfigRegistry

  • initThemeConfigRegistry(): void
  • Returns void

initTutorialStepRegistry

  • initTutorialStepRegistry(): void
  • Returns void

initializeMap

  • initializeMap(root: any, layout: any): void
  • Initializes the map

    Parameters

    • root: any
    • layout: any

    Returns void

inlineSpritesHTML

  • inlineSpritesHTML(text: any): any
  • Inlines text so that 'This is your playerbase: {building:playerbase}, and these are crystals: {resource:crystal}' show the actual sprites in html

    Parameters

    • text: any

    Returns any

insertEvent

  • insertEvent(type: any, params: any): void
  • Parameters

    • type: any
    • params: any

    Returns void

internalBuildStringFromArgs

  • internalBuildStringFromArgs(args: any): string
  • Parameters

    • args: any

    Returns string

isAndroid

  • isAndroid(): boolean
  • Returns if this platform is android

    Returns boolean

isIos

  • isIos(): boolean
  • Returns if this platform is iOs

    Returns boolean

isSupportedBrowser

  • isSupportedBrowser(): boolean
  • Returns boolean

key

  • key(str: any): any
  • Parameters

    • str: any

    Returns any

Let leaveProfilingScope

  • leaveProfilingScope(scope: any): void
  • Parameters

    • scope: any

    Returns void

lerp

  • lerp(a: any, b: any, x: any): number
  • Interpolates two numbers

    Parameters

    • a: any
    • b: any
    • x: any

      Mix factor, 0 means 100% a, 1 means 100%b, rest is interpolated

    Returns number

loadAchievementsFromSchemaData

  • loadAchievementsFromSchemaData(data: any): void
  • Parameters

    • data: any

    Returns void

loadOldTrackingEvents

  • loadOldTrackingEvents(duringFlush?: boolean): void
  • Parameters

    • Default value duringFlush: boolean = false

    Returns void

loadPerksFromSchemaData

  • loadPerksFromSchemaData(data: any): void
  • Parameters

    • data: any

    Returns void

loadTranslationData

  • loadTranslationData(data: any): void
  • Parameters

    • data: any

    Returns void

log

  • log(context: any, ...args: any[]): void
  • Parameters

    • context: any
    • Rest ...args: any[]

    Returns void

logInternal

  • logInternal(handle: any, consoleMethod: any, args: any): void
  • Parameters

    • handle: any
    • consoleMethod: any
    • args: any

    Returns void

logSection

  • logSection(name: any, color: any): void
  • Parameters

    • name: any
    • color: any

    Returns void

make2DArray

  • make2DArray(w: any, h: any, filler: any, context?: any): any[]
  • Creates a new 2D array with the given fill method

    Parameters

    • w: any

      Width

    • h: any

      Height

    • filler: any

      Either Fill method, which should return the content for each cell, or static content

    • Default value context: any = null

      Optional context for memory tracking

    Returns any[]

make2DUndefinedArray

  • make2DUndefinedArray(w: any, h: any, context?: any): any[]
  • Makes a new 2D array with undefined contents

    Parameters

    • w: any
    • h: any
    • Default value context: any = null

    Returns any[]

makeDiv

  • makeDiv(parent: any, id?: any, classes?: any[], innerHTML?: string): HTMLDivElement
  • Helper method to create a new div

    Parameters

    • parent: any
    • Default value id: any = null
    • Default value classes: any[] = []
    • Default value innerHTML: string = ""

    Returns HTMLDivElement

makeHtmlColorViz

  • makeHtmlColorViz(color: any): string
  • Parameters

    • color: any

    Returns string

makeNewRng

  • makeNewRng(seed: any): random
  • Parameters

    • seed: any

    Returns random

makeOffscreenBuffer

  • makeOffscreenBuffer(w: any, h: any, __namedParameters: object): any[]
  • Creates a new offscreen buffer

    Parameters

    • w: any
    • h: any
    • __namedParameters: object
      • alpha: boolean
      • label: string
      • reusable: boolean
      • smooth: boolean

    Returns any[]

makePropertiesViz

  • makePropertiesViz(obj: any, keys: any): string
  • Parameters

    • obj: any
    • keys: any

    Returns string

makeSpriteDebugPreview

  • makeSpriteDebugPreview(spriteId: any): string
  • Sprite visualization helper for the debugging of components

    Parameters

    • spriteId: any

    Returns string

makeUniqueDeviceId

  • makeUniqueDeviceId(): string
  • Returns string

mapClampedColorValueToHex

  • mapClampedColorValueToHex(value: any): string
  • Converts values from 0 .. 255 to values like 07, 7f, 5d etc

    Parameters

    • value: any

    Returns string

mapLanguageCodeToMetaInstance

  • mapLanguageCodeToMetaInstance(languageKey: any): any
  • Parameters

    • languageKey: any

    Returns any

matchDataRecursive

  • matchDataRecursive(dest: any, src: any): void
  • Parameters

    • dest: any
    • src: any

    Returns void

mathPolyfills

  • mathPolyfills(): void
  • Returns void

measure

  • measure(name: any, target: any): void
  • Measures how long a function took

    Parameters

    • name: any
    • target: any

    Returns void

mixVector

  • mixVector(v1: any, v2: any, a: any): Vector
  • Interpolates two vectors, for a = 0, returns v1 and for a = 1 return v2, otherwise interpolate

    Parameters

    • v1: any
    • v2: any
    • a: any

    Returns Vector

newEmptyMap

  • newEmptyMap(): any
  • Creates a new map (an empty object without any props)

    Returns any

nowSeconds

  • nowSeconds(): number
  • Returns current time in seconds

    Returns number

    time in seconds

packMpObject

  • packMpObject(obj: any, recursive?: boolean): any
  • Transforms string keys into shorter int keys

    Parameters

    • obj: any
    • Default value recursive: boolean = false

    Returns any

patchConfig

  • patchConfig(config: any): void
  • Parameters

    • config: any

    Returns void

performEvent

  • performEvent(type: any, params: any): boolean
  • Parameters

    • type: any
    • params: any

    Returns boolean

performFlush

  • performFlush(): void
  • Returns void

performJob

  • performJob(job: any, data: any): string | Uint8Array
  • Parameters

    • job: any
    • data: any

    Returns string | Uint8Array

populateStateRegistryBase

  • populateStateRegistryBase(): void
  • Returns void

postEventGroupsAsync

  • postEventGroupsAsync(eventGroups: any): Promise<Response>
  • Parameters

    • eventGroups: any

    Returns Promise<Response>

prepareArgsForLogging

  • prepareArgsForLogging(args: any): any[]
  • Parameters

    • args: any

    Returns any[]

prepareHighDPIContext

  • prepareHighDPIContext(context: any, smooth?: boolean): void
  • Prepares a context for hihg dpi rendering

    Parameters

    • context: any
    • Default value smooth: boolean = true

    Returns void

prepareObjectForLogging

  • prepareObjectForLogging(obj: any, maxDepth?: number): any
  • Parameters

    • obj: any
    • Default value maxDepth: number = 1

    Returns any

preparePayload

  • preparePayload(key: any, value: any): any
  • Prepares a json payload

    Parameters

    • key: any
    • value: any

    Returns any

pulseAnimation

  • pulseAnimation(time: any, duration?: number, seed?: number): number
  • Computes a sine-based animation which pulsates from 0 .. 1 .. 0

    Parameters

    • time: any

      Current time in seconds

    • Default value duration: number = 1

      Duration of the full pulse in seconds

    • Default value seed: number = 0

      Seed to offset the animation

    Returns number

pushToQueue

  • pushToQueue(entry: any): void
  • Parameters

    • entry: any

    Returns void

quantizeFloat

  • quantizeFloat(value: any): number
  • Fixes lockstep simulation by converting times like 34.0000000003 to 34.00. We use 3 digits of precision, this allows to store sufficient precision of 1 ms without the risk to simulation errors due to resync issues

    Parameters

    • value: any

    Returns number

queueFlush

  • queueFlush(delay?: number): void
  • Parameters

    • Default value delay: number = FLUSH_DELAY

    Returns void

randomChoice

  • randomChoice(arr: any): any
  • Chooses a random entry of an array

    Parameters

    • arr: any

    Returns any

Let randomDelay

  • randomDelay(): number
  • Returns number

randomInt

  • randomInt(start: any, end: any): any
  • Returns a random integer in the range [start,end]

    Parameters

    • start: any
    • end: any

    Returns any

Let registerAllocation

  • registerAllocation(context: any): void
  • Parameters

    • context: any

    Returns void

registerCanvas

  • registerCanvas(canvas: any, context: any): void
  • Frees a canvas

    Parameters

    • canvas: any
    • context: any

    Returns void

removeAllChildren

  • removeAllChildren(elem: any): void
  • Removes all children of the given element

    Parameters

    • elem: any

    Returns void

resizeCanvas

  • resizeCanvas(canvas: any, w: any, h: any, setStyle?: boolean): void
  • Resizes a canvas

    Parameters

    • canvas: any
    • w: any
    • h: any
    • Default value setStyle: boolean = true

    Returns void

resizeCanvasAndClear

  • resizeCanvasAndClear(canvas: any, context: any, w: any, h: any): void
  • Resizes a canvas and makes sure its cleared

    Parameters

    • canvas: any
    • context: any
    • w: any
    • h: any

    Returns void

resizeHighDPICanvas

  • resizeHighDPICanvas(canvas: any, w: any, h: any, smooth?: boolean): void
  • Resizes a high dpi canvas

    Parameters

    • canvas: any
    • w: any
    • h: any
    • Default value smooth: boolean = true

    Returns void

reverseMap

  • reverseMap(map: any): object
  • Changes a map from a -> b to b -> a

    Parameters

    • map: any

    Returns object

    reversed map

rgbToHex

  • rgbToHex(r: any, g: any, b: any): string
  • Converts rgb to a hex string

    Parameters

    • r: any
    • g: any
    • b: any

    Returns string

rotateTrapezRightFaced

  • rotateTrapezRightFaced(x: any, y: any, w: any, h: any, leftHeight: any, angle: any): Rectangle
  • Returns a rotated trapez, used for spotlight culling

    Parameters

    • x: any
    • y: any
    • w: any
    • h: any
    • leftHeight: any
    • angle: any

    Returns Rectangle

round1Digit

  • round1Digit(n: any): number
  • Rounds 1 digit

    Parameters

    • n: any

    Returns number

round2Digits

  • round2Digits(n: any): number
  • Rounds 2 digits

    Parameters

    • n: any

    Returns number

round3Digits

  • round3Digits(n: any): number
  • Rounds 3 digits

    Parameters

    • n: any

    Returns number

round4Digits

  • round4Digits(n: any): number
  • Rounds 4 digits

    Parameters

    • n: any

    Returns number

roundSmart

  • roundSmart(n: any): any
  • Smart rounding + fractional handling

    Parameters

    • n: any

    Returns any

safeMod

  • safeMod(n: any, m: any): number
  • Modulo which works for negative numbers

    Parameters

    • n: any
    • m: any

    Returns number

safePackString

  • safePackString(str: any): string
  • Safely packs a user provided string, used for chat messages

    Parameters

    • str: any

    Returns string

safeUnpackString

  • safeUnpackString(str: any): string
  • Parameters

    • str: any

    Returns string

schemaObject

  • schemaObject(properties: any): object
  • Helper function to create a json schema object

    Parameters

    • properties: any

    Returns object

    • additionalProperties: boolean
    • properties: any
    • required: string[]
    • type: string

schemaSerializedId

  • schemaSerializedId(idMap: any): object
  • Transforms a map of {a: 5, b: 10} into {type: "integer", enum: [5, 10]}

    Parameters

    • idMap: any

    Returns object

    • enum: any[]
    • type: string

schemaSerializedTile

  • schemaSerializedTile(): object
  • Returns the schema for a serialized tile

    Returns object

    • additionalProperties: boolean
    • properties: any
    • required: string[]
    • type: string

schemaStringEnum

  • schemaStringEnum(entries: any): object
  • Defines a json schema string enum

    Parameters

    • entries: any

    Returns object

    • enum: any
    • type: string

schemaToJsonSchema

  • schemaToJsonSchema(schema: any): object
  • Parameters

    • schema: any

    Returns object

    • additionalProperties: boolean
    • properties: object
    • required: undefined[]
    • type: string

schemaUid

  • schemaUid(): object
  • Returns the uid schema

    Returns object

    • minimum: number
    • type: string

serializeBlueprint

  • serializeBlueprint(entity: any): object
  • Parameters

    • entity: any

    Returns object

    • components: object
    • faction: any
    • id: any
    • tile: any
    • type: string
    • uid: any

serializeBuilding

  • serializeBuilding(entity: any): object
  • Parameters

    • entity: any

    Returns object

    • components: object
    • faction: any
    • id: any
    • tile: any
    • type: string
    • uid: any

serializeComponents

  • serializeComponents(entity: any): object
  • Parameters

    • entity: any

    Returns object

serializeEnemy

  • serializeEnemy(entity: any): object
  • Parameters

    • entity: any

    Returns object

    • components: object
    • faction: any
    • id: any
    • level: any
    • uid: any
    • x: any
    • y: any

serializeError

  • serializeError(err: any): object
  • Serializes an error

    Parameters

    • err: any

    Returns object

    • type: any

serializeEvent

  • serializeEvent(event: any): object
  • Serializes an event

    Parameters

    • event: any

    Returns object

    • type: string

serializeSchema

  • serializeSchema(obj: any, schema: any, mergeWith?: object): object
  • Serializes an object using the given schema, mergin with the given properties

    Parameters

    • obj: any

      The object to serialize

    • schema: any

      The schema to use

    • Default value mergeWith: object = {}

      Any additional properties to merge with the schema, useful for super calls

    Returns object

    Serialized data object

setDPIMultiplicator

  • setDPIMultiplicator(multiplicator: any): void
  • Parameters

    • multiplicator: any

    Returns void

setGlobalApp

  • setGlobalApp(app: any): void
  • Parameters

    • app: any

    Returns void

setTrackingContext

  • setTrackingContext(playerName: any): void
  • Parameters

    • playerName: any

    Returns void

sha1

  • sha1(str: any): any
  • Parameters

    • str: any

    Returns any

shuffleArray

  • shuffleArray(a: any): any
  • Shuffles array in place. ES6 version

    Parameters

    • a: any

      items An array containing the items.

    Returns any

smallestAngle

  • smallestAngle(a: any, b: any): number
  • Returns the smallest angle between two angles

    Parameters

    • a: any
    • b: any

    Returns number

    0 .. 2 PI

smartFadeNumber

  • smartFadeNumber(current: any, newOne: any, minFade?: number, maxFade?: number): number
  • Parameters

    • current: any
    • newOne: any
    • Default value minFade: number = 0.01
    • Default value maxFade: number = 0.9

    Returns number

smootherstep

  • smootherstep(edge0: any, edge1: any, x: any): number
  • Parameters

    • edge0: any
    • edge1: any
    • x: any

    Returns number

startPlaybackUiTest

  • startPlaybackUiTest(): void
  • Returns void

startRecordUiTest

  • startRecordUiTest(): void
  • Returns void

stringPolyfills

  • stringPolyfills(): void
  • Returns void

stringifyObjectContainingErrors

  • stringifyObjectContainingErrors(payload: any): any
  • Stringifies an object containing circular references and errors

    Parameters

    • payload: any

    Returns any

submitBugReport

  • submitBugReport(app: any, reason?: any, additionalPayload?: any): Promise<any>
  • Submits a new bug report

    Parameters

    • app: any
    • Default value reason: any = null
    • Default value additionalPayload: any = null

    Returns Promise<any>

tick

  • tick(): void
  • Returns void

trackEvent

  • trackEvent(severity: any, message: any, additionalData: any): void
  • Parameters

    • severity: any
    • message: any
    • additionalData: any

    Returns void

Let trackMaximumTimers

  • trackMaximumTimers(): void
  • Returns void

tryTranslateBackendError

  • tryTranslateBackendError(err: any): string
  • Translates error codes like "invalid-auth-key" into their translations (E.g. "Invalid Auth Key"). If the code is not known or an arbitrary string, returns the code

    Parameters

    • err: any

      The error code

    Returns string

    Translated code

unpackMpObject

  • unpackMpObject(obj: any, recursive?: boolean): any
  • De-Transforms string keys from shorter int keys

    Parameters

    • obj: any
    • Default value recursive: boolean = false

    Returns any

verifySchema

  • verifySchema(schema: any, data: any): string
  • Verifies stored data using the given schema

    Parameters

    • schema: any

      The schema to use

    • data: any

      The data to verify

    Returns string

    String error code or nothing on success

waitNextFrame

  • waitNextFrame(): Promise<Object>
  • Waits two frames so the ui is updated

    Returns Promise<Object>

warn

  • warn(context: any, ...args: any[]): void
  • Parameters

    • context: any
    • Rest ...args: any[]

    Returns void

work

  • work(context: any): void
  • Parameters

    • context: any

    Returns void

wrapAngle

  • wrapAngle(angle: any): number
  • Wraps an angle between 0 and 2 pi

    Parameters

    • angle: any

    Returns number

wrapText

  • wrapText(context: any, text: any, x: any, y: any, maxWidth: any, lineHeight: any, stroke?: boolean): void
  • Parameters

    • context: any
    • text: any
    • x: any
    • y: any
    • maxWidth: any
    • lineHeight: any
    • Default value stroke: boolean = false

    Returns void

zombieGrowth

  • zombieGrowth(day: any): number
  • Parameters

    • day: any

    Returns number

Object literals

Const IAPItemTypes

IAPItemTypes: object

bestDeal

bestDeal: string = "bestdeal"

mostPopular

mostPopular: string = "mostpopular"

regular

regular: string = "regular"

Const MUSIC

MUSIC: object

backgroundDay

backgroundDay: string = "background_day.mp3"

backgroundNight

backgroundNight: string = "background_night.mp3"

gameover

gameover: string = "gameover.mp3"

mainMenu

mainMenu: string = "main_menu.mp3"

waitingQueue

waitingQueue: string = "waiting_queue.mp3"

winMusic

winMusic: string = "win_music.mp3"

Const SOUNDS

SOUNDS: object

achievementUnlock

achievementUnlock: string = "ui/achievement_unlock.mp3"

arc

arc: string = "game/arc.mp3"

arrowArmorHit1

arrowArmorHit1: string = "game/arrow_armor_hit_1.mp3"

arrowArmorHit2

arrowArmorHit2: string = "game/arrow_armor_hit_2.mp3"

arrowFire

arrowFire: string = "game/arrow_fire.mp3"

arrowHit

arrowHit: string = "game/arrow_hit.mp3"

arrowMiss

arrowMiss: string = "game/arrow_miss.mp3"

baseExplosion

baseExplosion: string = "game/base_explosion.mp3"

baseExplosion2

baseExplosion2: string = "game/base_explosion_2.mp3"

baseExplosionBefore

baseExplosionBefore: string = "game/base_explosion_before.mp3"

baseExplosionBefore2

baseExplosionBefore2: string = "game/base_explosion_before2.mp3"

basicZombieAttackHit

basicZombieAttackHit: string = "game/basic_zombie_attack_hit.mp3"

blueprintFinished

blueprintFinished: string = "game/blueprint_finished.mp3"

cannonShot

cannonShot: string = "game/cannon_shot.mp3"

cannonballGroundHit

cannonballGroundHit: string = "game/cannonball_ground_hit.mp3"

catapultHit

catapultHit: string = "game/catapult_hit.mp3"

catapultShot

catapultShot: string = "game/catapult_shot.mp3"

createZombie

createZombie: string = "ui/create_zombie.mp3"

damageExplosion

damageExplosion: string = "game/damage_explosion.mp3"

dialogError

dialogError: string = "ui/dialog_error.mp3"

dialogOk

dialogOk: string = "ui/dialog_ok.mp3"

enhance1

enhance1: string = "ui/enhance_1.mp3"

enhance2

enhance2: string = "ui/enhance_2.mp3"

enhance3

enhance3: string = "ui/enhance_3.mp3"

enhance4

enhance4: string = "ui/enhance_4.mp3"

enhance5

enhance5: string = "ui/enhance_5.mp3"

gainResource

gainResource: string = "ui/gain_resource.mp3"

gravestoneCollect

gravestoneCollect: string = "game/gravestone_collect.mp3"

gravestoneCollectorAura

gravestoneCollectorAura: string = "game/gravestone_collector_aura.mp3"

laserBeam

laserBeam: string = "game/laser_beam.mp3"

machineGunFire

machineGunFire: string = "game/machine_gun_fire.mp3"

matchFound

matchFound: string = "ui/match_found.mp3"

openTooltip

openTooltip: string = "ui/open_tooltip.mp3"

placeBuilding

placeBuilding: string = "game/place_building.mp3"

playerbaseLowHealth

playerbaseLowHealth: string = "ui/playerbase_low_health.mp3"

sellBuilding

sellBuilding: string = "ui/sell_building.mp3"

swishHide

swishHide: string = "ui/ui_swish_hide.mp3"

swishShow

swishShow: string = "ui/ui_swish_show.mp3"

uiClick

uiClick: string = "ui/ui_click.mp3"

uiError

uiError: string = "ui/ui_error.mp3"

unlockUpgrade

unlockUpgrade: string = "ui/unlock_upgrade.mp3"

zombieGrowl1

zombieGrowl1: string = "game/zombie_growl_1.mp3"

zombieGrowl2

zombieGrowl2: string = "game/zombie_growl_2.mp3"

zombieGrowl3

zombieGrowl3: string = "game/zombie_growl_3.mp3"

zombieGrowl4

zombieGrowl4: string = "game/zombie_growl_4.mp3"

zombiePulse

zombiePulse: string = "game/zombie_pulse.mp3"

Const THEME_COLORS

THEME_COLORS: object

alliedFaction

alliedFaction: string = "#64aff4"

blueprintProgressBar

blueprintProgressBar: string = "#26c6da"

buildingHealthBarColorFull

buildingHealthBarColorFull: string = "#86cc65"

buildingHealthBarColorLow

buildingHealthBarColorLow: string = "#f44141"

buildingHealthBarColorMedium

buildingHealthBarColorMedium: string = "#f4c542"

hostileFaction

hostileFaction: string = "#f4646b"

levels

levels: string[] = ["#fff" // Level 0, does not exist]

projectileShadowAlpha

projectileShadowAlpha: number = 0.2

shield

shield: string = "#4eeed6"

streetParticle

streetParticle: string = "#333"

resources

resources: object

coal

coal: string = "#222"

crystal

crystal: string = "#e04264"

iron

iron: string = "#E77D56"

ironarrow

ironarrow: string = "#E7885E"

ironcannonball

ironcannonball: string = "#E7885E"

power

power: string = "#82d8ff"

rock

rock: string = "#aaa"

steel

steel: string = "#c3d2d8"

steelarrow

steelarrow: string = "#c2d8ee"

steelcannonball

steelcannonball: string = "#c2d8ee"

stonecannonball

stonecannonball: string = "#999"

tree

tree: string = "#af8c54"

uranium

uranium: string = "#42f47a"

uraniumarrow

uraniumarrow: string = "#42f47a"

uraniumcannonball

uraniumcannonball: string = "#42f47a"

woodarrow

woodarrow: string = "#D4A736"

Const THEME_CONFIG

THEME_CONFIG: object

zombieIndicatorOpacity

zombieIndicatorOpacity: number = 1

zombieIndicatorSize

zombieIndicatorSize: number = 8

zombieIndicatorYOffset

zombieIndicatorYOffset: number = -17

Const apiConfig

apiConfig: object

aiKey

aiKey: string = "baf2a50f0cc7dfdec5a0e71c88a1169a4b34bc4f"

csKey

csKey: string = "}95Q3%8/.857Lqym_BJ9%q7)pAHJbF"

dayBaseDuration

dayBaseDuration: number = 40

fastForwardSpeed

fastForwardSpeed: number = 3

lobbyTokenRegexp

lobbyTokenRegexp: RegExp = /^[a-zA-Z0-9]{5,}$/

mapBorderTiles

mapBorderTiles: number = 5

maxPenaltyPoints

maxPenaltyPoints: number = 100

nameRegexp

nameRegexp: RegExp = /^[a-zA-Z0-9_-]{4,15}$/

namechangeCost

namechangeCost: number = 25

nightBaseDuration

nightBaseDuration: number = 20

rankedMinCasualWins

rankedMinCasualWins: number = 3

divisionLimits

divisionLimits: object

bronce_1

bronce_1: number = 55

bronce_2

bronce_2: number = 60

crystal_1

crystal_1: number = 10

crystal_2

crystal_2: number = 15

crystal_3

crystal_3: number = 20

gold_1

gold_1: number = 25

gold_2

gold_2: number = 30

gold_3

gold_3: number = 35

master

master: number = 5

silver_1

silver_1: number = 40

silver_2

silver_2: number = 45

silver_3

silver_3: number = 50

mapSizes

mapSizes: object

desert

desert: object

h

h: number = 60

w

w: number = 60

ice

ice: object

h

h: number = 34

w

w: number = 34

tutorial

tutorial: object

h

h: number = 40

w

w: number = 40

Const appSchema

appSchema: object

achievements

achievements: object = metaAchievements

Type declaration

perks

perks: object = metaPerks

Type declaration

version

version: number = 1001

announcement

announcement: object

message

message: string = "The crystal storage now has new artwork!"

title

title: string = "New Crystal Storage"

action

action: object

type

type: string = "link"

url

url: string = "https://www.yorg.io"

Const applyDamageResult

applyDamageResult: object

enemyMissed

enemyMissed: string = "failure"

failedOnArmor

failedOnArmor: string = "failedOnArmor"

success

success: string = "success"

Const atlasDefinitions

atlasDefinitions: object

qualityHigh

qualityHigh: any = atlasFiles.filter(atlas => atlas.meta.image.indexOf("_high") >= 0)

qualityLow

qualityLow: any = atlasFiles.filter(atlas => atlas.meta.image.indexOf("_low") >= 0)

qualityMedium

qualityMedium: any = atlasFiles.filter(atlas => atlas.meta.image.indexOf("_medium") >= 0)

qualityPreload

qualityPreload: any = atlasFiles.filter(atlas => atlas.meta.image.indexOf("_preload") >= 0)

Const buildableRegions

buildableRegions: object

bottomLeft

bottomLeft: string = "bottomLeft"

bottomRight

bottomRight: string = "bottomRight"

full

full: string = "full"

left

left: string = "left"

right

right: string = "right"

topLeft

topLeft: string = "topLeft"

topRight

topRight: string = "topRight"

Let clickDetectorGlobals

clickDetectorGlobals: object

lastTouchTime

lastTouchTime: number = - 1000

Const componentsSchema

componentsSchema: object
typedef

{{ structures: Array, trucks: Array, enemies: Array }} ClientSimulationResult

additionalProperties

additionalProperties: boolean = false

properties

properties: object

Type declaration

type

type: string = "object"

Const configBase

configBase: object

allowMinerDiagonal

allowMinerDiagonal: boolean = false

borderTiles

borderTiles: number = 5

gameSpeed

gameSpeed: number = 1

halfTileSize

halfTileSize: number = 24

initialZoom

initialZoom: number = 1.9

innerTilesEndX

innerTilesEndX: null = null

innerTilesEndY

innerTilesEndY: null = null

innerTilesStartX

innerTilesStartX: null = null

innerTilesStartY

innerTilesStartY: null = null

maxZoomLevel

maxZoomLevel: number = 3

minZoomLevel

minZoomLevel: number = 0.1

minZoomLevelForGlow

minZoomLevelForGlow: number = 1.2

minZoomLevelForSmoke

minZoomLevelForSmoke: number = 1.5

minZoomLevelForTrucks

minZoomLevelForTrucks: number = 1.2

newStreetPlacePenaltyCost

newStreetPlacePenaltyCost: number = 4

numTilesX

numTilesX: null = null

numTilesY

numTilesY: null = null

physicsDeltaMs

physicsDeltaMs: number = 0

physicsDeltaSeconds

physicsDeltaSeconds: number = 0

physicsUpdateRate

physicsUpdateRate: number = 50

rendering

rendering: object

Type declaration

sellReturnRate

sellReturnRate: number = 0.7

tileSize

tileSize: number = 48

transporterRadiusTiles

transporterRadiusTiles: number = 3.2

transporterVisionRadius

transporterVisionRadius: number = 3.2 + 2

truckTravelSpeed

truckTravelSpeed: number = 4

warmupTimeSecondsFast

warmupTimeSecondsFast: number = 0.2

warmupTimeSecondsRegular

warmupTimeSecondsRegular: number = 1

info

info: object

endpoint

endpoint: string = "Gw42pynN6Q5J936Pmzw8C5ARoT8c7zM9"

file

file: string = "Ec'])@^+*9zMevn3uMV4437x9%iK'="

sgSalt

sgSalt: string = "}95Q3%8/.857Lqym_BJ9%q7)pAHJbF"

smoothing

smoothing: object

quality

quality: string = "low"

smoothArcs

smoothArcs: boolean = smoothCanvas && true

smoothAtlasMipmaps

smoothAtlasMipmaps: boolean = true

smoothBlueprints

smoothBlueprints: boolean = smoothCanvas && true

smoothDestroyIndicators

smoothDestroyIndicators: boolean = true

smoothMainCanvas

smoothMainCanvas: boolean = smoothCanvas && true

smoothNightAnnouncement

smoothNightAnnouncement: boolean = smoothCanvas && true

smoothRenderingChunkMipmaps

smoothRenderingChunkMipmaps: boolean = false

smoothRenderingChunks

smoothRenderingChunks: boolean = smoothCanvas && true

smoothWavesCanvas

smoothWavesCanvas: boolean = smoothCanvas && true

Const connectionTypeToSpriteIndex

connectionTypeToSpriteIndex: object

bridge_horizontal

bridge_horizontal: number = 2

bridge_vertical

bridge_vertical: number = 3

flat_horizontal

flat_horizontal: number = 1

flat_vertical

flat_vertical: number = 0

Const defaultData

defaultData: object

damage

damage: number = 0

health

health: number = 0

miningSpeed

miningSpeed: number = 0

productionSpeed

productionSpeed: number = 0

Const easing

easing: object

easeBlink

  • easeBlink(t: any): number
  • Parameters

    • t: any

    Returns number

easeInCubic

  • easeInCubic(t: any): number
  • Parameters

    • t: any

    Returns number

easeInOutCubic

  • easeInOutCubic(t: any): number
  • Parameters

    • t: any

    Returns number

easeInOutQuad

  • easeInOutQuad(t: any): number
  • Parameters

    • t: any

    Returns number

easeInOutQuart

  • easeInOutQuart(t: any): number
  • Parameters

    • t: any

    Returns number

easeInOutQuint

  • easeInOutQuint(t: any): number
  • Parameters

    • t: any

    Returns number

easeInQuad

  • easeInQuad(t: any): number
  • Parameters

    • t: any

    Returns number

easeInQuart

  • easeInQuart(t: any): number
  • Parameters

    • t: any

    Returns number

easeInQuint

  • easeInQuint(t: any): number
  • Parameters

    • t: any

    Returns number

easeOutCubic

  • easeOutCubic(t: any): number
  • Parameters

    • t: any

    Returns number

easeOutQuad

  • easeOutQuad(t: any): number
  • Parameters

    • t: any

    Returns number

easeOutQuart

  • easeOutQuart(t: any): number
  • Parameters

    • t: any

    Returns number

easeOutQuint

  • easeOutQuint(t: any): number
  • Parameters

    • t: any

    Returns number

easeSin

  • easeSin(t: any): number
  • Parameters

    • t: any

    Returns number

linear

  • linear(t: any): any
  • Parameters

    • t: any

    Returns any

Const emailLinkStatus

emailLinkStatus: object

linked

linked: string = "linked"

pending

pending: string = "pending"

unlinked

unlinked: string = "unlinked"

Const enumArrowMode

enumArrowMode: object

targetHud

targetHud: string = "targetHud"

targetTile

targetTile: string = "targetTile"

targetTileOutOfScreen

targetTileOutOfScreen: string = "targetTileOutOfScreen"

targetWorldSpace

targetWorldSpace: string = "targetWorldSpace"

Const enumAutoPlacementSelector

enumAutoPlacementSelector: object

auto

auto: string = "auto"

midRangeAway

midRangeAway: string = "midRangeAway"

mostFarAway

mostFarAway: string = "mostFarAway"

Const enumBlueprintState

enumBlueprintState: object

waitingBuildFinish

waitingBuildFinish: string = "1"

waitingForResources

waitingForResources: string = "0"

Const enumConsumerPriority

enumConsumerPriority: object

high

high: string = "high"

low

low: string = "low"

maximum

maximum: string = "maximum"

none

none: string = "none"

regular

regular: string = "regular"

Const enumDestroyReason

enumDestroyReason: object

Reason why a structure was destroyed

actionReverted

actionReverted: string = "actionReverted"

blueprintTransformed

blueprintTransformed: string = "blueprintTransformed"

destroyedByLocalPlayer

destroyedByLocalPlayer: string = "destroyedByLocalPlayer"

diedToLowHealth

diedToLowHealth: string = "diedToLowHealth"

Const enumDiamondHistoryEntryType

enumDiamondHistoryEntryType: object

essencePackPurchased

essencePackPurchased: string = "e"

gainedAchievement

gainedAchievement: string = "a"

gainedFreeCoinsDiscord

gainedFreeCoinsDiscord: string = "d"

gainedFreeCoinsFacebook

gainedFreeCoinsFacebook: string = "f"

gainedFreeCoinsReddit

gainedFreeCoinsReddit: string = "r"

gainedFreeCoinsTwitter

gainedFreeCoinsTwitter: string = "t"

gainedFreeCoinsYoutube

gainedFreeCoinsYoutube: string = "y"

gainedRealMoneySpent

gainedRealMoneySpent: string = "i"

nameChanged

nameChanged: string = "n"

perkPurchased

perkPurchased: string = "p"

steamPurchase

steamPurchase: string = "s"

xsollaPurchase

xsollaPurchase: string = "x"

xsollaRefund

xsollaRefund: string = "k"

Const enumGameEndReason

enumGameEndReason: object

desync

desync: string = "d"

gameover

gameover: string = "r"

playersDisconnected

playersDisconnected: string = "l"

Const enumGlowOverlayBlending

enumGlowOverlayBlending: object

Blend modes of the glow overlay

additive

additive: string = "source-over"

multiplicative

multiplicative: string = "multiply"

Const enumLocalSavegameStatus

enumLocalSavegameStatus: object

offline

offline: string = "offline"

synced

synced: string = "synced"

Const enumMinerConnectionStyle

enumMinerConnectionStyle: object

The connection mode of a miner

railway

railway: string = "railway"

street

street: string = "street"

Const enumMinerMiningMode

enumMinerMiningMode: object

The mining mode of a miner

harvest

harvest: string = "harvest"

mine

mine: string = "mine"

Const enumMpHistoryEntryType

enumMpHistoryEntryType: object

desynced

desynced: string = "k"

gameDisconnect

gameDisconnect: string = "d"

gameLost

gameLost: string = "l"

gameOthersDisconnect

gameOthersDisconnect: string = "o"

gameStarted

gameStarted: string = "g"

gameWon

gameWon: string = "w"

matchRejected

matchRejected: string = "r"

reportedForBadLanguage

reportedForBadLanguage: string = "b"

reportedForCheating

reportedForCheating: string = "c"

Const enumPlacementHelperStyle

enumPlacementHelperStyle: object

circle

circle: string = "circle"

edgy

edgy: string = "edgy"

Const enumPredictionState

enumPredictionState: object

done

done: string = "done"

pending

pending: string = "pending"

Const enumSavePriority

enumSavePriority: object

asap

asap: number = 100

regular

regular: number = 2

Const enumServerType

enumServerType: object

gameserver

gameserver: string = "gameserver"

lobbyserver

lobbyserver: string = "lobbyserver"

Const enumSteamTransactionStatus

enumSteamTransactionStatus: object

pending

pending: string = "."

purchased

purchased: string = "y"

refunded

refunded: string = "n"

Const enumVisualizeStorageOrientation

enumVisualizeStorageOrientation: object

horizontal

horizontal: string = "horizontal"

vertical

vertical: string = "vertical"

Const enumXSollaTransactionStatus

enumXSollaTransactionStatus: object

pending

pending: string = "."

purchased

purchased: string = "y"

refunded

refunded: string = "n"

Const errors

errors: object

badResponse

badResponse: string = "bad-response"

checksumMismatch

checksumMismatch: string = "checksum-mismatch"

checksumMissing

checksumMissing: string = "checksum-missing"

databaseError

databaseError: string = "database-error"

failedToDecompress

failedToDecompress: string = "failed-to-decompress"

failedToLockSession

failedToLockSession: string = "failed-to-lock-session"

failedToParse

failedToParse: string = "failed-to-parse"

internalServerError

internalServerError: string = "internal-server-error"

invalidRequestSchema

invalidRequestSchema: string = "invalid-request-schema"

invalidSession

invalidSession: string = "invalid-session"

networkError

networkError: string = "network-error"

notFound

notFound: string = "not-found"

offline

offline: string = "offline"

rateLimited

rateLimited: string = "rate-limited"

serverOverloaded

serverOverloaded: string = "server-overloaded"

sessionExpired

sessionExpired: string = "session-expired"

unauthenticated

unauthenticated: string = "unauthenticated"

unknownError

unknownError: string = "unknown-error"

unsupportedVersion

unsupportedVersion: string = "unsupported-version"

fetchSavegame

fetchSavegame: object

unknownKey

unknownKey: string = "unknown-savegame-key"

freeCoins

freeCoins: object

alreadyUsed

alreadyUsed: string = "freecoins-already-used"

unknownCategory

unknownCategory: string = "freecoins-unknown-category"

gameover

gameover: object

alreadyGameover

alreadyGameover: string = "savegame-already-over"

keyNotFound

keyNotFound: string = "savegame-key-not-found"

iap

iap: object

invalidTransactionId

invalidTransactionId: string = "invalid-transaction-id"

invalidTransactionStatus

invalidTransactionStatus: string = "invalid-transaction-status"

leaderboard

leaderboard: object

invalidMode

invalidMode: string = "leaderboard-invalid-mode"

linkEmail

linkEmail: object

emailSendFailed

emailSendFailed: string = "email-send-failed"

emailTaken

emailTaken: string = "email-already-taken"

invalidEmail

invalidEmail: string = "link-invalid-email"

login

login: object

banned

banned: string = "banned"

failedToLockUserForLogin

failedToLockUserForLogin: string = "failed-to-lock-for-login"

invalidAuthKey

invalidAuthKey: string = "invalid-auth-key"

mpProfile

mpProfile: object

blockedFromMultiplayer

blockedFromMultiplayer: string = "blocked-from-multiplayer"

mp_gameservers

mp_gameservers: object

serversDown

serversDown: string = "all-servers-down"

purchase

purchase: object

insufficientDiamonds

insufficientDiamonds: string = "insufficient-diamonds"

essencePacks

essencePacks: object

packNotKnown

packNotKnown: string = "essence-pack-not-known"

perk

perk: object

perkAlreadyUnlocked

perkAlreadyUnlocked: string = "perk-already-unlocked"

unknownPerkId

unknownPerkId: string = "unknown-perk-id"

recoverAccount

recoverAccount: object

emailNotConfirmed

emailNotConfirmed: string = "recover-email-not-confirmed"

emailNotKnown

emailNotKnown: string = "recover-email-not-known"

emailSendFailed

emailSendFailed: string = "recover-email-send-failed"

invalidEmail

invalidEmail: string = "recover-invalid-email"

recoverTooFastPleaseWait

recoverTooFastPleaseWait: string = "recover-too-fast-please-wait"

register

register: object

invalidPlayerName

invalidPlayerName: string = "invalid-player-name"

noRecaptchaToken

noRecaptchaToken: string = "no-recaptcha-token"

playerNameTaken

playerNameTaken: string = "player-name-taken"

recaptchaApiError

recaptchaApiError: string = "recaptcha-api-error"

reportBug

reportBug: object

decompressionFailed

decompressionFailed: string = "bug-report-decompression-failed"

deserializeFailed

deserializeFailed: string = "bug-report-deserialize-failed"

invalidBuffer

invalidBuffer: string = "bug-report-invalid-buffer"

invalidFileCount

invalidFileCount: string = "bug-report-invalid-file-count"

noFilesAttached

noFilesAttached: string = "bug-report-no-files-attached"

validationFailed

validationFailed: string = "bug-report-validation-failed"

resolveLobbyToken

resolveLobbyToken: object

badToken

badToken: string = "bad-lobby-token"

tokenNotFoundOrExpired

tokenNotFoundOrExpired: string = "lobby-token-not-found-or-expired"

versionMismatch

versionMismatch: string = "lobby-token-version-mismatch"

steamConnect

steamConnect: object

steamBadTicket

steamBadTicket: string = "steam-bad-login-ticket"

steamDoesNotOwnApp

steamDoesNotOwnApp: string = "steam-app-not-owned"

steamNoUsernameGenerated

steamNoUsernameGenerated: string = "steam-no-username-generated"

steamVacBanned

steamVacBanned: string = "steam-vac-banned"

steamVacPublisherBanned

steamVacPublisherBanned: string = "steam-vac-publisher-banned"

steamPurchase

steamPurchase: object

notASteamUser

notASteamUser: string = "not-a-steam-user"

steamFinalizeTxnError

steamFinalizeTxnError: string = "steam-finalize-txn-error"

steamInitTxnError

steamInitTxnError: string = "steam-init-txn-error"

togglePerk

togglePerk: object

perkNotOwned

perkNotOwned: string = "perk-not-owned"

unlinkEmail

unlinkEmail: object

alreadyUnlinked

alreadyUnlinked: string = "email-already-unlinked"

updateSavegame

updateSavegame: object

alreadyGameover

alreadyGameover: string = "savegame-already-over"

anticheat

anticheat: string = "savegame-anticheat"

invalidSavegameKey

invalidSavegameKey: string = "savegame-invalid-key"

metaDoesNotMatch

metaDoesNotMatch: string = "savegame-meta-does-not-match"

olderThanOnServer

olderThanOnServer: string = "savegame-server-version-is-newer"

schemaValidationFailed

schemaValidationFailed: string = "savegame-schema-validation-failed"

tooFarForLateRegister

tooFarForLateRegister: string = "too-far-for-late-register"

tooFarFromCurrentTime

tooFarFromCurrentTime: string = "savegame-too-far-from-current-time"

versionNotSupported

versionNotSupported: string = "savegame-version-not-supported"

useRecoveryToken

useRecoveryToken: object

invalidEmail

invalidEmail: string = "usetoken-invalid-email"

invalidTokenFormat

invalidTokenFormat: string = "usetoken-invalid-token-format"

tokenNotFound

tokenNotFound: string = "usetoken-token-not-found"

tokenTimedOut

tokenTimedOut: string = "usetoken-token-timed-out"

xsolla

xsolla: object

tokenError

tokenError: string = "xsolla-token-error"

Const failureReasons

failureReasons: object

creationFailure

creationFailure: string = "creation-failure"

timedOut

timedOut: string = "timed-out"

Const fakeLogger

fakeLogger: object
type

{Logger}

error

error: function = error.bind(null, "savegame")

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

info

info: function = log.bind(null, "savegame")

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

log

log: function = log.bind(null, "savegame")

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

warn

warn: function = warn.bind(null, "savegame")

Type declaration

    • (...args: A): R
    • Parameters

      • Rest ...args: A

      Returns R

Const flags

flags: object

empty

empty: string = "n"

resource

resource: string = "e"

wall

wall: string = "f"

Const gameCreationAction

gameCreationAction: object

multiplayer

multiplayer: string = "multiplayer"

new

new: string = "new-game"

resume

resume: string = "resume-game"

Let gameserverSharedInterface

gameserverSharedInterface: object

jsonParse

jsonParse: null = null

jsonStringify

jsonStringify: null = null

packetNiceStringPrefix

packetNiceStringPrefix: string = "@"

validatePackets

validatePackets: boolean = true

Const interfaces

interfaces: object
type

{Object.<number, typeof BaseSavegameInterface>}

1014

1014: SavegameInterface_1014 = SavegameInterface_1014

Const logLevelNumbers

logLevelNumbers: object

error

error: number = 4

info

info: number = 2

log

log: number = 1

trace

trace: number = 0

warn

warn: number = 3

Const metaAchievements

metaAchievements: object

build_10_transporters

build_10_transporters: MetaAchievement = new MetaAchievement(31, easy, misc, mediumReward)

enhance_level_100

enhance_level_100: MetaAchievement = new MetaAchievement(29, hard, level, highReward)

enhance_level_125

enhance_level_125: MetaAchievement = new MetaAchievement(30, insane, level, hugeReward, true)

enhance_level_25

enhance_level_25: MetaAchievement = new MetaAchievement(41, beginner, level, smallReward)

enhance_level_50

enhance_level_50: MetaAchievement = new MetaAchievement(27, easy, level, mediumReward)

enhance_level_75

enhance_level_75: MetaAchievement = new MetaAchievement(28, advanced, level, bigReward)

every_building_built

every_building_built: MetaAchievement = new MetaAchievement(35, advanced, buildings, bigReward)

explore_whole_ice_map

explore_whole_ice_map: MetaAchievement = new MetaAchievement(37, hard, misc, highReward)

have_10k_crystals

have_10k_crystals: MetaAchievement = new MetaAchievement(32, easy, misc, mediumReward)

have_1bil_crystals

have_1bil_crystals: MetaAchievement = new MetaAchievement(34, hard, misc, highReward)

have_1mio_crystals

have_1mio_crystals: MetaAchievement = new MetaAchievement(33, advanced, misc, bigReward)

kill_100k_zombies

kill_100k_zombies: MetaAchievement = new MetaAchievement(21, insane, zombies, hugeReward, true)

kill_15k_zombies

kill_15k_zombies: MetaAchievement = new MetaAchievement(16, hard, zombies, highReward)

kill_3500_zombies

kill_3500_zombies: MetaAchievement = new MetaAchievement(11, advanced, zombies, bigReward)

kill_500_zombies

kill_500_zombies: MetaAchievement = new MetaAchievement(6, easy, zombies, mediumReward)

kill_50_zombies

kill_50_zombies: MetaAchievement = new MetaAchievement(1, beginner, zombies, smallReward)

link_email

link_email: MetaAchievement = new MetaAchievement(26, beginner, misc, mediumReward)

place_10_solarpanels_in_desert

place_10_solarpanels_in_desert: MetaAchievement = new MetaAchievement(36, easy, buildings, mediumReward)

place_10k_buildings

place_10k_buildings: MetaAchievement = new MetaAchievement(24, insane, buildings, hugeReward, true)

place_3500_buildings

place_3500_buildings: MetaAchievement = new MetaAchievement(19, hard, buildings, highReward)

place_500_buildings

place_500_buildings: MetaAchievement = new MetaAchievement(14, advanced, buildings, bigReward)

place_50_buildings

place_50_buildings: MetaAchievement = new MetaAchievement(9, easy, buildings, mediumReward)

place_5_buildings

place_5_buildings: MetaAchievement = new MetaAchievement(4, beginner, buildings, smallReward)

play_15_minutes

play_15_minutes: MetaAchievement = new MetaAchievement(3, beginner, playtime, smallReward)

play_1_hour

play_1_hour: MetaAchievement = new MetaAchievement(8, easy, playtime, mediumReward)

play_24_hours

play_24_hours: MetaAchievement = new MetaAchievement(18, hard, playtime, highReward)

play_5_hours

play_5_hours: MetaAchievement = new MetaAchievement(13, advanced, playtime, bigReward)

reach_day_100

reach_day_100: MetaAchievement = new MetaAchievement(12, advanced, day, bigReward)

reach_day_20

reach_day_20: MetaAchievement = new MetaAchievement(7, easy, day, mediumReward)

reach_day_200

reach_day_200: MetaAchievement = new MetaAchievement(17, hard, day, highReward)

reach_day_300

reach_day_300: MetaAchievement = new MetaAchievement(22, insane, day, hugeReward, true)

reach_day_30_cannons_only

reach_day_30_cannons_only: MetaAchievement = new MetaAchievement(39, hard, misc, highReward)

reach_day_40_no_walls

reach_day_40_no_walls: MetaAchievement = new MetaAchievement(40, advanced, buildings, bigReward)

reach_day_5

reach_day_5: MetaAchievement = new MetaAchievement(2, beginner, day, smallReward)

reach_level_15

reach_level_15: MetaAchievement = new MetaAchievement(10, easy, level, mediumReward)

reach_level_25

reach_level_25: MetaAchievement = new MetaAchievement(15, advanced, level, bigReward)

reach_level_5

reach_level_5: MetaAchievement = new MetaAchievement(5, beginner, level, smallReward)

reach_level_50

reach_level_50: MetaAchievement = new MetaAchievement(20, hard, level, highReward)

reach_level_75

reach_level_75: MetaAchievement = new MetaAchievement(25, insane, level, hugeReward, true)

unlocked_all_achievements

unlocked_all_achievements: MetaAchievement = new MetaAchievement(38, insane, misc, 2 * hugeReward, true)

Const metaPerks

metaPerks: object

advanced_synchronization

advanced_synchronization: MetaPerk = new MetaPerk({internalId: 103,category: singleplayer,price: 25,includedInStandalone: true})

allow_setting_priority

allow_setting_priority: MetaPerk = new MetaPerk({internalId: 102,category: singleplayer,price: 25,includedInStandalone: true})

difficulty_hard

difficulty_hard: MetaPerk = new MetaPerk({internalId: 302,category: difficulty,price: 30,includedInStandalone: true})

difficulty_medium

difficulty_medium: MetaPerk = new MetaPerk({internalId: 301,category: difficulty,price: 20,includedInStandalone: true})

difficulty_sandbox

difficulty_sandbox: MetaPerk = new MetaPerk({internalId: 303,category: difficulty,price: 40,includedInStandalone: true})

map_desert

map_desert: MetaPerk = new MetaPerk({internalId: 201,category: map,price: 30,includedInStandalone: true})

map_ice

map_ice: MetaPerk = new MetaPerk({internalId: 202,category: map,price: 30,includedInStandalone: true})

no_ads

no_ads: MetaPerk = new MetaPerk({internalId: 999,category: adfree,price: 80,includedInStandalone: true})

skin_relaxed_basic_zombie

skin_relaxed_basic_zombie: MetaPerk = new MetaPerk({internalId: 501,category: skin,price: 75,includedInStandalone: false,toggleable: true})

transporter_collect_graves

transporter_collect_graves: MetaPerk = new MetaPerk({internalId: 101,category: singleplayer,price: 10,includedInStandalone: true,})

Let queryParamOptions

queryParamOptions: object

additionalServerIp

additionalServerIp: null = null

authKeyOverride

authKeyOverride: null = null

bello

bello: boolean = false

savegameUri

savegameUri: null = null

Const resourceIdToParticleClass

resourceIdToParticleClass: object

crystal

crystal: GrantCrystalParticle = GrantCrystalParticle

diamond

diamond: GrantDiamondParticle = GrantDiamondParticle

head

head: GrantHeadParticle = GrantHeadParticle

Const stages

stages: object

destroyed

destroyed: string = "🌈 DESTROYED: Core is empty and waits for state leave"

gameover

gameover: string = "🌈 GAMEOVER: Game has ended."

gameoverAnimation

gameoverAnimation: string = "🌈 GAMEOVER Animation: Animate towards fallen base"

initFailed

initFailed: string = "🌈 ERROR: Initialization failed!"

leaving

leaving: string = "🌈 Saving, then leaving the game"

mpGameover

mpGameover: string = "🌈 MULTIPLAYER GAMEOVER: Game has ended."

s10_gameRunning

s10_gameRunning: string = "🌈 10: Game finally running"

s3_createCore

s3_createCore: string = "🌈 3: Create core"

s4_A_initEmptyGame

s4_A_initEmptyGame: string = "🌈 4/A: Init empty game"

s4_B_resumeGame

s4_B_resumeGame: string = "🌈 4/B: Resume game"

s4_C1_mpWaitPlayersJoined

s4_C1_mpWaitPlayersJoined: string = "🌈 4/C.1 [MP]: Waitin for other players to join"

s4_C2_mpWaitInitialDump

s4_C2_mpWaitInitialDump: string = "🌈 4/C.2 [MP]: Waiting for initial dump"

s5_firstUpdate

s5_firstUpdate: string = "🌈 5: First game update"

s6_postLoadHook

s6_postLoadHook: string = "🌈 6: Post load hook"

s7_warmup

s7_warmup: string = "🌈 7: Warmup"

s8_mpWaitLogicBudget

s8_mpWaitLogicBudget: string = "🌈 8 [MP]: Waiting for first logic budget"

Const types

types: object

bool

bool: TypeBoolean = new TypeBoolean()

entity

entity: TypeEntity = new TypeEntity()

float

float: TypeNumber = new TypeNumber()

int

int: TypeInteger = new TypeInteger()

string

string: TypeString = new TypeString()

tileVector

tileVector: TypeVector = new TypeVector()

ufloat

ufloat: TypePositiveNumber = new TypePositiveNumber()

uint

uint: TypePositiveInteger = new TypePositiveInteger()

vector

vector: TypeVector = new TypeVector()

weakEntityRef

weakEntityRef: TypeEntityWeakref = new TypeEntityWeakref()

array

  • Parameters

    • innerType: any

    Returns TypeArray

classId

  • Parameters

    • registry: any

    Returns TypeClassId

classRef

  • Parameters

    • registry: any

    Returns TypeMetaClass

classWithMetaclass

  • Parameters

    • classHandle: any
    • registry: any

    Returns TypeClassFromMetaclass

enum

  • Parameters

    • values: any

    Returns TypeEnum

keyValueMap

  • keyValueMap(valueType: any, includeEmptyValues?: boolean): TypeKeyValueMap
  • Parameters

    • valueType: any
    • Default value includeEmptyValues: boolean = true

    Returns TypeKeyValueMap

knownType

  • Parameters

    • cls: any

    Returns TypeFixedClass

nullable

  • Parameters

    • wrapped: any

    Returns TypeNullable

obj

  • Parameters

    • registry: any

    Returns TypeClass

objData

  • Parameters

    • registry: any

    Returns TypeClassData

pair

  • Parameters

    • a: any
    • b: any

    Returns TypePair

Const wallConnectionFlags

wallConnectionFlags: object

empty

empty: string = "n"

resourceOrBuilding

resourceOrBuilding: string = "e"

wall

wall: string = "f"

Const wallDiagonalFlags

wallDiagonalFlags: object

empty

empty: number = 0

wall

wall: number = 2

wallWithGate

wallWithGate: number = 1