@infernus/core 0.11.8 → 0.11.9

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/dist/bundle.d.ts CHANGED
@@ -2072,7 +2072,7 @@ declare class Player {
2072
2072
  setPosFindZ(x: number, y: number, z?: number): Promise<boolean>;
2073
2073
  setWorldBounds(xMax: number, xMin: number, yMax: number, yMin: number): boolean;
2074
2074
  clearWorldBounds(): boolean;
2075
- setChatBubble(text: string, color: string | number, drawDistance: number, expireTime: number): boolean;
2075
+ setChatBubble(text: string, color: string | number, drawDistance: number, expireTime: number, charset?: string): boolean;
2076
2076
  getDistanceFromPoint(x: number, y: number, z: number): number;
2077
2077
  getCustomSkin(): number;
2078
2078
  getTargetPlayer(): Player | undefined;
@@ -2171,6 +2171,13 @@ type TDynamicArea = IDynamicCircle | IDynamicCylinder | IDynamicSphere | IDynami
2171
2171
  type TDynamicAreaTypes = "circle" | "cylinder" | "sphere" | "rectangle" | "cuboid" | "polygon";
2172
2172
  type TCommonCallback = number | boolean | Promise<number | boolean>;
2173
2173
 
2174
+ type TMethodKeys<T> = keyof {
2175
+ [K in keyof T as T[K] extends (...args: any[]) => any ? K : never]: any;
2176
+ };
2177
+ type THookedMethods<T extends new (...args: any[]) => any> = {
2178
+ [K in TMethodKeys<InstanceType<T>>]: OmitThisParameter<InstanceType<T>[K]>;
2179
+ };
2180
+
2174
2181
  declare class I18n {
2175
2182
  private defaultLocale;
2176
2183
  private locales;
@@ -2182,7 +2189,7 @@ declare class I18n {
2182
2189
  static encodeToBuf(content: string, charset: string): number[];
2183
2190
  static decodeFromBuf(buf: Buffer | number[], charset?: string): string;
2184
2191
  static getValidStr(byteArr: number[]): number[];
2185
- static snakeLocaleKeys(locales: TLocales): any;
2192
+ static snakeLocaleKeys(locales: TLocales): Record<string, Record<string, any>>;
2186
2193
  static convertSpecialChar(input: string): string;
2187
2194
  }
2188
2195
 
@@ -2609,4 +2616,6 @@ declare const isValidAnimateLib: (lib: string) => false | IAnimateInfo[];
2609
2616
  declare const isValidAnimateName: (lib: string, name: string) => boolean | undefined;
2610
2617
  declare const getAnimateDurationByLibName: (lib: string, name: string) => number | undefined;
2611
2618
 
2612
- export { ArtworkEnum, BodyPartsEnum, BoneIdsEnum, BulletHitTypesEnum, CameraCutStylesEnum, CameraModesEnum, CarModTypeEnum, ClickSourcesEnum, type CmdBusCallback, type CommandErrorRet, type CommandErrorTypes, 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 ICmdOptions, 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, animateLib, defineEvent, getAnimateDurationByLibName, isHolding, isPressed, isPressing, isReleased, isValidAnimateLib, isValidAnimateName, rgba };
2619
+ 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]>];
2620
+
2621
+ export { ArtworkEnum, BodyPartsEnum, BoneIdsEnum, BulletHitTypesEnum, CameraCutStylesEnum, CameraModesEnum, CarModTypeEnum, ClickSourcesEnum, type CmdBusCallback, type CommandErrorRet, type CommandErrorTypes, 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 ICmdOptions, 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 THookedMethods, type TLocales, type TMethodKeys, type TPos, type TStreamerExtendable, TextDraw, TextDrawAlignEnum, TextDrawEvent, TextDrawFontsEnum, Vehicle, VehicleEvent, VehicleModelInfoEnum, VehicleParamsEnum, WeaponEnum, WeaponSkillsEnum, WeaponStatesEnum, animateLib, defineEvent, defineHooks, getAnimateDurationByLibName, isHolding, isPressed, isPressing, isReleased, isValidAnimateLib, isValidAnimateName, rgba };