Skip to content

Variable: mockLevelInterface

ts
const mockLevelInterface: {
  add_call: {
     (this: void, condition: (this: void) => boolean, action: (this: void) => boolean): void;
     (this: void, object: object, condition: (this: void) => boolean, action: (this: void) => boolean): void;
     (this: void, object: object, condition: string, action: string): void;
  };
  add_cam_effector: Mock<() => number>;
  add_cam_effector2: Mock<() => number>;
  add_complex_effector: Mock<UnknownFunction>;
  add_dialog_to_render: Mock<UnknownFunction>;
  add_pp_effector: Mock<UnknownFunction>;
  change_game_time: Mock<UnknownFunction>;
  check_object: Mock<UnknownFunction>;
  client_spawn_manager: Mock<() => client_spawn_manager>;
  debug_actor: Mock<() => null>;
  debug_object: Mock<() => null>;
  disable_input: Mock<UnknownFunction>;
  enable_input: Mock<UnknownFunction>;
  environment: Mock<() => CEnvironment>;
  game_id: Mock<(this: void) => TXR_EGameID>;
  get_active_cam: Mock<() => number>;
  get_actor_body_state: Mock<() => number>;
  get_actor_body_state_wishful: Mock<() => number>;
  get_bounding_volume: Mock<() => Fbox>;
  get_fov: Mock<() => number>;
  get_game_difficulty: Mock<(this: void) => TXR_game_difficulty>;
  get_ph_time_factor: Mock<() => number>;
  get_snd_volume: Mock<() => number>;
  get_start_time: Mock<() => MockCTime>;
  get_target_dist: Mock<() => number>;
  get_target_element: Mock<() => number>;
  get_target_obj: Mock<() => null>;
  get_time_days: Mock<() => number>;
  get_time_factor: Mock<() => number>;
  get_time_hours: Mock<() => number>;
  get_time_minutes: Mock<() => number>;
  get_weather: Mock<() => string>;
  get_wfx_time: Mock<() => number>;
  hide_indicators: Mock<UnknownFunction>;
  hide_indicators_safe: Mock<UnknownFunction>;
  hide_minimap: Mock<UnknownFunction>;
  high_cover_in_direction: Mock<() => number>;
  is_wfx_playing: Mock<() => boolean>;
  iterate_online_objects: Mock<(cb: (object: game_object) => void) => void>;
  iterate_sounds: {
     (this: void, section: string, max_count: number, cb: (this: void, name: string) => void): void;
     (this: void, section: string, max_count: number, object: object, cb: (this: void, name: string) => void): void;
  };
  low_cover_in_direction: Mock<() => number>;
  main_input_receiver: Mock<() => CUIDialogWnd>;
  map_add_object_spot: Mock<UnknownFunction>;
  map_add_object_spot_ser: Mock<UnknownFunction>;
  map_change_spot_hint: Mock<UnknownFunction>;
  map_has_object_spot: Mock<() => number>;
  map_remove_object_spot: Mock<UnknownFunction>;
  minimap_shown: Mock<() => boolean>;
  name: <T>(this: void) => T;
  object_by_id: Mock<(this: void, object_id: number) => Nullable<game_object>>;
  patrol_path_exists: Mock<(name: string) => boolean>;
  physics_world: Mock<() => physics_world>;
  prefetch_sound: Mock<UnknownFunction>;
  present: Mock<() => boolean>;
  rain_factor: Mock<() => number>;
  ray_pick: Mock<() => boolean>;
  remove_call: {
     (this: void, condition: (this: void) => boolean, action: (this: void) => void): void;
     (this: void, object: object, condition: (this: void) => boolean, action: (this: void) => void): void;
     (this: void, object: object, condition: string, action: string): void;
  };
  remove_calls_for_object: Mock<UnknownFunction>;
  remove_cam_effector: Mock<UnknownFunction>;
  remove_complex_effector: Mock<UnknownFunction>;
  remove_dialog_to_render: Mock<UnknownFunction>;
  remove_pp_effector: Mock<UnknownFunction>;
  send: Mock<UnknownFunction>;
  set_active_cam: Mock<UnknownFunction>;
  set_fov: Mock<UnknownFunction>;
  set_game_difficulty: Mock<UnknownFunction>;
  set_ph_time_factor: Mock<(factor: number) => number>;
  set_pp_effector_factor: Mock<UnknownFunction>;
  set_snd_volume: Mock<(volume: number) => void>;
  set_time_factor: Mock<(_factor: number) => void>;
  set_weather: Mock<UnknownFunction>;
  set_weather_fx: Mock<() => boolean>;
  show_indicators: Mock<UnknownFunction>;
  show_minimap: Mock<UnknownFunction>;
  show_weapon: Mock<UnknownFunction>;
  spawn_item: Mock<UnknownFunction>;
  spawn_phantom: Mock<UnknownFunction>;
  start_stop_menu: Mock<UnknownFunction>;
  start_weather_fx_from_time: Mock<() => boolean>;
  stop_weather_fx: Mock<UnknownFunction>;
  valid_vertex: Mock<() => boolean>;
  vertex_id: Mock<() => number>;
  vertex_in_direction: Mock<() => number>;
  vertex_position: Mock<() => MockVector>;
};

Mock of the X-Ray engine level namespace for jest/node.

Type Declaration

NameType
add_call(){ (this: void, condition: (this: void) => boolean, action: (this: void) => boolean): void; (this: void, object: object, condition: (this: void) => boolean, action: (this: void) => boolean): void; (this: void, object: object, condition: string, action: string): void; }
add_cam_effectorMock<() => number>
add_cam_effector2Mock<() => number>
add_complex_effectorMock<UnknownFunction>
add_dialog_to_renderMock<UnknownFunction>
add_pp_effectorMock<UnknownFunction>
change_game_timeMock<UnknownFunction>
check_objectMock<UnknownFunction>
client_spawn_managerMock<() => client_spawn_manager>
debug_actorMock<() => null>
debug_objectMock<() => null>
disable_inputMock<UnknownFunction>
enable_inputMock<UnknownFunction>
environmentMock<() => CEnvironment>
game_idMock<(this: void) => TXR_EGameID>
get_active_camMock<() => number>
get_actor_body_stateMock<() => number>
get_actor_body_state_wishfulMock<() => number>
get_bounding_volumeMock<() => Fbox>
get_fovMock<() => number>
get_game_difficultyMock<(this: void) => TXR_game_difficulty>
get_ph_time_factorMock<() => number>
get_snd_volumeMock<() => number>
get_start_timeMock<() => MockCTime>
get_target_distMock<() => number>
get_target_elementMock<() => number>
get_target_objMock<() => null>
get_time_daysMock<() => number>
get_time_factorMock<() => number>
get_time_hoursMock<() => number>
get_time_minutesMock<() => number>
get_weatherMock<() => string>
get_wfx_timeMock<() => number>
hide_indicatorsMock<UnknownFunction>
hide_indicators_safeMock<UnknownFunction>
hide_minimapMock<UnknownFunction>
high_cover_in_directionMock<() => number>
is_wfx_playingMock<() => boolean>
iterate_online_objectsMock<(cb: (object: game_object) => void) => void>
iterate_sounds(){ (this: void, section: string, max_count: number, cb: (this: void, name: string) => void): void; (this: void, section: string, max_count: number, object: object, cb: (this: void, name: string) => void): void; }
low_cover_in_directionMock<() => number>
main_input_receiverMock<() => CUIDialogWnd>
map_add_object_spotMock<UnknownFunction>
map_add_object_spot_serMock<UnknownFunction>
map_change_spot_hintMock<UnknownFunction>
map_has_object_spotMock<() => number>
map_remove_object_spotMock<UnknownFunction>
minimap_shownMock<() => boolean>
name()<T>(this: void) => T
object_by_idMock<(this: void, object_id: number) => Nullable<game_object>>
patrol_path_existsMock<(name: string) => boolean>
physics_worldMock<() => physics_world>
prefetch_soundMock<UnknownFunction>
presentMock<() => boolean>
rain_factorMock<() => number>
ray_pickMock<() => boolean>
remove_call(){ (this: void, condition: (this: void) => boolean, action: (this: void) => void): void; (this: void, object: object, condition: (this: void) => boolean, action: (this: void) => void): void; (this: void, object: object, condition: string, action: string): void; }
remove_calls_for_objectMock<UnknownFunction>
remove_cam_effectorMock<UnknownFunction>
remove_complex_effectorMock<UnknownFunction>
remove_dialog_to_renderMock<UnknownFunction>
remove_pp_effectorMock<UnknownFunction>
sendMock<UnknownFunction>
set_active_camMock<UnknownFunction>
set_fovMock<UnknownFunction>
set_game_difficultyMock<UnknownFunction>
set_ph_time_factorMock<(factor: number) => number>
set_pp_effector_factorMock<UnknownFunction>
set_snd_volumeMock<(volume: number) => void>
set_time_factorMock<(_factor: number) => void>
set_weatherMock<UnknownFunction>
set_weather_fxMock<() => boolean>
show_indicatorsMock<UnknownFunction>
show_minimapMock<UnknownFunction>
show_weaponMock<UnknownFunction>
spawn_itemMock<UnknownFunction>
spawn_phantomMock<UnknownFunction>
start_stop_menuMock<UnknownFunction>
start_weather_fx_from_timeMock<() => boolean>
stop_weather_fxMock<UnknownFunction>
valid_vertexMock<() => boolean>
vertex_idMock<() => number>
vertex_in_directionMock<() => number>
vertex_positionMock<() => MockVector>