index
Classes
| Class | Description |
|---|---|
| MockActionBase | Mock of the X-Ray engine GOAP action base class. |
| MockActionPlanner | Mock of the X-Ray engine GOAP action planner. |
| MockAlifeCreatureActor | Class based server object mock. |
| MockAlifeDynamicObject | Mock dynamic alife server object. |
| MockAlifeDynamicObjectVisual | Mock alife dynamic visual server object. |
| MockAlifeHangingLamp | Mock alife hanging lamp server object. |
| MockAlifeHelicopter | Mock helicopter server object. |
| MockAlifeHumanStalker | Mock server human object representation. |
| MockAlifeInventoryBox | Mock alife inventory box server object. |
| MockAlifeItem | Mock alife item server object. |
| MockAlifeItemAmmo | Mock alife ammo item server object. |
| MockAlifeItemArtefact | Mock alife artefact item server object. |
| MockAlifeItemDetector | Mock alife detector server object. |
| MockAlifeItemExplosive | Mock alife explosive server object. |
| MockAlifeItemGrenade | Mock alife grenade item server object. |
| MockAlifeItemHelmet | Mock alife helmet server object. |
| MockAlifeItemOutfit | Mock alife outfit server object. |
| MockAlifeItemPda | Mock server PDA item. |
| MockAlifeItemTorch | Mock torch item server object. |
| MockAlifeItemWeapon | Mock alife weapon item server object. |
| MockAlifeItemWeaponAutoShotgun | Mock alife auto shotgun server object. |
| MockAlifeItemWeaponMagazined | Mock alife magazined weapon item server object. |
| MockAlifeItemWeaponMagazinedWGL | Mock alife magazined weapon with grenade launcher server object. |
| MockAlifeItemWeaponShotgun | Mock alife shotgun weapon server object. |
| MockAlifeLevelChanger | Mock alife level changer server object. |
| MockAlifeMonsterBase | Mock alife monster creature server object. |
| MockAlifeObject | Mock base alife object implementation. |
| MockAlifeObjectPhysic | Mock alife physic server object. |
| MockAlifeOnlineOfflineGroup | Class mocking generic server offline-online group. |
| MockAlifeSimulator | Mock alife simulator registry containing data with server objects. |
| MockAlifeSmartCover | Mock generic server object handling smart covers. |
| MockAlifeSmartZone | Mock alife smart zone server object. |
| MockAnim | Mock of the X-Ray engine anim action enumeration. |
| MockAnomalousZone | Mock anomalous zone server object. |
| MockCAlifeMonsterBrain | Mock of the X-Ray engine CALifeMonsterBrain alife brain. |
| MockCALifeSmartTerrainTask | Mock of the X-Ray engine alife task for smart terrains. |
| MockCArtefact | Mock of the X-Ray engine artefact object. |
| MockCGameFont | Mock of the X-Ray engine CGameFont class for jest/node. |
| MockCGameGraph | Mock of the X-Ray engine game_graph() singleton. |
| MockCGameTask | Mock x-ray task object. |
| MockCHelicopter | Mock of the X-Ray engine helicopter object. |
| MockCMainMenu | Mock of the X-Ray engine CMainMenu manager. |
| MockColor | Mock of the X-Ray engine color class for jest/node. |
| MockCond | Mock of the X-Ray engine cond action-completion enumeration. |
| MockConnectErrorCb | - |
| MockConsole | Mock of the X-Ray engine game console. |
| MockCSavedGameWrapper | Mock of the X-Ray engine CSavedGameWrapper. |
| MockCScriptXmlInit | Mock xml file with forms sources. |
| MockCServerList | Mock server list UI component. |
| MockCSightParams | Mock of the X-Ray engine CSightParams sight-type enumeration class. |
| MockCTime | Mock of the X-Ray engine CTime object for jest/node. |
| MockCUI3tButton | Mock CUI button. |
| MockCUICheckButton | Mock check button. |
| MockCUIComboBox | Mock base window class. |
| MockCUICustomSpin | Mock base window class. |
| MockCUIDialogWnd | Mock base window class. |
| MockCUIEditBox | Mocking edit box for testing. |
| MockCUIGameCustom | Mock game hud UI element. |
| MockCUILines | Mock CUILines. |
| MockCUIListBox | Mock CUI list box. |
| MockCUIListBoxItem | Mock generic list box item. |
| MockCUIListBoxItemMsgChain | Mock UI list box message chain. |
| MockCUIMapInfo | Mock base window class. |
| MockCUIMapList | Mock base window class. |
| MockCUIMessageBoxEx | Mock generic message box. |
| MockCUIMMShniaga | Mock base window class. |
| MockCUIScriptWnd | Mocking script window for testing. |
| MockCUIScrollView | Mock generic scroll view. |
| MockCUISpinFlt | Mock base window class. |
| MockCUISpinNum | Mock base window class. |
| MockCUISpinText | Mock base window class. |
| MockCUIStatic | Mock CUI static. |
| MockCUITabControl | Mock generic tabs. |
| MockCUITextWnd | Mock base window class. |
| MockCUITrackBar | Mock generic trackbar. |
| MockCUIWindow | Mock base window class. |
| MockCVertex | Mock of a game-level vertex object for jest/node. |
| MockCZoneCampfire | Mock of the X-Ray engine campfire object. |
| MockDangerObject | Mock xray engine danger object. |
| MockDevice | Mock of the X-Ray engine device() singleton for jest/node. |
| MockEffector | Mock of a generic X-Ray engine effector class for jest/node. |
| MockEntityAction | Mock of the X-Ray engine entity_action class. |
| MockFbox | Mock of the X-Ray engine Fbox bounding box for jest/node. |
| MockFileStatus | Mock of the X-Ray engine FS file status. |
| MockFileSystem | Mock engine FS manager. |
| MockFileSystemList | Mock of the X-Ray engine FS file list. |
| MockFlags32 | Mock of the X-Ray engine flags32 bit-flags object. |
| MockFrect | Mock of the X-Ray engine Frect rectangle class. |
| MockGameObject | Abstract game object mock. |
| MockGameType | - |
| MockHangingLamp | Mock of the X-Ray engine hanging lamp object. |
| MockHit | Mock of the X-Ray engine hit object for jest/node. |
| MockIniFile | Mock of the X-Ray engine ini_file for jest/node. |
| MockIoFile | Mock generic io file. |
| MockLoginManager | Mock of the X-Ray engine multiplayer login_manager. |
| MockLoginOperationCb | - |
| MockLook | Mock of the X-Ray engine look action enumeration. |
| MockLuabindClass | Mock abstraction for luabind classes. Handles the __name wrapper that the custom transformer injects on luabind classes. |
| MockLuaMap | Mock tstl map data structure. In runtime objects, arrays and tables are same, but in test env have to mock them with compat and workarounds. |
| MockLuaTable | Mock tstl table data structure. In runtime objects, arrays and tables are same, but in test env have to mock them with compat and workarounds. |
| MockMonsterHitInfo | - |
| MockMove | Mock move actions class. |
| MockNetProcessor | X-Ray net processor mock for testing save/load of data. |
| MockNoise | Mock of the X-Ray engine noise class for jest/node. |
| MockObject | Mock of the X-Ray engine object action/state enumeration. |
| MockObjectBinder | Mock of the X-Ray engine object binder (client object lifecycle wrapper). |
| MockObjectFactory | Mock of the X-Ray engine game object factory. |
| MockParticleObject | Mock of the X-Ray engine particles object. |
| MockPatrol | Mock generic patrol object. |
| MockPhrase | Mock of the X-Ray engine dialog phrase. |
| MockPhraseDialog | Mock of the X-Ray engine dialog phrase container. |
| MockPhraseScript | Mock of the X-Ray engine dialog CPhraseScript. |
| MockPhysicObject | Mock of the X-Ray engine CPhysicObject. |
| MockPhysicsElement | Mock of the X-Ray engine physics element. |
| MockPhysicsJoint | Mock of the X-Ray engine physics joint. |
| MockPhysicsShell | Mock of the X-Ray engine physics shell. |
| MockProfile | - |
| MockProfileTimer | Mock of the X-Ray engine high-precision profile_timer. |
| MockPropertiesHelper | Mock of the X-Ray engine C++ properties_helper class. |
| MockPropertyEvaluator | Mock of the X-Ray engine AI property evaluator. |
| MockPropertyEvaluatorConst | Mock of a constant-value AI property evaluator. |
| MockPropertyStorage | Mock of the X-Ray engine AI property storage (properties + actions for the graph). |
| MockServerAlifeCreatureAbstract | Mock server creature object. |
| MockSightParameters | Mock AI sight parameters class. |
| MockSound | Mock of the X-Ray engine sound action enumeration. |
| MockSoundObject | Mock of the X-Ray engine sound object. |
| MockSpaceRestrictor | Mock space restrictor server object. |
| MockStaticDrawableWrapper | Mock StaticDrawableWrapper. |
| MockTask | Mock of the X-Ray engine task state enumeration. |
| MockTorridZone | Mock torrid zone server object. |
| MockVector | Mock of the X-Ray engine 3D vector class for jest/node. |
| MockVector2D | Mock of the X-Ray engine 2D vector2 class for jest/node. |
| MockWorldProperty | Mock of the X-Ray engine logics world property. |
| MockWorldState | Mock of the X-Ray engine logics world state. |
| MockZoneVisual | Mock visual zone server object. |
Enumerations
| Enumeration | Description |
|---|---|
| EMockPacketDataType | Data types that can be saved in net packets (game save files). |
Functions
| Function | Description |
|---|---|
| luaTableToArray | Transform lua table to array for easier testing with equals checks. |
| luaTableToObject | Transform in a recursive way lua tables to JS arrays for easier testing/verification. |
| mapFromLua | - |
| mockActionBase | Mock action base factory. |
| mockActionPlanner | Mock action planner factory. |
| mockCastPlanner | Mock of the engine cast-planner behaviour: lazily create a hidden planner on the action. |
| Mock task object. | |
| mockCharactersGoodwill | Mock goodwill between characters by id. |
| mockCreateIniFile | Mock of the engine create_ini_file global. |
| mockFromLuaMap | xray16/mocks - runtime Lua environment mocks for testing X-Ray TypeScriptToLua code under jest/node. |
| mockFromLuaTable | Just transform types of LuaTable to mockLuaTable. |
| mockObjectFactory | Mock generic object factory. |
| mockRange | Mock of the $range TypeScriptToLua language-extension helper. |
| mockTonumber | Mock lua tonumber global, backed by a real Lua VM for 1-1 parsing behaviour. |
| mockToString | Mock lua tostring global method. |
| mockType | Mock lua type global method. |
Interfaces
| Interface | Description |
|---|---|
| IMockAlifeObjectConfig | - |
| IMockGameObjectConfig | - |
| IPatrolMock | Generic patrol mock data shape. Consumers (the engine) inject a registry of these via MockPatrol.setup. |
Type Aliases
| Type Alias | Description |
|---|---|
| TDefaultCommunity | Single community (faction) name. |
Variables
| Variable | Description |
|---|---|
| charactersGoodwill | Mocked characters relations registry. |
| communityGoodwill | Mocked community relations registry. |
| defaultCommunities | Default set of game communities (factions). The engine may extend this with additional ones. |
| mockActorStatsInterface | Mock of the X-Ray engine actor-stats interface (subset). |
| mockCallbacks | Mock callback IDs constants. |
| mockClsid | Mock table mapping engine class identifier names to numeric ids for tests. |
| mockCommandLine | Mock of the engine command_line global. |
| mockConfig | Shared incrementing id counter for object mocks (mirrors the engine test mockConfig). |
| mockDebug | Mock lua debug library. |
| mockDikKeys | - |
| mockError | Mock lua error global. Mirrors the engine behaviour of raising an exception with the provided message. |
| mockGameInterface | Mock of the X-Ray engine game namespace for jest/node. |
| mockGetARGB | Mock of the engine GetARGB global. |
| mockGetGameHud | Get game hud mock (memoized singleton, mirrors the engine get_hud global). |
| mockIo | - |
| mockJit | Mock jit globals library. |
| mockLevelInterface | Mock of the X-Ray engine level namespace for jest/node. |
| mockMainMenuInterface | Mock of the X-Ray engine main_menu namespace (subset). |
| mockMarshal | Mock of the OpenXRay marshal global for jest/node. |
| mockMath | Mock default lua math library. |
| mockRelationRegistryInterface | Mock module with relations methods and registry. |
| mockSndType | - |
| mockStalkerIds | Mock engine class ids for testing environment. In game engine all these constants do not match since they are dynamic and allocated on runtime. |
| mockString | Mock lua global string methods. Use lua VM to get 1-1 behaviour in some cases. |
| mockTable | Mock default lua lib table methods. |
| mockUiEvents | - |