@infernus/core 0.11.0-beta.6 → 0.11.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@infernus/core)](https://www.npmjs.com/package/@infernus/core) ![npm](https://img.shields.io/npm/dy/@infernus/core) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@infernus/core)
4
4
 
5
- NodeJS library for Scripting [Open Multiplayer](https://open.mp).
5
+ Node.js library for Scripting [Open Multiplayer](https://open.mp).
package/dist/bundle.d.ts CHANGED
@@ -54,6 +54,7 @@ declare enum InvalidEnum {
54
54
  }
55
55
 
56
56
  declare enum KeysEnum {
57
+ NONE = 0,
57
58
  ACTION = 1,
58
59
  CROUCH = 2,
59
60
  FIRE = 4,
@@ -226,6 +227,12 @@ declare enum BoneIdsEnum {
226
227
  Neck = 17,
227
228
  Jaw = 18
228
229
  }
230
+ declare enum ForceSyncEnum {
231
+ UNKNOWN = -1,
232
+ NONE = 0,
233
+ ALL = 1,
234
+ OTHER = 2
235
+ }
229
236
 
230
237
  declare enum SpecialActionsEnum {
231
238
  NONE = 0,
@@ -836,7 +843,7 @@ interface IDynamicAreaKey {
836
843
  }
837
844
  interface IFilterScript {
838
845
  name: string;
839
- load: (...args: Array<any>) => any;
846
+ load: (...args: Array<any>) => Array<() => void> | Promise<Array<() => void>>;
840
847
  unload: () => any;
841
848
  [propName: string | number | symbol]: any;
842
849
  }
@@ -1433,8 +1440,8 @@ declare class Streamer {
1433
1440
  static countVisibleItems(player: Player, type: StreamerItemTypes, serverWide?: number): number;
1434
1441
  static destroyAllItems: (type: StreamerItemTypes, serverWide?: number | undefined) => number;
1435
1442
  static countItems: (type: StreamerItemTypes, serverWide?: number | undefined) => number;
1436
- static getNearbyItems: (x: number, y: number, z: number, type: StreamerItemTypes, items: number[], maxItems?: number | undefined, range?: number | undefined, worldId?: number | undefined) => void;
1437
- static getAllVisibleItems(player: Player, type: StreamerItemTypes, items: number[]): void;
1443
+ static getNearbyItems: (x: number, y: number, z: number, type: StreamerItemTypes, maxItems?: number | undefined, range?: number | undefined, worldId?: number | undefined) => number[];
1444
+ static getAllVisibleItems(player: Player, type: StreamerItemTypes, maxItems?: number): number[];
1438
1445
  static getItemPos: (type: StreamerItemTypes, id: number) => {
1439
1446
  x: number;
1440
1447
  y: number;
@@ -1872,7 +1879,7 @@ declare class Player {
1872
1879
  getVehicle(vehicles: Array<Vehicle>): Vehicle | undefined;
1873
1880
  getVehicleSeat(): number;
1874
1881
  getSurfingVehicle(vehicles: Array<Vehicle>): Vehicle | undefined;
1875
- applyAnimation(animLib: string, animName: string, loop?: boolean, lockX?: boolean, lockY?: boolean, freeze?: boolean, forceSync?: boolean): void;
1882
+ applyAnimation(animLib: string, animName: string, loop?: boolean, lockX?: boolean, lockY?: boolean, freeze?: boolean, forceSync?: boolean | ForceSyncEnum): void;
1876
1883
  clearAnimations(forceSync?: boolean): void;
1877
1884
  getAnimationIndex(): number;
1878
1885
  getAnimationName(): {
@@ -2460,4 +2467,4 @@ declare function isPressed(newKeys: KeysEnum, oldKeys: KeysEnum, key: KeysEnum):
2460
2467
  declare function isPressing(keys: KeysEnum, key: KeysEnum): boolean;
2461
2468
  declare function isReleased(newKeys: KeysEnum, oldKeys: KeysEnum, key: KeysEnum): boolean;
2462
2469
 
2463
- export { ArtworkEnum, BodyPartsEnum, BoneIdsEnum, BulletHitTypesEnum, CameraCutStylesEnum, CameraModesEnum, CarModTypeEnum, ClickSourcesEnum, type CmdBusCallback, CommandErrors, ConnectionStatusEnum, DamageDeathReasonEnum, Dialog, DialogStylesEnum, Dynamic3DTextLabel, Dynamic3DTextLabelEvent, DynamicActor, DynamicActorEvent, DynamicArea, DynamicAreaEvent, DynamicCheckPointEvent, DynamicCheckpoint, DynamicMapIcon, DynamicMapIconEvent, DynamicObject, DynamicObjectEvent, DynamicPickup, DynamicPickupEvent, DynamicRaceCP, DynamicRaceCPEvent, ERecordStatus, EditResponseTypesEnum, FightingStylesEnum, GameMode, GameText, GangZone, type GangZoneCb, GangZoneEvent, type GangZonePos, I18n, type IActorAnimation, type IActorSpawn, type IAnimateInfo, type IAttachedData, type IAttachedObject, type IBounds, type ICheckPoint, type IClientResRaw, type ICommonTextDrawKey, type IDialog, type IDialogFuncQueue, type IDialogResCommon, type IDialogResRaw, type IDialogResResult, type IDynamic, type IDynamic3DTextLabel, type IDynamicActor, type IDynamicAreaKey, type IDynamicCheckPoint, type IDynamicCircle, type IDynamicCircleCommon, type IDynamicCommon, type IDynamicCuboid, type IDynamicCylinder, type IDynamicMapIcon, type IDynamicObject, type IDynamicPickup, type IDynamicPolygon, type IDynamicRaceCp, type IDynamicRectangle, type IDynamicRectangleCommon, type IDynamicSphere, type IFilterScript, type IGangZone, type IMaterial, type IMaterialText, type IObjectPos, type IObjectRotPos, type IOffsets, type IPlayerClass, type IQuat, type IRaceCheckPoint, type ITextDraw, type ITextDrawCommonSize, type ITextDrawRot, type IVehColor, type IVehMatrix, type IVehSpawnInfo, type IVehicle, InvalidEnum, KeysEnum, LimitsEnum, MapIconStylesEnum, MarkerModesEnum, Menu, MenuEvent, NPCPlaybackEnum, NetStats, Npc, NpcEvent, ObjectMaterialAlignmmentEnum, ObjectMaterialTextSizeEnum, Player, PlayerEvent, PlayerStateEnum, RecordTypesEnum, SelectObjectTypesEnum, SpecialActionsEnum, SpectateModesEnum, Streamer, type TCommonCallback, type TDynamicArea, type TDynamicAreaTypes, type TEventFunc, type TEventName, type TLocales, type TPos, type TStreamerExtendable, TextDraw, TextDrawAlignEnum, TextDrawEvent, TextDrawFontsEnum, Vehicle, VehicleEvent, VehicleModelInfoEnum, VehicleParamsEnum, WeaponEnum, WeaponSkillsEnum, WeaponStatesEnum, defineEvent, isHolding, isPressed, isPressing, isReleased, rgba };
2470
+ export { ArtworkEnum, BodyPartsEnum, BoneIdsEnum, BulletHitTypesEnum, CameraCutStylesEnum, CameraModesEnum, CarModTypeEnum, ClickSourcesEnum, type CmdBusCallback, CommandErrors, ConnectionStatusEnum, DamageDeathReasonEnum, Dialog, DialogStylesEnum, Dynamic3DTextLabel, Dynamic3DTextLabelEvent, DynamicActor, DynamicActorEvent, DynamicArea, DynamicAreaEvent, DynamicCheckPointEvent, DynamicCheckpoint, DynamicMapIcon, DynamicMapIconEvent, DynamicObject, DynamicObjectEvent, DynamicPickup, DynamicPickupEvent, DynamicRaceCP, DynamicRaceCPEvent, ERecordStatus, EditResponseTypesEnum, FightingStylesEnum, ForceSyncEnum, GameMode, GameText, GangZone, type GangZoneCb, GangZoneEvent, type GangZonePos, I18n, type IActorAnimation, type IActorSpawn, type IAnimateInfo, type IAttachedData, type IAttachedObject, type IBounds, type ICheckPoint, type IClientResRaw, type ICommonTextDrawKey, type IDialog, type IDialogFuncQueue, type IDialogResCommon, type IDialogResRaw, type IDialogResResult, type IDynamic, type IDynamic3DTextLabel, type IDynamicActor, type IDynamicAreaKey, type IDynamicCheckPoint, type IDynamicCircle, type IDynamicCircleCommon, type IDynamicCommon, type IDynamicCuboid, type IDynamicCylinder, type IDynamicMapIcon, type IDynamicObject, type IDynamicPickup, type IDynamicPolygon, type IDynamicRaceCp, type IDynamicRectangle, type IDynamicRectangleCommon, type IDynamicSphere, type IFilterScript, type IGangZone, type IMaterial, type IMaterialText, type IObjectPos, type IObjectRotPos, type IOffsets, type IPlayerClass, type IQuat, type IRaceCheckPoint, type ITextDraw, type ITextDrawCommonSize, type ITextDrawRot, type IVehColor, type IVehMatrix, type IVehSpawnInfo, type IVehicle, InvalidEnum, KeysEnum, LimitsEnum, MapIconStylesEnum, MarkerModesEnum, Menu, MenuEvent, NPCPlaybackEnum, NetStats, Npc, NpcEvent, ObjectMaterialAlignmmentEnum, ObjectMaterialTextSizeEnum, Player, PlayerEvent, PlayerStateEnum, RecordTypesEnum, SelectObjectTypesEnum, SpecialActionsEnum, SpectateModesEnum, Streamer, type TCommonCallback, type TDynamicArea, type TDynamicAreaTypes, type TEventFunc, type TEventName, type TLocales, type TPos, type TStreamerExtendable, TextDraw, TextDrawAlignEnum, TextDrawEvent, TextDrawFontsEnum, Vehicle, VehicleEvent, VehicleModelInfoEnum, VehicleParamsEnum, WeaponEnum, WeaponSkillsEnum, WeaponStatesEnum, defineEvent, isHolding, isPressed, isPressing, isReleased, rgba };