Skip to content

Commit

Permalink
chore: Bump version (#331)
Browse files Browse the repository at this point in the history
* feat(client): type safety for useStreaming (#298)

adds second overload for constructors with `useStreaming` and `streamingDistance` so it is impossible to use `useStreaming` alone (leading to unwanted behavior)

* fix(client): typos (#297)

* feat(client): type safety for useStreaming (#298)

adds second overload for constructors with `useStreaming` and `streamingDistance` so it is impossible to use `useStreaming` alone (leading to unwanted behavior)

* fix(client): typos (#297)

* feat(webview): Add getPermissionState typing

* feat(webview): Add getPermissionState typing

* chore(webview, client): Bump version

* chore(webview, client): Bump version

* fix(webview): Formatting

* fix(webview): Formatting

* chore(webview, client): Bump version

* chore(webview, client): Bump version

* fix(shared): Added required first argument to alt.log methods (#299)

* ci(shared): Bump version

* fix(server): virtual entity description (#306)

* chore: update imports in examples (#303)

* chore: remove outdated event beforePlayerConnect (#304)

* chore: add package.json to first resource article (#302)

* feat: add server debugging article (#309)

* chore: add more descriptions for virtual entity API (#307)

* chore: edit text labels to avoid confusion with 15.0 text labels (#305)

* feat(client): add alt.Object.streamedIn (#312)

* chore(client): Bump version

* feat(client): add alt.Object.streamedIn (#312)

* chore(client): Bump version

* chore: improve getClosestEntities description (#310)

* chore: improve getClosestEntities description (#310)

* chore(server): Bump version

* chore(server): Bump version

* fix(client): add missing Ped.getByRemoteID (#314)

* fix(client, server): fix and improve RPC docs (#315)

* Update requirements list (#317)

* Fixed wrong name in event docs (#316)

* fix(client): add missing Ped.getByRemoteID (#314)

* fix(client, server): fix and improve RPC docs (#315)

* Update requirements list (#317)

* Fixed wrong name in event docs (#316)

* chore: Bump version

* feat(client): Add reloadVehiclePhysics

* chore(client)!: Deprecate setWatermarkPosition and it's enum

* chore(client)!: Deprecate setWatermarkPosition and it's enum

* chore: Bump version

* chore: Bump version

* chore(server): add some descriptions of voice channel properties (#318)

* chore(server): add some descriptions of voice channel properties (#318)

* chore: Bump version

* chore: Bump version

* fix(natives): Fix nullable string parameters

* fix(natives): Fix nullable string return type

* chore: Bump version

* fix(natives): Fix nullable string parameters

* fix(natives): Fix nullable string return type

* chore: Bump version

* feat(client, server, shared): switch to normal enums (#319)

* chore: Bump version

* feat(client): Add new methods

* feat(client): Add new methods

* chore: Bump version

* chore: Bump version

* chore: Bump version

* chore: update math snippet (#320)

* feat(client, server, shared): switch to normal enums (#319)

* chore: Bump version

* Merge 'dev' into 'rc'

* chore: Bump version

* chore: remove outdated workers article (#323)

* feat: add multiple metadata setters (#322)

* chore(shared): fix angleTo return type of vector2 (#324)

* chore: remove outdated workers article (#323)

* feat: add multiple metadata setters (#322)

* chore(shared): fix angleTo return type of vector2 (#324)

* chore: Bump version

* chore: Bump version

* feat(client): Interior API (#325)

* feat(client): Interior API

* chore(client): add description for getForInteriorID

* chore(client): add example

* fix(client): typo

* fix(client): InteriorRoom and InteriorPortal don't have public constructors (#326)

* feat(client): add config flag SWAP_ALLOW_HEAD_PROP_IN_VEHICLE_FLAG (#333)

* chore: Bump version

---------

Co-authored-by: xLuxy <[email protected]>
Co-authored-by: WelaurS <[email protected]>
Co-authored-by: DevPanda <[email protected]>
Co-authored-by: Dav-Renz <[email protected]>
Co-authored-by: S0P4 <[email protected]>
  • Loading branch information
6 people authored Jan 14, 2025
1 parent 8f9750b commit c2c639d
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 1 deletion.
92 changes: 92 additions & 0 deletions client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ declare module "alt-client" {
* Useful when damage in weapon meta is set to 0, and is calculated manually by script in event.
*/
ForceVehicleTyreBurst = "FORCE_VEHICLE_TYRE_BURST",
/**
* Prevents head props from being hidden when getting into the vehicle.
* Equivalent to calling `setPedResetFlag` native with flag 337 in every tick.
*/
SwapAllowHeadPropInVehicleFlag = "SWAP_ALLOW_HEAD_PROP_IN_VEHICLE_FLAG",
}

/** @deprecated This method will be removed in the next major release. (v17) */
Expand Down Expand Up @@ -561,6 +566,14 @@ declare module "alt-client" {
readonly propertyUpdateTicks: number[][];
}

/**
* Axis-Aligned Bounding Box.
*/
export interface IAABB {
min: number;
max: number;
}

export class BaseObject extends shared.BaseObject {
/**
* Whether this entity was created clientside or serverside. (Clientside = false, Serverside = true).
Expand Down Expand Up @@ -4564,5 +4577,84 @@ declare module "alt-client" {
public static register(path: string): Font;
}

export class Interior {
protected constructor();

/**
* Create interior instance by id. Throws if id is invalid (for example, when it's 0).
*
* @example
* ```js
* // Get the interior where our local player is currently in
* const interiorId = natives.getInteriorFromEntity(alt.Player.local);
* if (interiorId !== 0) {
* const interior = alt.Interior.getForInteriorID(interiorId);
*
* // Output room count of it
* alt.log({
* roomCount: interior.roomCount
* });
* } else {
* alt.logError("Interior id is 0, seems like player is outside");
* }
* ```
*/
public static getForInteriorID(id: number): Interior;

public readonly id: number;
public readonly pos: shared.Vector3;
public readonly rot: shared.Vector3;
public readonly roomCount: number;
public readonly portalCount: number;
public readonly entitiesExtents: IAABB;

/**
* Get room by it's hash. Throws if room hash is invalid.
*/
public getRoomByHash(hash: number): InteriorRoom;

/**
* Get room by it's index: from 0 to {@link roomCount}, for example if `roomCount = 2`, room indexes will be 0 and 1.
* Throws if room index is invalid.
*/
public getRoomByIndex(index: number): InteriorRoom;

/**
* Get portal by it's index: from 0 to {@link portalCount}, for example if `portalCount = 2`, portal indexes will be 0 and 1.
* Throws if portal index is invalid.
*/
public getPortalByIndex(index: number): InteriorPortal;
}

export class InteriorRoom {
protected constructor();

public readonly index: number;
public readonly name: string;
public readonly nameHash: number;
public flag: number;
public timecycle: number;
public extents: IAABB;
}

export class InteriorPortal {
protected constructor();

public readonly index: number;
public readonly cornerCount: number;
public readonly entityCount: number;
public roomFrom: number;
public roomTo: number;
public flag: number;

public getCornerPos(cornerIndex: number): shared.Vector3;
public setCornerPos(cornerIndex: number, value: shared.Vector3): void;
public getEntityArchetype(entityIndex: number): number;
public getEntityFlag(entityIndex: number): number;
public setEntityFlag(entityIndex: number, flag: number): void;
public getEntityPos(entityIndex: number): shared.Vector3;
public getEntityRot(entityIndex: number): shared.Vector3;
}

export * from "alt-shared";
}
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@altv/types-client",
"version": "16.2.7",
"version": "16.2.8",
"description": "This package contains types definitions for alt:V client-side module.",
"types": "index.d.ts",
"files": [
Expand Down

0 comments on commit c2c639d

Please sign in to comment.