diff --git a/cli/build/steps/configs_dynamic.ts b/cli/build/steps/configs_dynamic.ts index b4bd617ac..1fb839dd4 100644 --- a/cli/build/steps/configs_dynamic.ts +++ b/cli/build/steps/configs_dynamic.ts @@ -68,7 +68,8 @@ export async function buildDynamicConfigs(parameters: IBuildCommandParameters): */ async function getLtxConfigs(filters: Array = []): Promise> { /** - * todo; + * Collect list of LTX configs for further transformation in typescript. + * Recursively find all ts files in configs dir. */ function collectLtxConfigs( acc: Array, diff --git a/cli/build/steps/configs_statics.ts b/cli/build/steps/configs_statics.ts index 0114d69bf..e9fd05e21 100644 --- a/cli/build/steps/configs_statics.ts +++ b/cli/build/steps/configs_statics.ts @@ -54,7 +54,8 @@ export async function buildStaticConfigs(parameters: IBuildCommandParameters): P */ async function getStaticConfigs(filters: Array = []): Promise> { /** - * todo; + * Collect list of LTX configs for including in build. + * Recursively find all ltx files in configs dir. */ function collectConfigs( acc: Array, diff --git a/cli/build/steps/translations_dynamic.ts b/cli/build/steps/translations_dynamic.ts index a59713dfe..d897bf3e4 100644 --- a/cli/build/steps/translations_dynamic.ts +++ b/cli/build/steps/translations_dynamic.ts @@ -36,7 +36,7 @@ export async function buildDynamicTranslations(): Promise { } /** - * todo; + * Collect list of all dynamic translations recursively in provided directory. */ function collectTranslations( acc: Array, diff --git a/cli/build/steps/ui_dynamic.ts b/cli/build/steps/ui_dynamic.ts index ea461d0ad..98dd76ecf 100644 --- a/cli/build/steps/ui_dynamic.ts +++ b/cli/build/steps/ui_dynamic.ts @@ -64,7 +64,7 @@ export async function buildDynamicUi(parameters: IBuildCommandParameters): Promi */ async function getUiConfigs(filters: Array = []): Promise> { /** - * todo; + * Collect list of ts configs for including in build and correctly transforming to XML forms. */ function collectXmlConfigs( acc: Array, diff --git a/cli/build/steps/ui_statics.ts b/cli/build/steps/ui_statics.ts index 0060b3695..74fc6e9ff 100644 --- a/cli/build/steps/ui_statics.ts +++ b/cli/build/steps/ui_statics.ts @@ -52,7 +52,8 @@ export async function buildStaticUi(parameters: IBuildCommandParameters): Promis */ async function getUiConfigs(filters: Array = []): Promise> { /** - * todo; + * Collect list of XML configs for including in build. + * Recursively find all XML files in UI configs dir. */ function collectXmlConfigs( acc: Array, diff --git a/cli/format/format_ltx.ts b/cli/format/format_ltx.ts index 33436ccee..a3419481b 100644 --- a/cli/format/format_ltx.ts +++ b/cli/format/format_ltx.ts @@ -50,7 +50,7 @@ async function formatLtxFile(file: string): Promise { */ async function getLtxConfigs(filters: Array = []): Promise> { /** - * todo; + * Collect list of files for LTX formatting in provided directory. */ function collectConfigs(acc: Array, it: TFolderFiles): Array { if (Array.isArray(it)) { diff --git a/cli/parse/parse_externals.ts b/cli/parse/parse_externals.ts index a3a1c4985..6d0e29dc8 100644 --- a/cli/parse/parse_externals.ts +++ b/cli/parse/parse_externals.ts @@ -44,11 +44,11 @@ export async function parseExternals(): Promise { } /** - * Get list of LTX transformable descriptors. + * @returns descriptors of files to parse and generate docs */ async function getSourcesList(source: string): Promise> { /** - * todo; + * Recursively find all files with possible definitions for docs generation. */ function collectList(acc: Array, it: TFolderFiles): Array { if (Array.isArray(it)) { diff --git a/cli/parse/utils/__test__/declaration.ts b/cli/parse/utils/__test__/declaration.ts index e024a92cb..2f32628f4 100644 --- a/cli/parse/utils/__test__/declaration.ts +++ b/cli/parse/utils/__test__/declaration.ts @@ -11,12 +11,12 @@ interface IAbstractInterface { } /** - * todo; + * Mock `extern` method for testing. */ function extern(name: string, cb: (...args: Array) => void): void {} /** - * todo; + * Mock `another` method for testing of incorrect module global level calls. */ function another(name: string, cb: (...args: Array) => void): void {} diff --git a/cli/preview/preview.ts b/cli/preview/preview.ts index 8267a8a55..190bd83b5 100644 --- a/cli/preview/preview.ts +++ b/cli/preview/preview.ts @@ -99,11 +99,11 @@ function createFoldersForConfigs(xmlConfigs: Array } /** - * todo; + * @returns list of files for preview generation */ async function getUiConfigs(filters: Array = []): Promise> { /** - * todo; + * Collect list of xml configs for UI preview generation in a recursive way. */ function collectXmlConfigs( acc: Array, diff --git a/cli/utils/fs/open_folder_in_explorer.ts b/cli/utils/fs/open_folder_in_explorer.ts index 740e0f8aa..442a4c882 100644 --- a/cli/utils/fs/open_folder_in_explorer.ts +++ b/cli/utils/fs/open_folder_in_explorer.ts @@ -2,7 +2,10 @@ import * as cp from "child_process"; import * as os from "os"; /** - * todo; + * Open folder in OS explorer application for fast access. + * + * @param path - directory path to open + * @returns promise resolving on open folder command execution */ export function openFolderInExplorer(path: string): Promise { return new Promise((resolve, reject) => { diff --git a/cli/utils/fs/read_last_lines_of_file.ts b/cli/utils/fs/read_last_lines_of_file.ts index e2a7d7f52..15efc38af 100644 --- a/cli/utils/fs/read_last_lines_of_file.ts +++ b/cli/utils/fs/read_last_lines_of_file.ts @@ -7,7 +7,12 @@ import { Optional } from "#/utils/types"; const NEW_LINE_CHARACTERS: Array = ["\n"]; /** - * todo; + * Read last lines of some text file in a streamed way. + * + * @param filePath - full path to read file + * @param maxLineCount - number of lines to read from EOF + * @param encoding - encoding to use when reading file as text + * @returns last lines of text file */ export async function readLastLinesOfFile( filePath: string, diff --git a/src/engine/core/schemes/combat_idle/PostCombatIdle.ts b/src/engine/core/schemes/combat_idle/PostCombatIdle.ts index a85319ce8..02730c0dd 100644 --- a/src/engine/core/schemes/combat_idle/PostCombatIdle.ts +++ b/src/engine/core/schemes/combat_idle/PostCombatIdle.ts @@ -10,7 +10,8 @@ import { ActionBase, ActionPlanner, ClientObject } from "@/engine/lib/types"; const logger: LuaLogger = new LuaLogger($filename); /** - * todo; + * Post combat idle scheme manager. + * Used to add idle state logics for game objects if it is needed. */ export class PostCombatIdle { /** diff --git a/src/engine/core/schemes/combat_idle/actions/ActionPostCombatIdleWait.ts b/src/engine/core/schemes/combat_idle/actions/ActionPostCombatIdleWait.ts index 9d8807b9b..eaa17293b 100644 --- a/src/engine/core/schemes/combat_idle/actions/ActionPostCombatIdleWait.ts +++ b/src/engine/core/schemes/combat_idle/actions/ActionPostCombatIdleWait.ts @@ -10,7 +10,8 @@ import { ClientObject, Optional } from "@/engine/lib/types"; const logger: LuaLogger = new LuaLogger($filename); /** - * todo; + * Action to wait some time for possible remaining enemies after combat. + * Stalkers wait for some time and then go with alife activity / looting corpses / helping others. */ @LuabindClass() export class ActionPostCombatIdleWait extends action_base { @@ -80,7 +81,10 @@ export class ActionPostCombatIdleWait extends action_base { } /** - * todo; + * todo: Move to utils as pure function? + * + * @param object - object to check weapon staet + * @returns whether weapon is in locked state */ public isWeaponLocked(object: ClientObject): boolean { const isWeaponStrapped: boolean = object.weapon_strapped(); diff --git a/src/engine/core/schemes/combat_idle/evaluators/EvaluatorPostCombatIdleEnemy.ts b/src/engine/core/schemes/combat_idle/evaluators/EvaluatorPostCombatIdleEnemy.ts index 5638257db..dd062dcd0 100644 --- a/src/engine/core/schemes/combat_idle/evaluators/EvaluatorPostCombatIdleEnemy.ts +++ b/src/engine/core/schemes/combat_idle/evaluators/EvaluatorPostCombatIdleEnemy.ts @@ -10,7 +10,7 @@ import { ClientObject, Optional, TDistance, TTimestamp } from "@/engine/lib/type const logger: LuaLogger = new LuaLogger($filename); /** - * todo; + * Evaluatore to check whether post-combat idle state should be active. */ @LuabindClass() export class EvaluatorPostCombatIdleEnemy extends property_evaluator { diff --git a/src/engine/forms/actor_menu.tsx b/src/engine/forms/actor_menu.tsx index 6e7d73f88..426787c0a 100644 --- a/src/engine/forms/actor_menu.tsx +++ b/src/engine/forms/actor_menu.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { captions } from "@/engine/lib/constants/captions"; /** - * todo; + * Actor menu form generation. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/actor_menu_16.tsx b/src/engine/forms/actor_menu_16.tsx index 291e1f3ca..4ea8d0c2d 100644 --- a/src/engine/forms/actor_menu_16.tsx +++ b/src/engine/forms/actor_menu_16.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { captions } from "@/engine/lib/constants/captions"; /** - * todo; + * Actor menu form generation for 16/9 screens. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/actor_menu_item.tsx b/src/engine/forms/actor_menu_item.tsx index ce69c460f..e8aaa4311 100644 --- a/src/engine/forms/actor_menu_item.tsx +++ b/src/engine/forms/actor_menu_item.tsx @@ -4,7 +4,7 @@ import { ArtefactParams } from "@/engine/forms/af_params"; import { BoosterParams } from "@/engine/forms/booster_params"; /** - * todo; + * Actor menu form item form generation. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/actor_menu_item_16.tsx b/src/engine/forms/actor_menu_item_16.tsx index b8cd9283d..e7132931c 100644 --- a/src/engine/forms/actor_menu_item_16.tsx +++ b/src/engine/forms/actor_menu_item_16.tsx @@ -4,7 +4,7 @@ import { ArtefactParams } from "@/engine/forms/af_params_16"; import { BoosterParams } from "@/engine/forms/booster_params_16"; /** - * todo; + * Actor menu form item form generation for 16/9 screens. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/af_params.tsx b/src/engine/forms/af_params.tsx index f0a5454f6..da92a8ec8 100644 --- a/src/engine/forms/af_params.tsx +++ b/src/engine/forms/af_params.tsx @@ -1,14 +1,14 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of UI forms for artefact parameters elements. */ export function create(): JSXNode { return ; } /** - * todo; + * Component describing possible artefact parameters. */ export function ArtefactParams(): JSXNode { return ( diff --git a/src/engine/forms/booster_params.tsx b/src/engine/forms/booster_params.tsx index 73a834c03..b93e78540 100644 --- a/src/engine/forms/booster_params.tsx +++ b/src/engine/forms/booster_params.tsx @@ -12,7 +12,7 @@ export function create(): JSXNode { } /** - * todo; + * Component describing booster parameters for inventory items. */ export function BoosterParams(): JSXNode { return ( diff --git a/src/engine/forms/inventory_upgrade_info.tsx b/src/engine/forms/inventory_upgrade_info.tsx index e76ed1bb1..4d384daa0 100644 --- a/src/engine/forms/inventory_upgrade_info.tsx +++ b/src/engine/forms/inventory_upgrade_info.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Creation of inventory items upgrading possible info forms. */ export function create(): JSXNode { return ; diff --git a/src/engine/forms/maingame.tsx b/src/engine/forms/maingame.tsx index ca10bc1ff..b6a069445 100644 --- a/src/engine/forms/maingame.tsx +++ b/src/engine/forms/maingame.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { GameUi } from "@/engine/forms/game/GameUi.component"; /** - * todo; + * Creation of UI forms related to in-game play interface. */ export function create(): JSXNode { return ; diff --git a/src/engine/forms/maingame_16.tsx b/src/engine/forms/maingame_16.tsx index 84e24276c..81ac6ec42 100644 --- a/src/engine/forms/maingame_16.tsx +++ b/src/engine/forms/maingame_16.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { GameUi } from "@/engine/forms/game/GameUi.component.16"; /** - * todo; + * Creation of UI forms related to in-game play interface (16/9). */ export function create(): JSXNode { return ; diff --git a/src/engine/forms/map_spots.tsx b/src/engine/forms/map_spots.tsx index 95a25d82e..ee2ebd3d3 100644 --- a/src/engine/forms/map_spots.tsx +++ b/src/engine/forms/map_spots.tsx @@ -3,7 +3,7 @@ import { MapSpots } from "@/engine/forms/game/map/MapSpots.component"; /** - * todo; + * Creation of UI forms related to in-game map spots. */ export function create(): JSXNode { return ; diff --git a/src/engine/forms/map_spots_16.tsx b/src/engine/forms/map_spots_16.tsx index 49a8b7f42..33c591d12 100644 --- a/src/engine/forms/map_spots_16.tsx +++ b/src/engine/forms/map_spots_16.tsx @@ -3,7 +3,7 @@ import { MapSpots } from "@/engine/forms/game/map/MapSpots.component.16"; /** - * todo; + * Creation of UI forms related to in-game map spots (16/9). */ export function create(): JSXNode { return ; diff --git a/src/engine/forms/message_box.tsx b/src/engine/forms/message_box.tsx index 03641ac1f..34f7ea912 100644 --- a/src/engine/forms/message_box.tsx +++ b/src/engine/forms/message_box.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Creation of UI forms related to generic message boxes in game. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/message_box_16.tsx b/src/engine/forms/message_box_16.tsx index 7ed4b86ff..6d6a1d8f6 100644 --- a/src/engine/forms/message_box_16.tsx +++ b/src/engine/forms/message_box_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Creation of UI forms related to generic message boxes in game (16/9). */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/mp_buy_menu.tsx b/src/engine/forms/mp_buy_menu.tsx index c1a965c91..a8a01dcc2 100644 --- a/src/engine/forms/mp_buy_menu.tsx +++ b/src/engine/forms/mp_buy_menu.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { MultiplayerBuyButtons } from "@/engine/forms/menu/multiplayer/MultiplayerBuyButtons"; /** - * todo; + * Generation of buy menu forms for multiplayer. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/mp_buy_menu_16.tsx b/src/engine/forms/mp_buy_menu_16.tsx index f715cf6af..2abf23099 100644 --- a/src/engine/forms/mp_buy_menu_16.tsx +++ b/src/engine/forms/mp_buy_menu_16.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { MultiplayerBuyButtons16 } from "@/engine/forms/menu/multiplayer/MultiplayerBuyButtons.16"; /** - * todo; + * Creation of UI forms related to multiplayer buy menu (16/9). */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda.tsx b/src/engine/forms/pda.tsx index b9b09a324..2a93d043f 100644 --- a/src/engine/forms/pda.tsx +++ b/src/engine/forms/pda.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { Pda } from "@/engine/forms/game/map/Pda.component"; /** - * todo; + * Generation of PDA UI forms. */ export function create(): JSXNode { return ; diff --git a/src/engine/forms/pda_16.tsx b/src/engine/forms/pda_16.tsx index f55e0e696..8a6924c40 100644 --- a/src/engine/forms/pda_16.tsx +++ b/src/engine/forms/pda_16.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { Pda } from "@/engine/forms/game/map/Pda.component.16"; /** - * todo; + * Generation of PDA UI forms for 16/9 screens. */ export function create(): JSXNode { return ; diff --git a/src/engine/forms/pda_character.tsx b/src/engine/forms/pda_character.tsx index 65996e5cc..c5ec44708 100644 --- a/src/engine/forms/pda_character.tsx +++ b/src/engine/forms/pda_character.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of PDA character section UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_dialog_character.tsx b/src/engine/forms/pda_dialog_character.tsx index 2de21ee5b..bbd43be0c 100644 --- a/src/engine/forms/pda_dialog_character.tsx +++ b/src/engine/forms/pda_dialog_character.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { captions } from "@/engine/lib/constants/captions"; /** - * todo; + * Generation of PDA character dialogs section UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_dialog_character_16.tsx b/src/engine/forms/pda_dialog_character_16.tsx index 879662e54..d7664dac8 100644 --- a/src/engine/forms/pda_dialog_character_16.tsx +++ b/src/engine/forms/pda_dialog_character_16.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { captions } from "@/engine/lib/constants/captions"; /** - * todo; + * Generation of PDA character dialog section UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_fraction_war.tsx b/src/engine/forms/pda_fraction_war.tsx index 800becd66..ab46251db 100644 --- a/src/engine/forms/pda_fraction_war.tsx +++ b/src/engine/forms/pda_fraction_war.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of PDA faction wars section UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_fraction_war_16.tsx b/src/engine/forms/pda_fraction_war_16.tsx index 14bd18e0f..d6d7211a1 100644 --- a/src/engine/forms/pda_fraction_war_16.tsx +++ b/src/engine/forms/pda_fraction_war_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of PDA faction war section UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_logs.tsx b/src/engine/forms/pda_logs.tsx index e4a11734d..0af37344e 100644 --- a/src/engine/forms/pda_logs.tsx +++ b/src/engine/forms/pda_logs.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of PDA logs section UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_logs_16.tsx b/src/engine/forms/pda_logs_16.tsx index 9f78ebe1a..c652bb8cb 100644 --- a/src/engine/forms/pda_logs_16.tsx +++ b/src/engine/forms/pda_logs_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of PDA logs section UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_ranking.tsx b/src/engine/forms/pda_ranking.tsx index 64a714cbd..d3482e3e6 100644 --- a/src/engine/forms/pda_ranking.tsx +++ b/src/engine/forms/pda_ranking.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { gameSettingConfig } from "@/engine/lib/configs/GameSettingConfig"; /** - * todo; + * Generation of PDA rankings section UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_ranking_16.tsx b/src/engine/forms/pda_ranking_16.tsx index 58c6fd97e..3bc8e8287 100644 --- a/src/engine/forms/pda_ranking_16.tsx +++ b/src/engine/forms/pda_ranking_16.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { gameSettingConfig } from "@/engine/lib/configs/GameSettingConfig"; /** - * todo; + * Generation of PDA rankings section UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_tasks.tsx b/src/engine/forms/pda_tasks.tsx index 1fb55baad..a10ddd447 100644 --- a/src/engine/forms/pda_tasks.tsx +++ b/src/engine/forms/pda_tasks.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of PDA tasks section UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/pda_tasks_16.tsx b/src/engine/forms/pda_tasks_16.tsx index 48b02989f..e08ea117f 100644 --- a/src/engine/forms/pda_tasks_16.tsx +++ b/src/engine/forms/pda_tasks_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of PDA tasks section UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/scroll_bar.tsx b/src/engine/forms/scroll_bar.tsx index dfb3ddbf3..dffdd3010 100644 --- a/src/engine/forms/scroll_bar.tsx +++ b/src/engine/forms/scroll_bar.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of scroll bar UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/scroll_bar_16.tsx b/src/engine/forms/scroll_bar_16.tsx index eb4ab3943..4fe88cccc 100644 --- a/src/engine/forms/scroll_bar_16.tsx +++ b/src/engine/forms/scroll_bar_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of scroll bar UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/server_info.tsx b/src/engine/forms/server_info.tsx index 9cea3b383..fb0ef7e54 100644 --- a/src/engine/forms/server_info.tsx +++ b/src/engine/forms/server_info.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of multiplayer server info UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/skin_selector.tsx b/src/engine/forms/skin_selector.tsx index d2c837099..f77c2c936 100644 --- a/src/engine/forms/skin_selector.tsx +++ b/src/engine/forms/skin_selector.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of multiplayer skin selector UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/skin_selector_16.tsx b/src/engine/forms/skin_selector_16.tsx index 2c80ce74b..f43acd69d 100644 --- a/src/engine/forms/skin_selector_16.tsx +++ b/src/engine/forms/skin_selector_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of multiplayer skin selector UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/spawn.tsx b/src/engine/forms/spawn.tsx index 988406fee..e07d9fc97 100644 --- a/src/engine/forms/spawn.tsx +++ b/src/engine/forms/spawn.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of multiplayer team selection UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/spawn_16.tsx b/src/engine/forms/spawn_16.tsx index bad26ec4b..0c9e9c067 100644 --- a/src/engine/forms/spawn_16.tsx +++ b/src/engine/forms/spawn_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of multiplayer team selection UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/stalkers_ranking_character.tsx b/src/engine/forms/stalkers_ranking_character.tsx index d1925640f..9798e9277 100644 --- a/src/engine/forms/stalkers_ranking_character.tsx +++ b/src/engine/forms/stalkers_ranking_character.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of character details UI forms in rankings. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/stalkers_ranking_character_16.tsx b/src/engine/forms/stalkers_ranking_character_16.tsx index 33fd85991..0a43ca770 100644 --- a/src/engine/forms/stalkers_ranking_character_16.tsx +++ b/src/engine/forms/stalkers_ranking_character_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of character details UI forms in rankings for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/statisticwnd.tsx b/src/engine/forms/statisticwnd.tsx index 92ab64aed..a82b216ab 100644 --- a/src/engine/forms/statisticwnd.tsx +++ b/src/engine/forms/statisticwnd.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of statistic window UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/stats.tsx b/src/engine/forms/stats.tsx index 7ec5aa110..14faf8fee 100644 --- a/src/engine/forms/stats.tsx +++ b/src/engine/forms/stats.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of multiplayer stats window UI forms. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/stats_16.tsx b/src/engine/forms/stats_16.tsx index fafd52450..e648d7578 100644 --- a/src/engine/forms/stats_16.tsx +++ b/src/engine/forms/stats_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of multiplayer stats window UI forms for 16/9. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/strelok_progress.tsx b/src/engine/forms/strelok_progress.tsx index bf1eb0a3e..ee7d80860 100644 --- a/src/engine/forms/strelok_progress.tsx +++ b/src/engine/forms/strelok_progress.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of strelok progress UI forms for quest. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/talk.tsx b/src/engine/forms/talk.tsx index 8284c2929..cdb3ea9ff 100644 --- a/src/engine/forms/talk.tsx +++ b/src/engine/forms/talk.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of UI forms for talking. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/talk_16.tsx b/src/engine/forms/talk_16.tsx index 15d563d0b..5f72df83c 100644 --- a/src/engine/forms/talk_16.tsx +++ b/src/engine/forms/talk_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of UI forms for talking (16/9). */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/talk_character.tsx b/src/engine/forms/talk_character.tsx index d5e6db035..adac664e3 100644 --- a/src/engine/forms/talk_character.tsx +++ b/src/engine/forms/talk_character.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of UI forms related to character in talk menu. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/talk_character_16.tsx b/src/engine/forms/talk_character_16.tsx index 3cc1962fe..bd2a2a08a 100644 --- a/src/engine/forms/talk_character_16.tsx +++ b/src/engine/forms/talk_character_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of UI forms related to character in talk menu (16/9). */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_credits.tsx b/src/engine/forms/ui_credits.tsx index d69206b40..cb5690a4c 100644 --- a/src/engine/forms/ui_credits.tsx +++ b/src/engine/forms/ui_credits.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { MenuCredits } from "@/engine/forms/menu/MenuCredits"; /** - * todo; + * Generation of UI forms related to game credits. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_credits_16.tsx b/src/engine/forms/ui_credits_16.tsx index c2c7e446c..fe29f373b 100644 --- a/src/engine/forms/ui_credits_16.tsx +++ b/src/engine/forms/ui_credits_16.tsx @@ -3,7 +3,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; import { MenuCredits } from "@/engine/forms/menu/MenuCredits"; /** - * todo; + * Generation of UI forms related to game credits (16/9). */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_custom_msgs.tsx b/src/engine/forms/ui_custom_msgs.tsx index 24fa53c24..e41e149b1 100644 --- a/src/engine/forms/ui_custom_msgs.tsx +++ b/src/engine/forms/ui_custom_msgs.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of UI forms related to custom messages in game. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_detector_artefact.tsx b/src/engine/forms/ui_detector_artefact.tsx index 2f6267c28..0e0138ef7 100644 --- a/src/engine/forms/ui_detector_artefact.tsx +++ b/src/engine/forms/ui_detector_artefact.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of ui forms related to detector artefact display. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_game_ahunt.tsx b/src/engine/forms/ui_game_ahunt.tsx index 5bb0f4575..bd1b89eeb 100644 --- a/src/engine/forms/ui_game_ahunt.tsx +++ b/src/engine/forms/ui_game_ahunt.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of UI forms related to artefact hunt mode in multiplayer. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_game_ahunt_16.tsx b/src/engine/forms/ui_game_ahunt_16.tsx index 707204da2..5110d6803 100644 --- a/src/engine/forms/ui_game_ahunt_16.tsx +++ b/src/engine/forms/ui_game_ahunt_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Generation of UI forms related to artefact hunt mode in multiplayer (16/9). */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_mapinfo.tsx b/src/engine/forms/ui_mapinfo.tsx index a82bb610d..de8a8790f 100644 --- a/src/engine/forms/ui_mapinfo.tsx +++ b/src/engine/forms/ui_mapinfo.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Creation of generic UI forms related to map information labels. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_mm_versions_dlg.tsx b/src/engine/forms/ui_mm_versions_dlg.tsx index 82563c99d..70f24ac1d 100644 --- a/src/engine/forms/ui_mm_versions_dlg.tsx +++ b/src/engine/forms/ui_mm_versions_dlg.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Creation of ui components related to main menu versions dialog. */ export function create(): JSXNode { return ( diff --git a/src/engine/forms/ui_mm_versions_dlg_16.tsx b/src/engine/forms/ui_mm_versions_dlg_16.tsx index 4d2759bad..d921f6f37 100644 --- a/src/engine/forms/ui_mm_versions_dlg_16.tsx +++ b/src/engine/forms/ui_mm_versions_dlg_16.tsx @@ -1,7 +1,7 @@ import { JSXNode, JSXXML } from "jsx-xml"; /** - * todo; + * Creation of ui components related to main menu versions dialog (16/9). */ export function create(): JSXNode { return ( diff --git a/src/engine/lib/constants/fonts.ts b/src/engine/lib/constants/fonts.ts index 5844db168..56008c7cd 100644 --- a/src/engine/lib/constants/fonts.ts +++ b/src/engine/lib/constants/fonts.ts @@ -1,7 +1,7 @@ /* eslint sort-keys-fix/sort-keys-fix: "error" */ /** - * todo; + * Declaration of fonts available for in-game usage. */ export const fonts = { graffiti19: "graffiti19", @@ -12,11 +12,11 @@ export const fonts = { } as const; /** - * todo; + * Definition of all possible font config. */ export type TFonts = typeof fonts; /** - * todo; + * Signgle possible font type definition. */ export type TFontId = keyof TFonts; diff --git a/src/engine/lib/constants/game_difficulties.ts b/src/engine/lib/constants/game_difficulties.ts index 3cb262054..e9196e474 100644 --- a/src/engine/lib/constants/game_difficulties.ts +++ b/src/engine/lib/constants/game_difficulties.ts @@ -1,7 +1,7 @@ /* eslint sort-keys-fix/sort-keys-fix: "error" */ /** - * todo; + * List of possible game difficulties. */ export const gameDifficulties = { gd_master: "gd_master", @@ -11,12 +11,12 @@ export const gameDifficulties = { } as const; /** - * todo; + * Definition of all difficulties' config. */ export type TGameDifficulties = typeof gameDifficulties; /** - * todo; + * Possible game difficulty type definition. */ export type TGameDifficulty = TGameDifficulties[keyof TGameDifficulties]; diff --git a/src/engine/scripts/declarations/callbacks/actor.ts b/src/engine/scripts/declarations/callbacks/actor.ts index 01875d213..8364e44b9 100644 --- a/src/engine/scripts/declarations/callbacks/actor.ts +++ b/src/engine/scripts/declarations/callbacks/actor.ts @@ -8,7 +8,7 @@ const logger: LuaLogger = new LuaLogger($filename); logger.info("Resolve and bind actor externals"); /** - * todo; + * Handle actor critical power levels. */ extern("on_actor_critical_power", () => { logger.info("Actor critical power"); @@ -64,43 +64,43 @@ extern("on_actor_psy", () => { }); /** - * todo; + * Handle zone traveling with different set of callbacks. */ extern("travel_callbacks", { initializeTravellerDialog: (dialog: PhraseDialog) => TravelManager.getInstance().initializeTravellerDialog(dialog), - canStartTravelingDialogs: (actor: ClientObject, npc: ClientObject) => - TravelManager.getInstance().canStartTravelingDialogs(actor, npc), - getSquadCurrentActionDescription: (actor: ClientObject, npc: ClientObject): TLabel => - TravelManager.getInstance().getSquadCurrentActionDescription(actor, npc), - canActorMoveWithSquad: (actor: ClientObject, npc: ClientObject): boolean => - TravelManager.getInstance().canActorMoveWithSquad(actor, npc), - canSquadTakeActor: (actor: ClientObject, npc: ClientObject) => - TravelManager.getInstance().canSquadTakeActor(actor, npc), - cannotSquadTakeActor: (npc: ClientObject, actor: ClientObject, dialogId: TStringId, phraseId: TStringId) => - TravelManager.getInstance().cannotSquadTakeActor(npc, actor, dialogId, phraseId), - onTravelTogetherWithSquad: (npc: ClientObject, actor: ClientObject, dialogId: TStringId, phraseId: TStringId) => - TravelManager.getInstance().onTravelTogetherWithSquad(npc, actor, dialogId, phraseId), + canStartTravelingDialogs: (actor: ClientObject, object: ClientObject) => + TravelManager.getInstance().canStartTravelingDialogs(actor, object), + getSquadCurrentActionDescription: (actor: ClientObject, object: ClientObject): TLabel => + TravelManager.getInstance().getSquadCurrentActionDescription(actor, object), + canActorMoveWithSquad: (actor: ClientObject, object: ClientObject): boolean => + TravelManager.getInstance().canActorMoveWithSquad(actor, object), + canSquadTakeActor: (actor: ClientObject, object: ClientObject) => + TravelManager.getInstance().canSquadTakeActor(actor, object), + cannotSquadTakeActor: (object: ClientObject, actor: ClientObject, dialogId: TStringId, phraseId: TStringId) => + TravelManager.getInstance().cannotSquadTakeActor(object, actor, dialogId, phraseId), + onTravelTogetherWithSquad: (object: ClientObject, actor: ClientObject, dialogId: TStringId, phraseId: TStringId) => + TravelManager.getInstance().onTravelTogetherWithSquad(object, actor, dialogId, phraseId), onTravelToSpecificSmartWithSquad: ( actor: ClientObject, - npc: ClientObject, + object: ClientObject, dialogId: TStringId, phraseId: TStringId - ) => TravelManager.getInstance().onTravelToSpecificSmartWithSquad(actor, npc, dialogId, phraseId), - canSquadTravel: (npc: ClientObject, actor: ClientObject, dialogId: TStringId, phraseId: TStringId) => - TravelManager.getInstance().canSquadTravel(npc, actor, dialogId, phraseId), + ) => TravelManager.getInstance().onTravelToSpecificSmartWithSquad(actor, object, dialogId, phraseId), + canSquadTravel: (object: ClientObject, actor: ClientObject, dialogId: TStringId, phraseId: TStringId) => + TravelManager.getInstance().canSquadTravel(object, actor, dialogId, phraseId), canNegotiateTravelToSmart: ( actor: ClientObject, - npc: ClientObject, + object: ClientObject, dialogId: TStringId, prevPhraseId: TStringId, phraseId: TStringId - ) => TravelManager.getInstance().canNegotiateTravelToSmart(actor, npc, dialogId, prevPhraseId, phraseId), - getTravelConst: (actor: ClientObject, npc: ClientObject, dialogId: TStringId, phraseId: TStringId): TLabel => - TravelManager.getInstance().getTravelConst(actor, npc, dialogId, phraseId), - isEnoughMoneyToTravel: (actor: ClientObject, npc: ClientObject, dialogId: TStringId, phraseId: TStringId) => - TravelManager.getInstance().isEnoughMoneyToTravel(actor, npc, dialogId, phraseId), - isNotEnoughMoneyToTravel: (actor: ClientObject, npc: ClientObject, dialogId: TStringId, phraseId: TStringId) => - TravelManager.getInstance().isNotEnoughMoneyToTravel(actor, npc, dialogId, phraseId), - cannotSquadTravel: (npc: ClientObject, actor: ClientObject, dialogId: TStringId, phraseId: TStringId) => - TravelManager.getInstance().cannotSquadTravel(npc, actor, dialogId, phraseId), + ) => TravelManager.getInstance().canNegotiateTravelToSmart(actor, object, dialogId, prevPhraseId, phraseId), + getTravelConst: (actor: ClientObject, object: ClientObject, dialogId: TStringId, phraseId: TStringId): TLabel => + TravelManager.getInstance().getTravelConst(actor, object, dialogId, phraseId), + isEnoughMoneyToTravel: (actor: ClientObject, object: ClientObject, dialogId: TStringId, phraseId: TStringId) => + TravelManager.getInstance().isEnoughMoneyToTravel(actor, object, dialogId, phraseId), + isNotEnoughMoneyToTravel: (actor: ClientObject, object: ClientObject, dialogId: TStringId, phraseId: TStringId) => + TravelManager.getInstance().isNotEnoughMoneyToTravel(actor, object, dialogId, phraseId), + cannotSquadTravel: (object: ClientObject, actor: ClientObject, dialogId: TStringId, phraseId: TStringId) => + TravelManager.getInstance().cannotSquadTravel(object, actor, dialogId, phraseId), }); diff --git a/src/engine/scripts/declarations/callbacks/custom.ts b/src/engine/scripts/declarations/callbacks/custom.ts index ecb555820..ab9dacb9b 100644 --- a/src/engine/scripts/declarations/callbacks/custom.ts +++ b/src/engine/scripts/declarations/callbacks/custom.ts @@ -43,27 +43,33 @@ extern("engine.surge_survive_start", () => SurgeManager.getInstance().onSurgeSur extern("engine.surge_survive_end", () => SurgeManager.getInstance().onSurgeSurviveEnd()); /** - * todo; + * Check whether task with provided ID is completed. */ extern("engine.is_task_completed", (taskId: TStringId): boolean => TaskManager.getInstance().isTaskCompleted(taskId)); /** - * todo; + * Check whether task with provided ID is failed. */ extern("engine.is_task_failed", (taskId: TStringId): boolean => TaskManager.getInstance().isTaskFailed(taskId)); /** - * todo; + * Callback of game effector. + * When some camera effects from cutscene ends, handle it in scheme. + * + * todo: rename to camera_effector_callback? */ extern("engine.effector_callback", () => SchemeCutscene.onCutsceneEnd()); /** * Checkers for achievements called from C++. + * Creates set of callbacks in generic way. */ extern( "engine.check_achievement", Object.values(EAchievement).reduce>((acc, it) => { - acc[it] = () => AchievementsManager.getInstance().checkAchieved(it); + const manager: AchievementsManager = AchievementsManager.getInstance(); + + acc[it] = () => manager.checkAchieved(it); return acc; }, {}) diff --git a/src/engine/scripts/declarations/callbacks/game.ts b/src/engine/scripts/declarations/callbacks/game.ts index 9e04ff6b7..8fb25471e 100644 --- a/src/engine/scripts/declarations/callbacks/game.ts +++ b/src/engine/scripts/declarations/callbacks/game.ts @@ -1,6 +1,3 @@ -/** - * Outro conditions for game ending based on alife information. - */ import { SaveManager } from "@/engine/core/managers/base/SaveManager"; import { TradeManager } from "@/engine/core/managers/interaction/TradeManager"; import { smartCoversList } from "@/engine/core/objects/animation/smart_covers"; @@ -13,13 +10,16 @@ const logger: LuaLogger = new LuaLogger($filename); logger.info("Resolve and bind game externals"); -// todo: Check if needed. +/** + * Declare list of available smart covers for game engine. + * Xray uses it internally. + */ extern("smart_covers", { descriptions: smartCoversList, }); /** - * todo; + * Module of callbacks related to game outro. */ extern("outro", { conditions: GameOutroManager.OUTRO_CONDITIONS, @@ -30,7 +30,8 @@ extern("outro", { }); /** - * todo; + * Trading callbacks module. + * Adjust pricing / trading from lua. */ extern("trade_manager", { get_sell_discount: (objectId: TNumberId) => TradeManager.getInstance().getSellDiscountForObject(objectId), diff --git a/src/engine/scripts/declarations/callbacks/interface.ts b/src/engine/scripts/declarations/callbacks/interface.ts index a838aebf7..8d2202ac0 100644 --- a/src/engine/scripts/declarations/callbacks/interface.ts +++ b/src/engine/scripts/declarations/callbacks/interface.ts @@ -32,7 +32,7 @@ extern("loadscreen", { }); /** - * todo; + * Handle item upgrade callbacks from game engine. */ extern("inventory_upgrades", { get_upgrade_cost: (section: TSection): TLabel => ItemUpgradesManager.getInstance().getUpgradeCost(section), @@ -59,7 +59,7 @@ extern("inventory_upgrades", { }); /** - * todo; + * Handle actor menu modes switching (pda, map, inventory). */ extern("actor_menu", { actor_menu_mode: (mode: EActorMenuMode): void => { @@ -68,9 +68,18 @@ extern("actor_menu", { }); /** - * todo; + * Handle actor menu callbacks. */ extern("actor_menu_inventory", { + /** + * Handle drag and drop event in inventory. + * + * @param from - from object in inventory dropped + * @param to - to object in inventory dropped + * @param oldList - old menu type + * @param newList - new menu type + * @returns whether drag drop was handled + */ CUIActorMenu_OnItemDropped: ( from: ClientObject, to: ClientObject,