Skip to content

Commit

Permalink
More jsdoc blocks. Fill descriptions instead of todo;.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neloreck committed Aug 14, 2023
1 parent 4c7a3df commit 482a628
Show file tree
Hide file tree
Showing 74 changed files with 152 additions and 120 deletions.
3 changes: 2 additions & 1 deletion cli/build/steps/configs_dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export async function buildDynamicConfigs(parameters: IBuildCommandParameters):
*/
async function getLtxConfigs(filters: Array<string> = []): Promise<Array<TFolderReplicationDescriptor>> {
/**
* todo;
* Collect list of LTX configs for further transformation in typescript.
* Recursively find all ts files in configs dir.
*/
function collectLtxConfigs(
acc: Array<TFolderReplicationDescriptor>,
Expand Down
3 changes: 2 additions & 1 deletion cli/build/steps/configs_statics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export async function buildStaticConfigs(parameters: IBuildCommandParameters): P
*/
async function getStaticConfigs(filters: Array<string> = []): Promise<Array<TFolderReplicationDescriptor>> {
/**
* todo;
* Collect list of LTX configs for including in build.
* Recursively find all ltx files in configs dir.
*/
function collectConfigs(
acc: Array<TFolderReplicationDescriptor>,
Expand Down
2 changes: 1 addition & 1 deletion cli/build/steps/translations_dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function buildDynamicTranslations(): Promise<void> {
}

/**
* todo;
* Collect list of all dynamic translations recursively in provided directory.
*/
function collectTranslations(
acc: Array<TFolderReplicationDescriptor>,
Expand Down
2 changes: 1 addition & 1 deletion cli/build/steps/ui_dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export async function buildDynamicUi(parameters: IBuildCommandParameters): Promi
*/
async function getUiConfigs(filters: Array<string> = []): Promise<Array<TFolderReplicationDescriptor>> {
/**
* todo;
* Collect list of ts configs for including in build and correctly transforming to XML forms.
*/
function collectXmlConfigs(
acc: Array<TFolderReplicationDescriptor>,
Expand Down
3 changes: 2 additions & 1 deletion cli/build/steps/ui_statics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export async function buildStaticUi(parameters: IBuildCommandParameters): Promis
*/
async function getUiConfigs(filters: Array<string> = []): Promise<Array<TFolderReplicationDescriptor>> {
/**
* todo;
* Collect list of XML configs for including in build.
* Recursively find all XML files in UI configs dir.
*/
function collectXmlConfigs(
acc: Array<TFolderReplicationDescriptor>,
Expand Down
2 changes: 1 addition & 1 deletion cli/format/format_ltx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function formatLtxFile(file: string): Promise<void> {
*/
async function getLtxConfigs(filters: Array<string> = []): Promise<Array<string>> {
/**
* todo;
* Collect list of files for LTX formatting in provided directory.
*/
function collectConfigs(acc: Array<string>, it: TFolderFiles): Array<string> {
if (Array.isArray(it)) {
Expand Down
4 changes: 2 additions & 2 deletions cli/parse/parse_externals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ export async function parseExternals(): Promise<void> {
}

/**
* Get list of LTX transformable descriptors.
* @returns descriptors of files to parse and generate docs
*/
async function getSourcesList(source: string): Promise<Array<string>> {
/**
* todo;
* Recursively find all files with possible definitions for docs generation.
*/
function collectList(acc: Array<string>, it: TFolderFiles): Array<string> {
if (Array.isArray(it)) {
Expand Down
4 changes: 2 additions & 2 deletions cli/parse/utils/__test__/declaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ interface IAbstractInterface {
}

/**
* todo;
* Mock `extern` method for testing.
*/
function extern(name: string, cb: (...args: Array<unknown>) => void): void {}

/**
* todo;
* Mock `another` method for testing of incorrect module global level calls.
*/
function another(name: string, cb: (...args: Array<unknown>) => void): void {}

Expand Down
4 changes: 2 additions & 2 deletions cli/preview/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ function createFoldersForConfigs(xmlConfigs: Array<TFolderReplicationDescriptor>
}

/**
* todo;
* @returns list of files for preview generation
*/
async function getUiConfigs(filters: Array<string> = []): Promise<Array<TFolderReplicationDescriptor>> {
/**
* todo;
* Collect list of xml configs for UI preview generation in a recursive way.
*/
function collectXmlConfigs(
acc: Array<TFolderReplicationDescriptor>,
Expand Down
5 changes: 4 additions & 1 deletion cli/utils/fs/open_folder_in_explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
return new Promise((resolve, reject) => {
Expand Down
7 changes: 6 additions & 1 deletion cli/utils/fs/read_last_lines_of_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import { Optional } from "#/utils/types";
const NEW_LINE_CHARACTERS: Array<string> = ["\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,
Expand Down
3 changes: 2 additions & 1 deletion src/engine/core/schemes/combat_idle/PostCombatIdle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/actor_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/actor_menu_16.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/actor_menu_item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/actor_menu_item_16.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions src/engine/forms/af_params.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { JSXNode, JSXXML } from "jsx-xml";

/**
* todo;
* Generation of UI forms for artefact parameters elements.
*/
export function create(): JSXNode {
return <ArtefactParams />;
}

/**
* todo;
* Component describing possible artefact parameters.
*/
export function ArtefactParams(): JSXNode {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/booster_params.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function create(): JSXNode {
}

/**
* todo;
* Component describing booster parameters for inventory items.
*/
export function BoosterParams(): JSXNode {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/inventory_upgrade_info.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { JSXNode, JSXXML } from "jsx-xml";

/**
* todo;
* Creation of inventory items upgrading possible info forms.
*/
export function create(): JSXNode {
return <w></w>;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/maingame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <GameUi />;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/maingame_16.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <GameUi />;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/map_spots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MapSpots />;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/map_spots_16.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MapSpots />;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/message_box.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/message_box_16.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/mp_buy_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/mp_buy_menu_16.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Pda />;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_16.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Pda />;
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_character.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { JSXNode, JSXXML } from "jsx-xml";

/**
* todo;
* Generation of PDA character section UI forms.
*/
export function create(): JSXNode {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_dialog_character.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_dialog_character_16.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_fraction_war.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { JSXNode, JSXXML } from "jsx-xml";

/**
* todo;
* Generation of PDA faction wars section UI forms.
*/
export function create(): JSXNode {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_fraction_war_16.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_logs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { JSXNode, JSXXML } from "jsx-xml";

/**
* todo;
* Generation of PDA logs section UI forms.
*/
export function create(): JSXNode {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_logs_16.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/engine/forms/pda_ranking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Loading

0 comments on commit 482a628

Please sign in to comment.