@infernus/core 0.11.7 → 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
@@ -1491,6 +1491,9 @@ declare class Dynamic3DTextLabel {
1491
1491
  updateText(color: string | number, text: string, charset?: string | undefined): number;
1492
1492
  toggleCallbacks(toggle?: boolean): number;
1493
1493
  isToggleCallbacks(): boolean;
1494
+ setOffsets(offsetX: number, offsetY: number, offsetZ: number): number;
1495
+ attachToPlayer(player: Player | InvalidEnum.PLAYER_ID, offsetX: number, offsetY: number, offsetZ: number): number;
1496
+ attachToVehicle(vehicle: Vehicle | InvalidEnum.VEHICLE_ID, offsetX: number, offsetY: number, offsetZ: number): number;
1494
1497
  static togglePlayerUpdate(player: Player, update?: boolean): number;
1495
1498
  static hideForPlayer(player: Player, z?: number): number;
1496
1499
  static showForPlayer(player: Player, z?: number): number;
@@ -2069,7 +2072,7 @@ declare class Player {
2069
2072
  setPosFindZ(x: number, y: number, z?: number): Promise<boolean>;
2070
2073
  setWorldBounds(xMax: number, xMin: number, yMax: number, yMin: number): boolean;
2071
2074
  clearWorldBounds(): boolean;
2072
- 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;
2073
2076
  getDistanceFromPoint(x: number, y: number, z: number): number;
2074
2077
  getCustomSkin(): number;
2075
2078
  getTargetPlayer(): Player | undefined;
@@ -2168,6 +2171,13 @@ type TDynamicArea = IDynamicCircle | IDynamicCylinder | IDynamicSphere | IDynami
2168
2171
  type TDynamicAreaTypes = "circle" | "cylinder" | "sphere" | "rectangle" | "cuboid" | "polygon";
2169
2172
  type TCommonCallback = number | boolean | Promise<number | boolean>;
2170
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
+
2171
2181
  declare class I18n {
2172
2182
  private defaultLocale;
2173
2183
  private locales;
@@ -2179,7 +2189,7 @@ declare class I18n {
2179
2189
  static encodeToBuf(content: string, charset: string): number[];
2180
2190
  static decodeFromBuf(buf: Buffer | number[], charset?: string): string;
2181
2191
  static getValidStr(byteArr: number[]): number[];
2182
- static snakeLocaleKeys(locales: TLocales): any;
2192
+ static snakeLocaleKeys(locales: TLocales): Record<string, Record<string, any>>;
2183
2193
  static convertSpecialChar(input: string): string;
2184
2194
  }
2185
2195
 
@@ -2606,4 +2616,6 @@ declare const isValidAnimateLib: (lib: string) => false | IAnimateInfo[];
2606
2616
  declare const isValidAnimateName: (lib: string, name: string) => boolean | undefined;
2607
2617
  declare const getAnimateDurationByLibName: (lib: string, name: string) => number | undefined;
2608
2618
 
2609
- 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 };