Skip to content

Commit

Permalink
Renaming utils folders / files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neloreck committed Jul 3, 2023
1 parent b17baa6 commit 44f1518
Show file tree
Hide file tree
Showing 210 changed files with 958 additions and 920 deletions.
2 changes: 1 addition & 1 deletion src/engine/core/database/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { registry } from "@/engine/core/database/registry";
import { closeLoadMarker, closeSaveMarker, openLoadMarker, openSaveMarker } from "@/engine/core/database/save_markers";
import { IRegistryObjectState } from "@/engine/core/database/types";
import { ESchemeEvent, IBaseSchemeState } from "@/engine/core/schemes/base/types";
import { emitSchemeEvent } from "@/engine/core/utils/scheme/event";
import { emitSchemeEvent } from "@/engine/core/utils/scheme/scheme_event";
import { readTimeFromPacket, writeTimeToPacket } from "@/engine/core/utils/time";
import { NIL } from "@/engine/lib/constants/words";
import {
Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/database/monster.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { clsid } from "xray16";

import { abort } from "@/engine/core/utils/assertion";
import { readIniString } from "@/engine/core/utils/ini/read";
import { readIniString } from "@/engine/core/utils/ini/ini_read";
import { LuaLogger } from "@/engine/core/utils/logging";
import { EMonsterState } from "@/engine/lib/constants/monsters";
import { ClientObject, IniFile, Optional, TSection } from "@/engine/lib/types";
Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/database/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type { CampStoryManager } from "@/engine/core/schemes/camper";
import type { PatrolManager } from "@/engine/core/schemes/patrol";
import type { ReachTaskPatrolManager } from "@/engine/core/schemes/reach_task";
import type { LightManager } from "@/engine/core/schemes/sr_light";
import type { TConditionList } from "@/engine/core/utils/ini/types";
import type { TConditionList } from "@/engine/core/utils/ini/ini_types";
import type { ERelation } from "@/engine/core/utils/relation";
import { storyNames, TStoryName } from "@/engine/lib/constants/story_names";
import type {
Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/database/simulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { clsid } from "xray16";
import { SIMULATION_OBJECTS_PROPS_LTX } from "@/engine/core/database/ini_registry";
import { registry } from "@/engine/core/database/registry";
import { TSimulationObject } from "@/engine/core/objects/server/types";
import { parseConditionsList } from "@/engine/core/utils/ini/parse";
import { parseConditionsList } from "@/engine/core/utils/ini/ini_parse";
import { ACTOR, DEFAULT } from "@/engine/lib/constants/words";
import { TCount, TSection } from "@/engine/lib/types";

Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/database/story_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { alife, level } from "xray16";
import { SYSTEM_INI } from "@/engine/core/database/ini_registry";
import { registry } from "@/engine/core/database/registry";
import { abort, assert } from "@/engine/core/utils/assertion";
import { readIniString } from "@/engine/core/utils/ini/read";
import { readIniString } from "@/engine/core/utils/ini/ini_read";
import { ClientObject, IniFile, Optional, ServerObject, TName, TNumberId, TStringId } from "@/engine/lib/types";

/**
Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/managers/debug/DebugManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { EStateActionId } from "@/engine/core/objects/state";
import { StalkerStateManager } from "@/engine/core/objects/state/StalkerStateManager";
import { EActionId } from "@/engine/core/schemes";
import { LuaLogger } from "@/engine/core/utils/logging";
import { getNumberRelationBetweenCommunities } from "@/engine/core/utils/relation/get";
import { getNumberRelationBetweenCommunities } from "@/engine/core/utils/relation";
import { gameTimeToString } from "@/engine/core/utils/time";
import { toJSON } from "@/engine/core/utils/transform/json";
import { stalkerCommunities, TCommunity } from "@/engine/lib/constants/communities";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { Squad } from "@/engine/core/objects/server/squad/Squad";
import { TSimulationObject } from "@/engine/core/objects/server/types";
import { evaluateSimulationPriority } from "@/engine/core/utils/alife";
import { abort } from "@/engine/core/utils/assertion";
import { parseStringsList } from "@/engine/core/utils/ini/parse";
import { parseStringsList } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { changeTeamSquadGroup } from "@/engine/core/utils/object/object_general";
import { changeTeamSquadGroup } from "@/engine/core/utils/object/object_set";
import { setSquadRelationToActor } from "@/engine/core/utils/relation";
import { TCommunity } from "@/engine/lib/constants/communities";
import { levels, TLevel } from "@/engine/lib/constants/levels";
Expand Down
7 changes: 2 additions & 5 deletions src/engine/core/managers/interaction/TradeManager.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { ini_file, time_global } from "xray16";

import { closeLoadMarker, closeSaveMarker, openSaveMarker, registry } from "@/engine/core/database";
import { openLoadMarker } from "@/engine/core/database/save_markers";
import { closeLoadMarker, closeSaveMarker, openLoadMarker, openSaveMarker, registry } from "@/engine/core/database";
import { AbstractCoreManager } from "@/engine/core/managers/base/AbstractCoreManager";
import { abort, assert } from "@/engine/core/utils/assertion";
import { pickSectionFromCondList } from "@/engine/core/utils/ini/config";
import { parseConditionsList } from "@/engine/core/utils/ini/parse";
import { readIniNumber, readIniString } from "@/engine/core/utils/ini/read";
import { parseConditionsList, pickSectionFromCondList, readIniNumber, readIniString } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import {
ClientObject,
Expand Down
2 changes: 1 addition & 1 deletion src/engine/core/managers/interaction/dialog/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IConfigCondition } from "@/engine/core/utils/ini/types";
import type { IConfigCondition } from "@/engine/core/utils/ini";
import { LuaArray, Optional, TName, TStringId } from "@/engine/lib/types";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { disposeManager, registerActor, registry, TASK_MANAGER_LTX } from "@/eng
import { TaskManager } from "@/engine/core/managers/interaction/tasks/TaskManager";
import { TaskObject } from "@/engine/core/managers/interaction/tasks/TaskObject";
import { ETaskStatus } from "@/engine/core/managers/interaction/tasks/types";
import { parseConditionsList } from "@/engine/core/utils/ini/parse";
import { parseConditionsList } from "@/engine/core/utils/ini/ini_parse";
import { NIL } from "@/engine/lib/constants/words";
import { MockLuaTable } from "@/fixtures/lua/mocks/LuaTable.mock";
import { mockClientGameObject } from "@/fixtures/xray";
Expand Down
15 changes: 10 additions & 5 deletions src/engine/core/managers/interaction/tasks/TaskObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,23 @@ import {
closeLoadMarker,
closeSaveMarker,
getObjectIdByStoryId,
openLoadMarker,
openSaveMarker,
registry,
} from "@/engine/core/database";
import { openLoadMarker } from "@/engine/core/database/save_markers";
import { ETaskState, ETaskStatus, POSSIBLE_STATES } from "@/engine/core/managers/interaction/tasks/types";
import { NotificationManager } from "@/engine/core/managers/interface/notifications";
import { assertDefined } from "@/engine/core/utils/assertion";
import { getExtern } from "@/engine/core/utils/binding";
import { pickSectionFromCondList } from "@/engine/core/utils/ini/config";
import { parseConditionsList, parseStringsList } from "@/engine/core/utils/ini/parse";
import { readIniBoolean, readIniNumber, readIniString } from "@/engine/core/utils/ini/read";
import { TConditionList } from "@/engine/core/utils/ini/types";
import {
parseConditionsList,
parseStringsList,
pickSectionFromCondList,
readIniBoolean,
readIniNumber,
readIniString,
TConditionList,
} from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { giveMoneyToActor, transferItemsToActor } from "@/engine/core/utils/task_reward";
import { readTimeFromPacket, writeTimeToPacket } from "@/engine/core/utils/time";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { system_ini } from "xray16";

import { AbstractCoreManager } from "@/engine/core/managers/base/AbstractCoreManager";
import { executeConsoleCommand } from "@/engine/core/utils/console";
import { readIniString } from "@/engine/core/utils/ini/read";
import { readIniString } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { consoleCommands } from "@/engine/lib/constants/console_commands";
import { ACTOR } from "@/engine/lib/constants/words";
Expand Down
9 changes: 6 additions & 3 deletions src/engine/core/managers/interface/ItemUpgradesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { game } from "xray16";

import { ITEM_UPGRADES, registry, STALKER_UPGRADE_INFO, SYSTEM_INI } from "@/engine/core/database";
import { AbstractCoreManager } from "@/engine/core/managers/base/AbstractCoreManager";
import { pickSectionFromCondList } from "@/engine/core/utils/ini/config";
import { parseConditionsList, parseStringsList } from "@/engine/core/utils/ini/parse";
import { TConditionList } from "@/engine/core/utils/ini/types";
import {
parseConditionsList,
parseStringsList,
pickSectionFromCondList,
TConditionList,
} from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { gameSettingConfig } from "@/engine/lib/configs/GameSettingConfig";
import { captions, TCaption } from "@/engine/lib/constants/captions/captions";
Expand Down
9 changes: 3 additions & 6 deletions src/engine/core/managers/interface/MapDisplayManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ import {
sleepZones,
} from "@/engine/core/managers/interface/MapDisplayManagerObjects";
import { hasAlifeInfo } from "@/engine/core/utils/info_portion";
import { pickSectionFromCondList } from "@/engine/core/utils/ini/config";
import { parseConditionsList } from "@/engine/core/utils/ini/parse";
import { readIniString } from "@/engine/core/utils/ini/read";
import { TConditionList } from "@/engine/core/utils/ini/types";
import { parseConditionsList, pickSectionFromCondList, readIniString, TConditionList } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { anomalyHasArtefact } from "@/engine/core/utils/object/object_general";
import { anomalyHasArtefact } from "@/engine/core/utils/object/object_anomaly";
import { captions } from "@/engine/lib/constants/captions/captions";
import { infoPortions } from "@/engine/lib/constants/info_portions/info_portions";
import { levels } from "@/engine/lib/constants/levels";
Expand Down Expand Up @@ -239,7 +236,7 @@ export class MapDisplayManager extends AbstractCoreManager {
let hint: TLabel = game.translate_string(scanner.hint) + "\\n" + " \\n";
const actor: ClientObject = registry.actor;

const [hasArtefact, artefactTable] = anomalyHasArtefact(actor, null, [scanner.zone, null]);
const [hasArtefact, artefactTable] = anomalyHasArtefact(actor, null, scanner.zone, null);

if (hasArtefact) {
hint = hint + game.translate_string(captions.st_jup_b32_has_af);
Expand Down
14 changes: 10 additions & 4 deletions src/engine/core/managers/sounds/GlobalSoundManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { closeLoadMarker, closeSaveMarker, openSaveMarker, registry, SCRIPT_SOUND_LTX } from "@/engine/core/database";
import { openLoadMarker } from "@/engine/core/database/save_markers";
import {
closeLoadMarker,
closeSaveMarker,
openLoadMarker,
openSaveMarker,
registry,
SCRIPT_SOUND_LTX,
} from "@/engine/core/database";
import { AbstractCoreManager } from "@/engine/core/managers/base/AbstractCoreManager";
import { EGameEvent, EventsManager } from "@/engine/core/managers/events";
import { AbstractPlayableSound } from "@/engine/core/objects/sounds/playable_sounds/AbstractPlayableSound";
Expand All @@ -9,9 +15,9 @@ import { NpcSound } from "@/engine/core/objects/sounds/playable_sounds/NpcSound"
import { ObjectSound } from "@/engine/core/objects/sounds/playable_sounds/ObjectSound";
import { EPlayableSound } from "@/engine/core/objects/sounds/types";
import { abort, assert, assertDefined } from "@/engine/core/utils/assertion";
import { readIniString } from "@/engine/core/utils/ini/read";
import { readIniString } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { getCharacterCommunity } from "@/engine/core/utils/object/object_general";
import { getCharacterCommunity } from "@/engine/core/utils/object/object_get";
import { getTableSize, resetTable } from "@/engine/core/utils/table";
import {
ClientObject,
Expand Down
4 changes: 2 additions & 2 deletions src/engine/core/managers/world/DropManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { Stalker } from "@/engine/core/objects/server/creature/Stalker";
import { abort } from "@/engine/core/utils/assertion";
import { isExcludedFromLootDropItem } from "@/engine/core/utils/check/check";
import { isAmmoItem, isArtefact, isGrenade, isLootableItem, isWeapon } from "@/engine/core/utils/check/is";
import { parseNumbersList, parseStringsList } from "@/engine/core/utils/ini/parse";
import { parseNumbersList, parseStringsList } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { getCharacterCommunity, setItemCondition } from "@/engine/core/utils/object/object_general";
import { getCharacterCommunity, setItemCondition } from "@/engine/core/utils/object";
import { spawnItemsForObject } from "@/engine/core/utils/spawn";
import { logicsConfig } from "@/engine/lib/configs/LogicsConfig";
import { communities, TCommunity } from "@/engine/lib/constants/communities";
Expand Down
4 changes: 2 additions & 2 deletions src/engine/core/managers/world/ReleaseBodyManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import {
DUMMY_LTX,
getStoryIdByObjectId,
IRegistryObjectState,
openLoadMarker,
openSaveMarker,
registry,
} from "@/engine/core/database";
import { openLoadMarker } from "@/engine/core/database/save_markers";
import { AbstractCoreManager } from "@/engine/core/managers/base/AbstractCoreManager";
import { abort } from "@/engine/core/utils/assertion";
import { isMonster, isStalker } from "@/engine/core/utils/check/is";
import { readIniString } from "@/engine/core/utils/ini/read";
import { readIniString } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { roots } from "@/engine/lib/constants/roots";
import {
Expand Down
14 changes: 9 additions & 5 deletions src/engine/core/managers/world/SurgeManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { alife, game, hit, level } from "xray16";

import { closeLoadMarker, closeSaveMarker, openSaveMarker, registry, SURGE_MANAGER_LTX } from "@/engine/core/database";
import { openLoadMarker } from "@/engine/core/database/save_markers";
import {
closeLoadMarker,
closeSaveMarker,
openLoadMarker,
openSaveMarker,
registry,
SURGE_MANAGER_LTX,
} from "@/engine/core/database";
import { AbstractCoreManager } from "@/engine/core/managers/base/AbstractCoreManager";
import { EGameEvent, EventsManager } from "@/engine/core/managers/events";
import { SimulationBoardManager } from "@/engine/core/managers/interaction/SimulationBoardManager";
Expand All @@ -18,9 +24,7 @@ import { isArtefact, isStoryObject } from "@/engine/core/utils/check/is";
import { executeConsoleCommand, getConsoleFloatCommand } from "@/engine/core/utils/console";
import { createAutoSave } from "@/engine/core/utils/game_save";
import { disableInfo, giveInfo, hasAlifeInfo } from "@/engine/core/utils/info_portion";
import { pickSectionFromCondList } from "@/engine/core/utils/ini/config";
import { parseConditionsList } from "@/engine/core/utils/ini/parse";
import { TConditionList } from "@/engine/core/utils/ini/types";
import { parseConditionsList, pickSectionFromCondList, TConditionList } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { isObjectOnLevel } from "@/engine/core/utils/object/object_location";
import { readTimeFromPacket, writeTimeToPacket } from "@/engine/core/utils/time";
Expand Down
20 changes: 15 additions & 5 deletions src/engine/core/managers/world/TreasureManager.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import { alife, level, time_global } from "xray16";

import { closeLoadMarker, closeSaveMarker, openSaveMarker, registry, SECRETS_LTX } from "@/engine/core/database";
import { openLoadMarker } from "@/engine/core/database/save_markers";
import {
closeLoadMarker,
closeSaveMarker,
openLoadMarker,
openSaveMarker,
registry,
SECRETS_LTX,
} from "@/engine/core/database";
import { AbstractCoreManager } from "@/engine/core/managers/base/AbstractCoreManager";
import { EGameEvent, EventsManager } from "@/engine/core/managers/events";
import { ETreasureState, NotificationManager } from "@/engine/core/managers/interface/notifications";
import { StatisticsManager } from "@/engine/core/managers/interface/StatisticsManager";
import { assert, assertDefined } from "@/engine/core/utils/assertion";
import { pickSectionFromCondList } from "@/engine/core/utils/ini/config";
import { parseConditionsList, parseSpawnDetails } from "@/engine/core/utils/ini/parse";
import { ISpawnDescriptor, TConditionList } from "@/engine/core/utils/ini/types";
import {
ISpawnDescriptor,
parseConditionsList,
parseSpawnDetails,
pickSectionFromCondList,
TConditionList,
} from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { getTableSize } from "@/engine/core/utils/table";
import { MAX_U16 } from "@/engine/lib/constants/memory";
Expand Down
13 changes: 8 additions & 5 deletions src/engine/core/managers/world/WeatherManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ import {
closeSaveMarker,
DYNAMIC_WEATHER_GRAPHS,
GAME_LTX,
openLoadMarker,
openSaveMarker,
registry,
} from "@/engine/core/database";
import { openLoadMarker } from "@/engine/core/database/save_markers";
import { AbstractCoreManager } from "@/engine/core/managers/base/AbstractCoreManager";
import { EGameEvent, EventsManager } from "@/engine/core/managers/events";
import { assert } from "@/engine/core/utils/assertion";
import { pickSectionFromCondList } from "@/engine/core/utils/ini/config";
import { parseAllSectionToTable, parseConditionsList } from "@/engine/core/utils/ini/parse";
import { readIniString } from "@/engine/core/utils/ini/read";
import { TConditionList } from "@/engine/core/utils/ini/types";
import {
parseAllSectionToTable,
parseConditionsList,
pickSectionFromCondList,
readIniString,
TConditionList,
} from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { NIL } from "@/engine/lib/constants/words";
import {
Expand Down
4 changes: 2 additions & 2 deletions src/engine/core/objects/binders/HelicopterBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import {
closeLoadMarker,
closeSaveMarker,
IRegistryObjectState,
openLoadMarker,
openSaveMarker,
registerHelicopter,
registry,
resetObject,
unregisterHelicopter,
} from "@/engine/core/database";
import { loadObjectLogic, saveObjectLogic } from "@/engine/core/database/logic";
import { openLoadMarker } from "@/engine/core/database/save_markers";
import { GlobalSoundManager } from "@/engine/core/managers/sounds/GlobalSoundManager";
import { ESchemeEvent, IBaseSchemeState } from "@/engine/core/schemes";
import { getHeliHealth } from "@/engine/core/schemes/heli_move/heli_utils";
import { HeliCombat } from "@/engine/core/schemes/heli_move/HeliCombat";
import { getHeliFirer, HeliFire } from "@/engine/core/schemes/heli_move/HeliFire";
import { readIniNumber, readIniString } from "@/engine/core/utils/ini/read";
import { readIniNumber, readIniString } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { emitSchemeEvent, initializeObjectSchemeLogic } from "@/engine/core/utils/scheme";
import {
Expand Down
5 changes: 2 additions & 3 deletions src/engine/core/objects/binders/creature/MonsterBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ import { Squad } from "@/engine/core/objects/server/squad/Squad";
import { TSimulationObject } from "@/engine/core/objects/server/types";
import { ESchemeEvent, IBaseSchemeState } from "@/engine/core/schemes";
import { SchemeHear } from "@/engine/core/schemes/hear/SchemeHear";
import { pickSectionFromCondList } from "@/engine/core/utils/ini";
import { TConditionList } from "@/engine/core/utils/ini/types";
import { pickSectionFromCondList, TConditionList } from "@/engine/core/utils/ini";
import { LuaLogger } from "@/engine/core/utils/logging";
import { action, getObjectSquad } from "@/engine/core/utils/object/object_general";
import { action, getObjectSquad } from "@/engine/core/utils/object";
import {
emitSchemeEvent,
isMonsterScriptCaptured,
Expand Down
Loading

0 comments on commit 44f1518

Please sign in to comment.