@infernus/core 0.14.4 → 0.14.5

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/LICENSE.md CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022-PRESENT Carl You
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022-PRESENT Carl You
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/bundle.d.ts CHANGED
@@ -868,7 +868,7 @@ declare class Vehicle {
868
868
  x: number;
869
869
  y: number;
870
870
  z: number;
871
- ret: number;
871
+ ret: boolean;
872
872
  };
873
873
  getRotationQuat(): {
874
874
  w: number;
@@ -1039,7 +1039,7 @@ declare class Vehicle {
1039
1039
  x: number;
1040
1040
  y: number;
1041
1041
  z: number;
1042
- ret: number;
1042
+ ret: boolean;
1043
1043
  };
1044
1044
  getRotationQuat: (vehicleId: number) => {
1045
1045
  w: number;
@@ -5232,12 +5232,6 @@ declare class DialogException extends Error {
5232
5232
  constructor(message: string);
5233
5233
  }
5234
5234
  //#endregion
5235
- //#region packages/core/src/exceptions/disconnect.d.ts
5236
- declare class DisconnectException extends Error {
5237
- playerId: number;
5238
- constructor(playerId: number);
5239
- }
5240
- //#endregion
5241
5235
  //#region packages/core/src/exceptions/gameMode.d.ts
5242
5236
  declare class GameModeException extends Error {
5243
5237
  constructor(message: string);
@@ -5546,6 +5540,7 @@ interface IInnerPlayerProps {
5546
5540
  lastUpdateFpsTick: number;
5547
5541
  isPaused: boolean;
5548
5542
  isRecording: boolean;
5543
+ disconnected: boolean;
5549
5544
  }
5550
5545
  interface ITextLabel {
5551
5546
  text: string;
@@ -5571,7 +5566,7 @@ interface IMenu {
5571
5566
  }
5572
5567
  //#endregion
5573
5568
  //#region packages/core/src/utils/color.d.ts
5574
- declare const rgba: (value: string | number) => number;
5569
+ declare function rgba(value: string | number): number;
5575
5570
  //#endregion
5576
5571
  //#region packages/core/src/utils/key.d.ts
5577
5572
  declare function isHolding(newKeys: KeysEnum, key: KeysEnum): boolean;
@@ -5581,9 +5576,9 @@ declare function isReleased(newKeys: KeysEnum, oldKeys: KeysEnum, key: KeysEnum)
5581
5576
  //#endregion
5582
5577
  //#region packages/core/src/utils/animate.d.ts
5583
5578
  declare const animateLib: Map<string, IAnimateInfo[]>;
5584
- declare const isValidAnimateLib: (lib: string) => false | IAnimateInfo[];
5585
- declare const isValidAnimateName: (lib: string, name: string) => boolean | undefined;
5586
- declare const getAnimateDurationByLibName: (lib: string, name: string) => number | undefined;
5579
+ declare function isValidAnimateLib(lib: string): boolean;
5580
+ declare function isValidAnimateName(lib: string, name: string): boolean;
5581
+ declare function getAnimateDurationByLibName(lib: string, name: string): number | null | undefined;
5587
5582
  //#endregion
5588
5583
  //#region packages/core/src/utils/hook.d.ts
5589
5584
  declare function defineHooks<T extends new (...args: any[]) => any>(target: T): readonly [THookedMethods<T>, <K extends TMethodKeys<InstanceType<T>>>(methodName: K, interceptor: (this: InstanceType<T>, ...args: Parameters<InstanceType<T>[K]>) => ReturnType<InstanceType<T>[K]>) => (this: InstanceType<T>, ...args: Parameters<InstanceType<T>[K]>) => ReturnType<InstanceType<T>[K]>];
@@ -5604,7 +5599,4 @@ declare class I18n {
5604
5599
  static convertSpecialChar(input: string): string;
5605
5600
  }
5606
5601
  //#endregion
5607
- //#region packages/core/src/utils/disconnect.d.ts
5608
- declare function stopWhenDisconnect<T>(player: Player, func: () => Promise<T>): Promise<T>;
5609
- //#endregion
5610
- export { Actor, ActorEvent, ActorException, ArtworkEnum, BodyPartsEnum, BoneIdsEnum, BulletHitTypesEnum, CameraCutStylesEnum, CameraModesEnum, CarModTypeEnum, CheckPointEvent, Checkpoint, ClickSourcesEnum, ClientCheckException, type CmdBusCallback, type CommandErrorRet, type CommandErrorTypes, CommandErrors, ConnectionStatusEnum, CoreException, DamageDeathReasonEnum, Dialog, DialogException, DialogStylesEnum, DisconnectException, Dynamic3DTextLabel, Dynamic3DTextLabelEvent, DynamicActor, DynamicActorEvent, DynamicActorException, DynamicArea, DynamicAreaEvent, DynamicAreaException, DynamicCheckPointEvent, DynamicCheckPointException, DynamicCheckpoint, DynamicMapIcon, DynamicMapIconEvent, DynamicMapIconException, DynamicObject, DynamicObjectEvent, DynamicObjectException, DynamicPickup, DynamicPickupEvent, DynamicPickupException, DynamicRaceCP, DynamicRaceCPEvent, DynamicRaceCpException, DynamicTextLabelException, E_STREAMER, EditResponseTypesEnum, ExecMiddlewareOptions, FightingStylesEnum, ForceSyncEnum, GameMode, GameModeException, GameText, GangZone, GangZoneCb, GangZoneEvent, GangZoneException, HookException, I18n, I18nException, IActor, IActorAnimation, IActorSpawn, IAnimateInfo, IAttachedData, IAttachedObject, IBounds, ICheckPoint, IClientResRaw, type ICmdOptions, ICommonRetVal, ICommonTextDrawKey, IDialog, IDialogFuncQueue, IDialogResCommon, IDynamic, IDynamic3DTextLabel, IDynamicActor, IDynamicAreaKey, IDynamicCheckPoint, IDynamicCircle, IDynamicCircleCommon, IDynamicCommon, IDynamicCuboid, IDynamicCylinder, IDynamicMapIcon, IDynamicObject, IDynamicPickup, IDynamicPolygon, IDynamicRaceCp, IDynamicRectangle, IDynamicRectangleCommon, IDynamicSphere, IFilterScript, IGangZone, IGangZonePos, IInnerPlayerProps, IMaterial, IMaterialText, IMenu, IObjectMp, IObjectPos, IObjectRotPos, IOffsets, IPickup, IPlayerClass, IQuat, IRaceCheckPoint, ITextDraw, ITextDrawCommonSize, ITextDrawRot, ITextLabel, IVehColor, IVehMatrix, IVehSpawnInfo, IVehicle, InvalidEnum, KeysEnum, LandingGearStateEnum, LimitsEnum, MapIconStyles, MapIconStylesEnum, MarkerModesEnum, MaterialTextAlign, MaterialTextSizes, Menu, MenuEvent, MenuException, NPCEntityCheckEnum, NPCMoveSpeedEnum, NPCMoveTypeEnum, NPCPlaybackEnum, NPCRecordStatusEnum, NetStats, NetStatsException, Npc, NpcEvent, NpcException, NpcNode, NpcPath, NpcRecord, ObjectMaterialAlignmentEnum, ObjectMaterialTextSizeEnum, ObjectMp, ObjectMpEvent, ObjectMpException, PickUpEvent, Pickup, PickupException, Player, PlayerEvent, PlayerException, PlayerStateEnum, RaceCheckpoint, RaceCpEvent, RecordTypesEnum, SelectObjectTypesEnum, SpecialActionsEnum, SpectateModesEnum, Streamer, StreamerAreaTypes, type StreamerArrayData, StreamerDistances, StreamerException, type StreamerItemTypeTuple, StreamerItemTypes, StreamerMiscellaneous, StreamerObjectTypes, TCommonCallback, TDynamicArea, TDynamicAreaTypes, TEventFunc, TEventName, THookedMethods, TLocales, TMethodKeys, TPos, TStreamerExtendable, TextDraw, TextDrawAlignEnum, TextDrawEvent, TextDrawException, TextDrawFontsEnum, TextLabel, TextLabelException, Vehicle, VehicleEvent, VehicleException, VehicleModelInfoEnum, VehicleParamsEnum, WeaponEnum, WeaponSkillsEnum, WeaponStatesEnum, animateLib, defineEvent, defineEventOptions, defineHooks, getAnimateDurationByLibName, isHolding, isPressed, isPressing, isReleased, isValidAnimateLib, isValidAnimateName, rgba, stopWhenDisconnect, useTrigger, withTriggerOptions };
5602
+ export { Actor, ActorEvent, ActorException, ArtworkEnum, BodyPartsEnum, BoneIdsEnum, BulletHitTypesEnum, CameraCutStylesEnum, CameraModesEnum, CarModTypeEnum, CheckPointEvent, Checkpoint, ClickSourcesEnum, ClientCheckException, type CmdBusCallback, type CommandErrorRet, type CommandErrorTypes, CommandErrors, ConnectionStatusEnum, CoreException, DamageDeathReasonEnum, Dialog, DialogException, DialogStylesEnum, Dynamic3DTextLabel, Dynamic3DTextLabelEvent, DynamicActor, DynamicActorEvent, DynamicActorException, DynamicArea, DynamicAreaEvent, DynamicAreaException, DynamicCheckPointEvent, DynamicCheckPointException, DynamicCheckpoint, DynamicMapIcon, DynamicMapIconEvent, DynamicMapIconException, DynamicObject, DynamicObjectEvent, DynamicObjectException, DynamicPickup, DynamicPickupEvent, DynamicPickupException, DynamicRaceCP, DynamicRaceCPEvent, DynamicRaceCpException, DynamicTextLabelException, E_STREAMER, EditResponseTypesEnum, ExecMiddlewareOptions, FightingStylesEnum, ForceSyncEnum, GameMode, GameModeException, GameText, GangZone, GangZoneCb, GangZoneEvent, GangZoneException, HookException, I18n, I18nException, IActor, IActorAnimation, IActorSpawn, IAnimateInfo, IAttachedData, IAttachedObject, IBounds, ICheckPoint, IClientResRaw, type ICmdOptions, ICommonRetVal, ICommonTextDrawKey, IDialog, IDialogFuncQueue, IDialogResCommon, IDynamic, IDynamic3DTextLabel, IDynamicActor, IDynamicAreaKey, IDynamicCheckPoint, IDynamicCircle, IDynamicCircleCommon, IDynamicCommon, IDynamicCuboid, IDynamicCylinder, IDynamicMapIcon, IDynamicObject, IDynamicPickup, IDynamicPolygon, IDynamicRaceCp, IDynamicRectangle, IDynamicRectangleCommon, IDynamicSphere, IFilterScript, IGangZone, IGangZonePos, IInnerPlayerProps, IMaterial, IMaterialText, IMenu, IObjectMp, IObjectPos, IObjectRotPos, IOffsets, IPickup, IPlayerClass, IQuat, IRaceCheckPoint, ITextDraw, ITextDrawCommonSize, ITextDrawRot, ITextLabel, IVehColor, IVehMatrix, IVehSpawnInfo, IVehicle, InvalidEnum, KeysEnum, LandingGearStateEnum, LimitsEnum, MapIconStyles, MapIconStylesEnum, MarkerModesEnum, MaterialTextAlign, MaterialTextSizes, Menu, MenuEvent, MenuException, NPCEntityCheckEnum, NPCMoveSpeedEnum, NPCMoveTypeEnum, NPCPlaybackEnum, NPCRecordStatusEnum, NetStats, NetStatsException, Npc, NpcEvent, NpcException, NpcNode, NpcPath, NpcRecord, ObjectMaterialAlignmentEnum, ObjectMaterialTextSizeEnum, ObjectMp, ObjectMpEvent, ObjectMpException, PickUpEvent, Pickup, PickupException, Player, PlayerEvent, PlayerException, PlayerStateEnum, RaceCheckpoint, RaceCpEvent, RecordTypesEnum, SelectObjectTypesEnum, SpecialActionsEnum, SpectateModesEnum, Streamer, StreamerAreaTypes, type StreamerArrayData, StreamerDistances, StreamerException, type StreamerItemTypeTuple, StreamerItemTypes, StreamerMiscellaneous, StreamerObjectTypes, TCommonCallback, TDynamicArea, TDynamicAreaTypes, TEventFunc, TEventName, THookedMethods, TLocales, TMethodKeys, TPos, TStreamerExtendable, TextDraw, TextDrawAlignEnum, TextDrawEvent, TextDrawException, TextDrawFontsEnum, TextLabel, TextLabelException, Vehicle, VehicleEvent, VehicleException, VehicleModelInfoEnum, VehicleParamsEnum, WeaponEnum, WeaponSkillsEnum, WeaponStatesEnum, animateLib, defineEvent, defineEventOptions, defineHooks, getAnimateDurationByLibName, isHolding, isPressed, isPressing, isReleased, isValidAnimateLib, isValidAnimateName, rgba, useTrigger, withTriggerOptions };