MCPcopy Create free account

hub / github.com/WarFrontIO/client / functions

Functions628 in github.com/WarFrontIO/client

↓ 148 callersMethodpush
* Push a value into the queue. * @param value The value to push. * @returns The new size of the queue.
src/util/PriorityQueue.ts:43
↓ 67 callersMethodregister
* Register a setting * @param key stringy id of the setting, must not contain '.' * @param setting the setting object * @see Setting
src/util/settings/SettingRegistry.ts:38
↓ 51 callersMethodadd
* Adds a child element to this panel. * @param child The child element to add
src/ui/type/ContentField.ts:18
↓ 39 callersMethodset
* Sets the cookie value. * This will only have an effect if the value has been checked with get() before and has not changed since. * @param value
src/util/CookieContext.ts:35
↓ 37 callersMethodbroadcast
* Broadcasts an event to all registered listeners. * @param args The arguments to pass to the listeners. * @internal Only call this method if you
src/event/EventHandlerRegistry.ts:30
↓ 35 callersMethodforEach
* Iterate over the array. * @param callback The callback to call for each item
src/util/SortedArray.ts:33
↓ 32 callersMethodpop
* Pop the value at the front of the queue. * @returns The value at the front of the queue.
src/util/PriorityQueue.ts:52
↓ 28 callersMethodget
* Sends a GET request to the given URL with the given parameters. * @param url URL to send the request to * @param params query parameters to send
src/network/api/Endpoint.ts:146
↓ 24 callersMethodgetDistance
* Get the distance to the nearest non-solid tile if the tile is solid (0 if bordering a non-solid tile). * If the tile is not solid, the distance is
src/map/GameMap.ts:66
↓ 22 callersMethodadd
* Add an item to the array. * @param item The item to add * @param priority The priority of the item
src/util/SortedArray.ts:10
↓ 22 callersMethodbind
* Binds everything needed to prepare rendering. * @param program The program to use * @param vertexArray The vertex array to use * @param frameb
src/renderer/GameGLContext.ts:223
↓ 21 callersMethodnextInt
* Generate a random integer between 0 and max. * @param max the maximum value (exclusive) * @returns a random integer between 0 and max
src/game/Random.ts:40
↓ 21 callersMethodtoString
* Returns a string representation of this settings value.
src/util/settings/ManagedSetting.ts:5
↓ 19 callersMethodcatch
* Adds a listener for any unhanded status code or error. * @param callback Callback to call when an unhandled status code is received
src/network/api/Endpoint.ts:122
↓ 19 callersMethodwriteBits
(length, value)
scripts/shader-loader.js:45
↓ 18 callersFunctionresolveElement
(element: ElementId)
src/ui/UIElement.ts:170
↓ 17 callersMethodhas
* Returns whether a listener has been chosen.
src/event/PrioritizedEventHandlerRegistry.ts:42
↓ 16 callersMethodbufferData
* Sets the data of the given buffer. * @param buffer The buffer to set the data of * @param data The data to set * @param usage The usage of the
src/renderer/GameGLContext.ts:204
↓ 16 callersMethodcreateBuffer
* Creates a buffer to use when passing attribute data.
src/renderer/GameGLContext.ts:192
↓ 16 callersMethodgetTile
* Get the tile at the given index. * * If you want to check if a tile is solid, use {@link getDistance} instead. * @param index The index of the
src/map/GameMap.ts:41
↓ 15 callersMethodgetPlayer
* @returns The player that owns the boat
src/game/boat/Boat.ts:192
↓ 15 callersMethodtest
* Tests if the listener should receive events at the given position. * @param x The screen x-coordinate of the event. * @param y The screen y-coor
src/event/InteractionManager.ts:286
↓ 14 callersMethodinit
* Called when this layer is registered. * Use this to set up webgl shaders and rendering data. * @internal Do not call this method directly
src/renderer/layer/RendererLayer.ts:27
↓ 13 callersMethodcall
* Calls the listener that was chosen by the choose method. * If no listener was chosen, nothing happens. * @param handler closure to call on the c
src/event/PrioritizedEventHandlerRegistry.ts:60
↓ 13 callersMethodget
* Gets the cookie value.
src/util/CookieContext.ts:16
↓ 13 callersMethodgetTerritorySize
* @returns The size of the player's territory (in tiles).
src/game/player/Player.ts:76
↓ 13 callersMethodsize
* Get the size of the queue. * @returns The size of the queue.
src/util/PriorityQueue.ts:26
↓ 11 callersMethodcreateVertexArray
* Creates a vertex array with the given options. * @param program The program to use, only required if attributes are set * @param attributes Arra
src/renderer/GameGLContext.ts:159
↓ 11 callersMethodisOwner
* Checks if a tile is owned by a specific player. * @param tile The tile to check. * @param owner The player to check against. * @returns True i
src/game/TerritoryManager.ts:54
↓ 11 callersMethodloadUniforms
* Loads the given uniforms and returns an object with their positions. * @param program The program to load the uniforms of * @param uniforms The
src/renderer/GameGLContext.ts:276
↓ 11 callersMethodrequireProgram
* Creates a program with the given shaders. * @param vertexShader The vertex shader to use * @param fragmentShader The fragment shader to use *
src/renderer/GameGLContext.ts:54
↓ 10 callersMethodaddEdge
* Adds an edge between two areas.
src/map/area/AreaCalculator.ts:124
↓ 10 callersMethodbindTexture
* Binds the given texture. * @param texture The texture to bind * @param unit Texture unit to use, if not specified active one is used (only speci
src/renderer/GameGLContext.ts:259
↓ 10 callersMethodremove
* Removes an element from the array. * @param element The element to remove
src/util/PriorityList.ts:29
↓ 9 callersMethodcreateTexture
* Creates a texture with the given options. * @param width The width of the texture * @param height The height of the texture * @param arr Initi
src/renderer/GameGLContext.ts:100
↓ 9 callersMethodgetOrSet
* Get the value for the given key. * If the key is not present in the map, it will be added with an empty array. * @param key The key to get the v
src/util/SafeMap.ts:14
↓ 9 callersMethodgetOwner
* Gets the owner of a tile. * @param tile The tile to get the owner of. * @returns The owner of the tile.
src/game/TerritoryManager.ts:63
↓ 9 callersFunctiongetSetting
(key: K)
src/util/settings/UserSettingManager.ts:29
↓ 9 callersFunctiongetSettingObject
(key: K)
src/util/settings/UserSettingManager.ts:37
↓ 9 callersMethodonNeighbors
* Call a closure on all neighbors of a tile. * @param tile The tile to get the neighbors of * @param closure The closure to call on each neighbor
src/map/GameMap.ts:75
↓ 9 callersMethodviewport
* Sets the viewport. * @param width The width of the viewport * @param height The height of the viewport
src/renderer/GameGLContext.ts:250
↓ 8 callersMethodfind
(predicate: (value: T, index: number, obj: T[]) => unknown)
src/util/PriorityList.ts:37
↓ 8 callersMethodloadFragmentShader
* Loads fragment shader from source. * @param source The source code of the shader * @returns The shader object, or null if it failed to load
src/renderer/GameGLContext.ts:24
↓ 8 callersMethodnext
* Generate a random number and advances the internal state. * @see Random * @returns a random number between 0 and 1
src/game/Random.ts:25
↓ 8 callersFunctionregisterClickListener
(element: HTMLElement | string, handler: (x: number, y: number) => void, bindKeyboard: boolean = true, press:
src/ui/UIEventResolver.ts:81
↓ 7 callersFunctionbuildContainer
(...classes: string[])
src/ui/type/ContentField.ts:105
↓ 7 callersFunctionbuildListener
(type: T)
src/ui/UIEventResolver.ts:46
↓ 7 callersFunctioncheckLineOfSight
(x1: number, y1: number, x2: number, y2: number, gameMap: GameMap)
src/util/VoxelRayTrace.ts:44
↓ 7 callersMethodchoose
* Chooses the listener to receive events. * The first listener that returns true for the test method is chosen. * @param args The arguments to pas
src/event/PrioritizedEventHandlerRegistry.ts:51
↓ 7 callersMethodgetMapX
* Converts screen coordinates to map coordinates. * @param x The x-coordinate on the screen.
src/game/action/MapNavigationHandler.ts:90
↓ 7 callersMethodgetMapY
* Converts screen coordinates to map coordinates. * @param y The y-coordinate on the screen.
src/game/action/MapNavigationHandler.ts:98
↓ 7 callersMethodgetTroops
* @returns The amount of troops the player has.
src/game/player/Player.ts:52
↓ 7 callersMethodisEmpty
* Check if the queue is empty. * @returns Whether the queue is empty.
src/util/PriorityQueue.ts:18
↓ 7 callersMethodloadVertexShader
* Loads vertex shader from source. * @param source The source code of the shader * @returns The shader object, or null if it failed to load
src/renderer/GameGLContext.ts:15
↓ 7 callersMethodonClick
* Called when the user clicks at the given position. * @param x The screen x-coordinate of the click. * @param y The screen y-coordinate of the cl
src/event/InteractionManager.ts:190
↓ 7 callersFunctionshowPanel
(title: string, ...content: UIElement[])
src/ui/type/UIPanel.ts:104
↓ 7 callersFunctionshowUIElement
(name: string)
src/ui/UIManager.ts:25
↓ 7 callersMethodtick
()
src/game/GameTicker.ts:71
↓ 7 callersMethodtoRGB
* Convert the color to an RGB color. * @returns The color in the RGB format.
src/util/HSLColor.ts:30
↓ 6 callersFunctionbuildDetail
(context: GameGLContext, color: HSLColor, min: number, max: number, gradient: number)
src/renderer/layer/MapRenderer.ts:106
↓ 6 callersFunctiondisplayAlert
(type: "primary" | "secondary" | "danger" | "success", text: string, duration: "fast" | "normal" | "slow" = "n
src/ui/type/TextNode.ts:124
↓ 6 callersMethodenable
* Enables the map navigation handler. * Sets the initial zoom level and position to center the map on the screen.
src/game/action/MapNavigationHandler.ts:22
↓ 6 callersMethodgetBorderTiles
* Gets the border tiles of a player. * @param player The player to get the border tiles of * @returns The border tiles of the player
src/game/BorderManager.ts:66
↓ 6 callersMethodgetTickCount
* Gets the current tick count. * * Do not use this to calculate time differences. * There is no guarantee that the ticker runs at a constant rat
src/game/GameTicker.ts:113
↓ 6 callersMethodgetTroops
* Get the amount of troops in the attack. * The troop count decreases as the attack progresses. * @returns The amount of troops in the attack.
src/game/attack/AttackExecutor.ts:74
↓ 6 callersMethodoption
* Registers a new option with the given key and value. * @param key The key of the option. Must be unique, not contain ',' and shouldn't change in t
src/util/settings/MultiSelectSetting.ts:26
↓ 6 callersFunctionreadZeroString
(buffer)
scripts/map-loader.js:80
↓ 6 callersMethodregisterLayer
* Register a new layer to be rendered. * * This renderer will be rendered on top of all other layers. * Note that you will have to re-register e
src/renderer/GameRenderer.ts:55
↓ 6 callersFunctionregisterSettingListener
(key: K, listener: (value: SettingType<K>, obj: typeof registry["registry"][K]) => void)
src/util/settings/UserSettingManager.ts:55
↓ 6 callersMethodrender
* Called every frame, applies this layer to the canvas. * @internal Do not call this method directly
src/renderer/layer/RendererLayer.ts:20
↓ 6 callersFunctionupdateUserAccount
(account: APIUserAccount | null)
src/network/api/UserAccount.ts:12
↓ 6 callersFunctionwriteZeroString
(buffer, string)
scripts/map-loader.js:90
↓ 5 callersMethodapply
()
src/game/transaction/TerritoryTransaction.ts:37
↓ 5 callersMethodbindFramebuffer
* Binds the framebuffer. * @param framebuffer The framebuffer to use or null to render to canvas
src/renderer/GameGLContext.ts:233
↓ 5 callersMethoddrawTriangles
* Draws the given number of triangles starting at the given index. * @param count The number of triangles to draw. NOT the number of vertices * @p
src/renderer/GameGLContext.ts:333
↓ 5 callersFunctionendpointPOST
(url: T, auth: boolean = false)
src/network/api/Endpoint.ts:25
↓ 5 callersFunctionfindBlock
(content, block, includeGlobal = false)
scripts/WebpackUIModuleLoader.js:125
↓ 5 callersMethodforceSet
* Forces the cookie value to be set. * WARNING: This will overwrite any changes made by other scripts. * @param value new value * @param lifetim
src/util/CookieContext.ts:54
↓ 5 callersMethodget
* Get a setting * @param key the key of the setting * @returns the setting object * @see Setting
src/util/settings/SettingRegistry.ts:68
↓ 5 callersMethodgetPlayers
* Get all players.
src/game/player/PlayerManager.ts:59
↓ 5 callersMethodon
* Adds a listener for the given status code. * @param status Status code to listen for * @param callback Callback to call when the status code is
src/network/api/Endpoint.ts:106
↓ 5 callersFunctiononNeighborWater
* Calls the closure for all water tiles neighboring the given tile (including the tile itself). * @param tile The tile to check. * @param closure Th
src/map/area/BoatPathfinding.ts:264
↓ 5 callersMethodresetFramebuffer
* Unbinds the framebuffer. * Call this to render to the canvas again.
src/renderer/GameGLContext.ts:241
↓ 4 callersMethodaddRule
* Adds a validation rule to the input element. * @param errorMessage The error message to display if the rule fails * @param rule The validation r
src/ui/type/ValidatedInput.ts:48
↓ 4 callersFunctionbuildButton
(text: string, type: "primary" | "secondary" | "danger" | "success" = "primary", ...classes: string[])
src/ui/type/TextNode.ts:98
↓ 4 callersFunctionbuildTextNode
(text: string, ...classes: string[])
src/ui/type/TextNode.ts:20
↓ 4 callersFunctioncheckCoastDistance
* Checks whether the given step is allowed from the given tile. * This function disallows passing closer than half a tile to non-water tiles. * @par
src/util/VoxelRayTrace.ts:89
↓ 4 callersMethodconquer
* Conquers a tile for a player. * * If the tile is already owned by a player, the player will lose the tile. * Conquered tiles will be passed to
src/game/TerritoryManager.ts:85
↓ 4 callersMethoddrawPoints
* Draws the given number of points starting at the given index. * @param count The number of points to draw * @param start The index to start draw
src/renderer/GameGLContext.ts:342
↓ 4 callersFunctionendpointGET
(url: T, auth: boolean = false)
src/network/api/Endpoint.ts:12
↓ 4 callersMethodevery
(callback: (value: T, index: number, array: T[]) => unknown)
src/util/PriorityList.ts:49
↓ 4 callersMethodfromRGB
* Create a color from an RGB value. * @param r The red value. * @param g The green value. * @param b The blue value.
src/util/HSLColor.ts:72
↓ 4 callersMethodgetX
* @returns The x coordinate of the boat
src/game/boat/Boat.ts:164
↓ 4 callersMethodgetY
* @returns The y coordinate of the boat
src/game/boat/Boat.ts:171
↓ 4 callersMethodisWater
* Checks if a tile is water. * @param tile The tile to check. * @returns True if the tile is water, false otherwise.
src/game/TerritoryManager.ts:72
↓ 4 callersMethodlinkSetting
* Links the checkbox to a setting. * @param setting The setting
src/ui/type/CheckboxInput.ts:45
↓ 4 callersFunctionregisterSettingType
(type: T extends Setting<infer _> ? { prototype: T } : never, builder: (setting: T) => UIElement)
src/ui/element/SettingsPanel.ts:38
↓ 4 callersMethodselect
* Selects the option with the given key. * @param key The key of the option * @param status The status to set * @throws InvalidArgumentException
src/util/settings/MultiSelectSetting.ts:49
↓ 4 callersMethodsetContent
* Sets the content of this panel. * @param content The content to set
src/ui/type/ContentField.ts:54
↓ 4 callersMethodsome
(callback: (value: T, index: number, array: T[]) => unknown)
src/util/PriorityList.ts:45
next →1–100 of 628, ranked by callers