Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WarFrontIO/client
/ functions
Functions
628 in github.com/WarFrontIO/client
⨍
Functions
628
◇
Types & classes
194
↓ 4 callers
Method
unregister
* Unregisters a listener to no longer receive events. * @param listener The listener to unregister.
src/event/EventHandlerRegistry.ts:21
↓ 3 callers
Method
actuallyDoTick
()
src/game/GameTicker.ts:89
↓ 3 callers
Method
addTile
* Add a tile to the player's territory. * WARNING: Make sure to call this method AFTER updating the territory manager. * @param _tile The tile to
src/game/player/Player.ts:24
↓ 3 callers
Method
addTroops
* Add troops to the player. * Troops will be capped at 100 times the territory size. * @param amount The amount of troops to add.
src/game/player/Player.ts:61
↓ 3 callers
Function
blockInteraction
(element: HTMLElement | string)
src/ui/UIEventResolver.ts:197
↓ 3 callers
Function
bordersTile
(tile: number, player: number)
src/util/MathUtil.ts:10
↓ 3 callers
Function
buildSectionHeader
(text: string, ...classes: string[])
src/ui/type/TextNode.ts:59
↓ 3 callers
Method
calculateSpeedFactor
* Calculate the speed factor of the attack. * The speed factor is a value between that determines how fast the attack progresses, higher values mean
src/game/attack/AttackExecutor.ts:189
↓ 3 callers
Method
deleteTexture
* Deletes the given texture and framebuffer. * @param texture The texture to delete * @param framebuffer The framebuffer to delete
src/renderer/GameGLContext.ts:130
↓ 3 callers
Function
downloadMap
(id, info)
scripts/map-loader.js:54
↓ 3 callers
Function
extractInner
(block)
scripts/WebpackUIModuleLoader.js:147
↓ 3 callers
Function
findPathInArea
* Finds a path between two points in the same area. * @param start The starting position. * @param end The ending position. * @returns The path fro
src/map/area/BoatPathfinding.ts:84
↓ 3 callers
Function
formatTroops
(troops: number)
src/util/StringFormatter.ts:1
↓ 3 callers
Method
getSpawnPixels
* Get the spawn points near the given tile (within a 5x5 area). * @param tile The tile to get the spawn points for. * @returns The spawn points ne
src/game/player/SpawnManager.ts:200
↓ 3 callers
Method
handleResponse
* Handles the response from the server. * @param status Status code of the response * @param data Data of the response * @private
src/network/api/Endpoint.ts:79
↓ 3 callers
Method
isAlive
* @returns True if the player is alive, false otherwise.
src/game/player/Player.ts:83
↓ 3 callers
Function
pad
(n: number, z: number = 2)
src/util/StringFormatter.ts:12
↓ 3 callers
Method
positionAttribute
(data: ArrayBufferView | null = null, type: GLenum = WebGL2RenderingContext.BYTE, usage: GLenum = WebGL2Render
src/renderer/GameGLContext.ts:141
↓ 3 callers
Method
removeTroops
* Remove troops from the player. * @param amount The amount of troops to remove.
src/game/player/Player.ts:69
↓ 3 callers
Method
reset
* Creates a new Random instance with a random seed. * @param seed seed for the random number generator * @internal
src/game/Random.ts:16
↓ 3 callers
Function
sendPacket
(packet: T, force: boolean = false)
src/network/NetworkManager.ts:148
↓ 3 callers
Method
setPosAt
* Set the position of the player name. * @param tile The tile to set the position at. * @param size The size of the player name. * @private
src/renderer/manager/PlayerNameRenderingManager.ts:200
↓ 3 callers
Function
setSliderValue
(value: number)
src/ui/element/GameHud.ts:40
↓ 3 callers
Method
toRGBComponent
* Approximates the RGB value of the color. * @param component The component to approximate, 0 for red, 8 for green, 4 for blue. * @private
src/util/HSLColor.ts:103
↓ 3 callers
Method
update
* Update a value in the queue. * WARNING: The new value must have a higher priority than the old value. * @param predicate The predicate to find t
src/util/PriorityQueue.ts:69
↓ 3 callers
Method
updateWaypoint
* Initialize the next waypoint. * @returns True if the boat has more waypoints, false otherwise. * @private
src/game/boat/Boat.ts:91
↓ 3 callers
Method
validate
* Validates the input element.
src/ui/type/ValidatedInput.ts:80
↓ 3 callers
Method
validatePlayer
* Validate a player id. * @param player The player to validate * @returns Whether the player is valid
src/game/player/PlayerManager.ts:85
↓ 2 callers
Function
actuallyHandleAttack
(attacker: Player, target: number, power: number)
src/game/attack/AttackActionValidator.ts:48
↓ 2 callers
Method
addBoatInternal
* Adds a boat to the boat manager. * @param owner The owner of the boat. * @param path The path to follow. * @param power The percentage of the
src/game/boat/BoatManager.ts:79
↓ 2 callers
Function
appendSmoothed
* Appends smoothed points to the path. * @param path The path to append to. * @param points The points to append.
src/map/area/BoatPathfinding.ts:281
↓ 2 callers
Method
attackPlayer
* Schedule an attack on a player. * @param player The player that is attacking. * @param target The player that is being attacked. * @param troo
src/game/attack/AttackActionHandler.ts:48
↓ 2 callers
Method
attackUnclaimed
* Schedule an attack on an unclaimed territory. * @param player The player that is attacking. * @param troops The amount of troops that are attack
src/game/attack/AttackActionHandler.ts:31
↓ 2 callers
Method
await
* Waits for the given status code and returns the result. * @param status Status code to wait for
src/network/api/Endpoint.ts:134
↓ 2 callers
Function
awaitSafeForward
()
src/network/NetworkAuthenticator.ts:132
↓ 2 callers
Function
buildCheckboxInput
(description: string)
src/ui/type/CheckboxInput.ts:68
↓ 2 callers
Function
buildPanel
(name: string)
src/ui/type/UIPanel.ts:57
↓ 2 callers
Function
buildPromiseBundle
(method: ((...args: T) => Promise<R>))
src/util/PromiseBundle.ts:4
↓ 2 callers
Method
checkConnections
* Checks if two areas are connected and adds an edge if they are connected. * @param area The area to check. * @param otherX The x-coordinate of t
src/map/area/AreaCalculator.ts:64
↓ 2 callers
Method
clear
()
src/game/attack/AttackActionHandler.ts:149
↓ 2 callers
Method
clear
* Clear the array.
src/util/SortedArray.ts:24
↓ 2 callers
Method
destroy
()
src/ui/type/ContentField.ts:80
↓ 2 callers
Method
disable
* Disables the map navigation handler.
src/game/action/MapNavigationHandler.ts:37
↓ 2 callers
Function
doPacketValidation
(packet: IncomingPacket)
src/network/PacketManager.ts:22
↓ 2 callers
Method
drawLines
* Draws the given number of lines starting the given index. * Note: The lines draws by this are very thin (for proper lines, use triangles instead
src/renderer/GameGLContext.ts:352
↓ 2 callers
Method
fetchValue
()
src/util/CookieContext.ts:20
↓ 2 callers
Function
fillPathParams
* Fills the path parameters in the URL with the given parameters and removes them from the object * @param url URL to fill * @param params Parameter
src/network/api/Endpoint.ts:38
↓ 2 callers
Method
finalizeSelection
* Finalize the spawn selection and start the game. * This assigns random spawn points to players who didn't select their spawn yet.
src/game/player/SpawnManager.ts:140
↓ 2 callers
Function
findPlayerTile
* Finds the closest water tile allowing creation of a boat. * The territory tile bordering the tile in question does not have to be in the same area.
src/map/area/BoatPathfinding.ts:227
↓ 2 callers
Function
findPlural
* Finds a translation, applying plural narrowing if possible. * If the arguments contain a "count" property, a fitting suffix (depending on the selec
src/util/Lang.ts:62
↓ 2 callers
Function
findStartsInArea
* Finds costs for all nodes in the area. * Note: costs are 1-based, 0 means the node cannot be reached. * @param start The starting position. * @re
src/map/area/BoatPathfinding.ts:140
↓ 2 callers
Method
forceRepaint
(theme: GameTheme)
src/renderer/layer/MapRenderer.ts:38
↓ 2 callers
Method
getAttack
* Get the attack executor for the given players. * @param player The player that is attacking. * @param target The player that is being attacked.
src/game/attack/AttackActionHandler.ts:72
↓ 2 callers
Method
getChildren
* Gets the children of this panel. * For elements that frequently change their size, this should return the maximum size. * @returns The children
src/ui/type/ContentField.ts:66
↓ 2 callers
Method
getClientHeight
()
src/ui/type/ValidatedInput.ts:90
↓ 2 callers
Method
getCloseHandler
* Gets the close handler of this panel. * @returns The close handler
src/ui/type/UIPanel.ts:46
↓ 2 callers
Method
getElapsedTime
* Gets the elapsed in-game-time in milliseconds. * Note that this is not necessarily the same as the real-world time. * @returns The elapsed in-ga
src/game/GameTicker.ts:122
↓ 2 callers
Method
getNameDepth
* Get the name depth map. * @returns The name depth map.
src/renderer/manager/PlayerNameRenderingManager.ts:38
↓ 2 callers
Method
getOrCreateNode
* Gets or creates a node at a specific position. * @param area The area to get or create the node in. * @param x The x-coordinate of the node. *
src/map/area/AreaCalculator.ts:138
↓ 2 callers
Method
getPlayer
* Get the player with the given ID. * @param id The ID of the player.
src/game/player/PlayerManager.ts:52
↓ 2 callers
Method
getPlayerData
* Get the player name rendering data. * @param player The player to get the data for. * @returns The player name rendering data.
src/renderer/manager/PlayerNameRenderingManager.ts:29
↓ 2 callers
Function
getTransactionExecutors
(type: { prototype: T, name: string })
src/game/transaction/TransactionExecutors.ts:36
↓ 2 callers
Function
getUIElement
(name: string)
src/ui/UIManager.ts:64
↓ 2 callers
Function
hasTerritoryNear
(area: number)
src/game/player/ClientPlayer.ts:42
↓ 2 callers
Function
hideAllUIElements
()
src/ui/UIManager.ts:54
↓ 2 callers
Function
hidePanel
()
src/ui/type/UIPanel.ts:121
↓ 2 callers
Function
hideUIElement
(name: string)
src/ui/UIManager.ts:40
↓ 2 callers
Function
languageProxy
()
src/util/Lang.ts:22
↓ 2 callers
Method
loadShader
(source: string, isVertex: boolean = false)
src/renderer/GameGLContext.ts:28
↓ 2 callers
Function
loadStaticElement
(id: string)
src/ui/UIManager.ts:92
↓ 2 callers
Method
modifyTroops
* Modify the amount of troops in the attack. * @param amount The amount to modify the troops by.
src/game/attack/AttackExecutor.ts:52
↓ 2 callers
Method
mutate
* Adds a mutator to the input element. * Mutators are applied in the order they are added. * @param mutator The mutator to add
src/ui/type/ValidatedInput.ts:38
↓ 2 callers
Method
mutate
* Adds a mutator to the input element. * Mutators are applied in the order they are added. * @param mutator The mutator to add
src/util/settings/StringSetting.ts:31
↓ 2 callers
Method
onChanged
* Adds a listener for the change event. * @param callback The callback to invoke when the change event is triggered
src/ui/type/CheckboxInput.ts:36
↓ 2 callers
Method
onDragMove
* Called when the user drags to the given position. * @param x The screen x-coordinate of the drag move. * @param y The screen y-coordinate of the
src/event/InteractionManager.ts:215
↓ 2 callers
Method
paintBorderTiles
* Paint a border tile. * @param tiles the tiles to paint * @param player the player to paint the tiles for * @internal
src/renderer/manager/TerritoryRenderingManager.ts:47
↓ 2 callers
Function
parseColor
(color)
scripts/theme-loader.js:79
↓ 2 callers
Function
parseColorExpression
(expression)
scripts/theme-loader.js:184
↓ 2 callers
Method
processZoom
(x: number, y: number, newZoom: number)
src/game/action/MapNavigationHandler.ts:51
↓ 2 callers
Method
randomSpawnPoint
* Select a random spawn point for the given player. * * The spawn point is selected from the available spawn points. * If no spawn points are av
src/game/player/SpawnManager.ts:125
↓ 2 callers
Method
refresh
()
src/network/NetworkAuthenticator.ts:30
↓ 2 callers
Function
registerBotStrategy
(closure: (strategies: BotStrategy[], player: BotPlayer) => void, priority: number = 0)
src/game/bot/BotPlayer.ts:76
↓ 2 callers
Function
registerDragListener
(element: HTMLElement | string, startHandler: (x: number, y: number) => void, moveHandler: (x: number, y: numb
src/ui/UIEventResolver.ts:97
↓ 2 callers
Function
registerKeyboardListener
(element: HTMLElement | string, key: string | string[], handler: (x: number, y: number) => void, keyUpHandler?
src/ui/UIEventResolver.ts:151
↓ 2 callers
Method
registerPlayer
* Register a player. * @param player The player to register. * @param isBot Whether the player is a bot.
src/game/player/PlayerManager.ts:41
↓ 2 callers
Function
registerTransactionExecutor
(type: { prototype: T, name: string }, executor: (this: T) => void)
src/game/transaction/TransactionExecutors.ts:12
↓ 2 callers
Function
registerTransactionType
(type: { prototype: T, name: string })
src/game/transaction/TransactionExecutors.ts:24
↓ 2 callers
Function
registerUIElement
(name: string, element: UIElement)
src/ui/UIManager.ts:14
↓ 2 callers
Method
removeAttack
* Remove an attack from the list of ongoing attacks. * @param attack The attack to remove. * @private
src/game/attack/AttackActionHandler.ts:112
↓ 2 callers
Method
removeTile
* Remove a tile from the player's territory. * WARNING: Make sure to call this method AFTER updating the territory manager. * @param _tile The til
src/game/player/Player.ts:34
↓ 2 callers
Method
removeTile
* Update the player name rendering data. * @internal
src/renderer/manager/PlayerNameRenderingManager.ts:57
↓ 2 callers
Function
resetTimeout
* Resets the timeout of the socket connection.
src/network/NetworkManager.ts:114
↓ 2 callers
Method
selectSpawnPoint
* Select a spawn point for the given player based on the selected tile. * * Marks spawn points near the selected tile as blocked, so random spawn
src/game/player/SpawnManager.ts:157
↓ 2 callers
Method
setAction
* Set the action to execute on a tile click. * @param action The action to execute.
src/game/action/MapActionHandler.ts:30
↓ 2 callers
Method
setChecked
* Sets the value of the checkbox. * @param checked The value to set
src/ui/type/CheckboxInput.ts:20
↓ 2 callers
Method
setCloseHandler
* Sets the close handler of this panel. * @param handler The close handler
src/ui/type/UIPanel.ts:37
↓ 2 callers
Method
setNamePos
* Set the name position. * @param pos The position of the name. * @param size The size of the name.
src/renderer/manager/PlayerNameRenderingManager.ts:244
↓ 2 callers
Method
setText
* Sets the text of the text node. * @param text The text of the text node
src/ui/type/TextNode.ts:8
↓ 2 callers
Method
setTitle
* Sets the title of this panel. * @param title The title to set
src/ui/type/UIPanel.ts:28
↓ 2 callers
Method
showTemporaryTooltip
* Adds a temporary tooltip to the container. * @param text The text of the tooltip * @param type The type of the tooltip * @param duration The d
src/ui/type/TooltipContainer.ts:30
← previous
next →
101–200 of 628, ranked by callers