From 28c09aa0be3071eef3c76e685d3e50c6b5df6d17 Mon Sep 17 00:00:00 2001 From: Neloreck Date: Fri, 20 Dec 2024 00:38:17 +0200 Subject: [PATCH 1/5] Add new type definitions from OXR-COC merge. --- types/xr_ai/xr_alife.d.ts | 12 ++++- types/xr_lib/xr_task.d.ts | 18 +++++-- types/xr_object/client/xr_level.d.ts | 54 +++++++++++++++++-- .../xr_object/script/xr_script_interface.d.ts | 51 +++++++++--------- types/xr_object/server/xr_server_object.d.ts | 18 ++++++- types/xr_ui/xr_ui_interface.d.ts | 30 +++++++++-- 6 files changed, 144 insertions(+), 39 deletions(-) diff --git a/types/xr_ai/xr_alife.d.ts b/types/xr_ai/xr_alife.d.ts index 322c97541..7227a9312 100644 --- a/types/xr_ai/xr_alife.d.ts +++ b/types/xr_ai/xr_alife.d.ts @@ -90,12 +90,22 @@ declare module "xray16" { public create(object_id: u16): T; public create( - item_section: string, + section: string, position: vector, level_vertex_id: u32, game_vertex_id: u32, parent_object_id?: u16 ): T; + // Alundaio: Allows to call alife():register(se_obj) manually afterward,editing + // Alundaio: so that packet can be done safely when spawning object with a parent. + public create( + section: string, + position: vector, + level_vertex_id: u32, + game_vertex_id: u32, + parent_object_id: u16, + reg: boolean + ): T; } /** diff --git a/types/xr_lib/xr_task.d.ts b/types/xr_lib/xr_task.d.ts index c7c7f5a6a..cdb75692b 100644 --- a/types/xr_lib/xr_task.d.ts +++ b/types/xr_lib/xr_task.d.ts @@ -35,8 +35,6 @@ declare module "xray16" { export class SGameTaskObjective { public constructor(task: CGameTask, id: i32); - public remove_map_locations(flag: boolean): void; - public set_icon_name(icon_name: string): void; public get_icon_name(): T | null; @@ -75,7 +73,21 @@ declare module "xray16" { public set_map_hint(hint: string): void; - public change_map_location(value: string, value2: u16): void; + /** + * @returns target map location of task object + */ + public get_map_location(): string; + + /** + * @returns target map object ID of task object + */ + public get_map_object_id(): u16; + + public change_map_location(new_map_location: string, new_map_object_id: u16): void; + + public remove_map_locations(notify: boolean): void; + + public create_map_location(on_load: boolean): void; public set_map_object_id(id: i32): void; } diff --git a/types/xr_object/client/xr_level.d.ts b/types/xr_object/client/xr_level.d.ts index 6fdba7920..b3378723b 100644 --- a/types/xr_object/client/xr_level.d.ts +++ b/types/xr_object/client/xr_level.d.ts @@ -81,18 +81,31 @@ declare module "xray16" { public FireDirDiff(): f32; + /** + * @returns amount of fuel in vehicle instance + */ public GetfFuel(): f32; + /** + * @returns fuel consumption rate of vehicle instance + */ public GetfFuelConsumption(): f32; + /** + * @returns fuel tank size (max possible amount of fuel at time) + */ public GetfFuelTank(): f32; + /** + * @returns vehicle health value + */ public GetfHealth(): f32; + /** + * @returns whether vehicle has mounted weapon + */ public HasWeapon(): boolean; - public IsActiveEngine(): boolean; - public IsObjectVisible(game_object: game_object): boolean; public PlayDamageParticles(): void; @@ -107,12 +120,45 @@ declare module "xray16" { public SetfHealth(health: f32): void; - public StartEngine(): void; + /** + * @returns whether vehicle engine is active at the moment + */ + public IsActiveEngine(): boolean; - public StopDamageParticles(): void; + /** + * Start vehicle engine. + */ + public StartEngine(): void; + /** + * Stop vehicle engine. + */ public StopEngine(): void; + /** + * Set vehicle hand break in active state. + */ + public HandBreak(): void; + + /** + * Deactivate vehicle hand break. + */ + public ReleaseHandBreak(): void; + + /** + * @returns current vehicle RPM value (speed) + */ + public GetRPM(): f32; + + /** + * Set current vehicle RPM value (speed). + * + * @param rpm - RPM value to apply + */ + public SetRPM(rpm: f32): void; + + public StopDamageParticles(): void; + public engaged(): boolean; public Action(value1: u16, value2: u32): void; diff --git a/types/xr_object/script/xr_script_interface.d.ts b/types/xr_object/script/xr_script_interface.d.ts index e346c7f97..6c3bfd00e 100644 --- a/types/xr_object/script/xr_script_interface.d.ts +++ b/types/xr_object/script/xr_script_interface.d.ts @@ -54,11 +54,6 @@ declare module "xray16" { * @group xr_script_interface */ export class callback { - /** - * Placeholder. - */ - public static readonly dummy: -1; - /** * Default x-ray 16 callbacks. */ @@ -98,28 +93,32 @@ declare module "xray16" { public static readonly trader_sound_end: 33; public static readonly take_item_from_box: 34; public static readonly weapon_no_ammo: 35; + public static readonly hud_animation_end: 36; + + public static readonly key_press: 37; + public static readonly key_release: 38; + public static readonly key_hold: 39; + public static readonly mouse_move: 40; + public static readonly mouse_wheel: 41; + public static readonly controller_press: 42; + public static readonly controller_release: 43; + public static readonly controller_hold: 44; + // public static readonly controller_attitude_change: 45; + + public static readonly item_to_belt: 46; + public static readonly item_to_slot: 47; + public static readonly item_to_ruck: 48; + + public static readonly weapon_zoom_in: 49; + public static readonly weapon_zoom_out: 50; + public static readonly weapon_jammed: 51; + public static readonly weapon_magazine_empty: 52; + + public static readonly actor_before_death: 53; + public static readonly on_attach_vehicle: 54; + public static readonly on_detach_vehicle: 55; + public static readonly on_use_vehicle: 56; - /** - * Custom callbacks from open x-ray: - */ - public static readonly key_press: 36; - public static readonly key_release: 37; - public static readonly key_hold: 38; - public static readonly mouse_move: 39; - public static readonly mouse_wheel: 40; - public static readonly controller_press: 41; - public static readonly controller_release: 42; - public static readonly controller_hold: 43; - public static readonly item_to_belt: 44; - public static readonly item_to_slot: 45; - public static readonly item_to_ruck: 46; - public static readonly actor_before_death: 47; - public static readonly on_attach_vehicle: 48; - public static readonly on_detach_vehicle: 49; - public static readonly on_use_vehicle: 50; - public static readonly weapon_zoom_in: 51; - public static readonly weapon_zoom_out: 52; - public static readonly weapon_jammed: 53; } /** diff --git a/types/xr_object/server/xr_server_object.d.ts b/types/xr_object/server/xr_server_object.d.ts index 44b66d570..b4bc540c9 100644 --- a/types/xr_object/server/xr_server_object.d.ts +++ b/types/xr_object/server/xr_server_object.d.ts @@ -75,7 +75,11 @@ declare module "xray16" { * @source C++ class cse_alife_inventory_item * @group xr_object_server */ - export interface IXR_cse_alife_inventory_item {} + export interface IXR_cse_alife_inventory_item { + has_upgrade(section: string): boolean; + + add_upgrade(section: string): boolean; + } /** * @source C++ class cse_alife_object_breakable : cse_alife_dynamic_object_visual @@ -343,6 +347,10 @@ declare module "xray16" { */ export class cse_alife_item extends cse_alife_dynamic_object_visual implements IXR_cse_alife_inventory_item { public bfUseful(): boolean; + + public has_upgrade(section: string): boolean; + + public add_upgrade(section: string): boolean; } /** @@ -354,6 +362,12 @@ declare module "xray16" { */ export class cse_alife_item_weapon extends cse_alife_item { public clone_addons(cse_alife_item_weapon: cse_alife_item_weapon): void; + + public set_ammo_elapsed(count: u16): void; + + public get_ammo_elapsed(): u16; + + public get_ammo_magsize(): u16; } /** @@ -432,7 +446,7 @@ declare module "xray16" { * @customConstructor cse_alife_monster_rat * @group xr_object_server */ - export class cse_alife_monster_rat extends cse_alife_monster_abstract implements IXR_cse_alife_inventory_item {} + export class cse_alife_monster_rat extends cse_alife_monster_abstract {} /** * @source C++ class cse_alife_monster_zombie : cse_alife_monster_abstract diff --git a/types/xr_ui/xr_ui_interface.d.ts b/types/xr_ui/xr_ui_interface.d.ts index 47f59474e..91ee7ada8 100644 --- a/types/xr_ui/xr_ui_interface.d.ts +++ b/types/xr_ui/xr_ui_interface.d.ts @@ -1,3 +1,5 @@ +import { vector2 } from "xray16"; + declare module "xray16" { /** * @source C++ class CUIWindow @@ -152,6 +154,12 @@ declare module "xray16" { public SetVertScroll(enabled: boolean): void; public SetCurrentID(id: i32): void; + + public SetCurrentIdx(index: u32): void; + + public GetCurrentIdx(): u32; + + public SetCurrentValue(): void; } /** @@ -449,7 +457,7 @@ declare module "xray16" { public GetRange_min(): f32; - public SetProgressPos(value: f32): void; + public SetProgressPos(position: f32): void; public GetProgressPos(): f32; } @@ -469,6 +477,10 @@ declare module "xray16" { public Show(show: boolean): void; public Show(int1: i32, int2: i32): void; + + public GetSelectedItem(): CUIListBoxItem; + + public InitPropertiesBox(position: vector2, size: vector2): void; } /** @@ -551,6 +563,8 @@ declare module "xray16" { export class CUIStatic extends CUIWindow { public GetColor(): u32; + public SetColor(color: u32): void; + public TextControl(): CUILines; public GetTextureRect(): Frect; @@ -565,6 +579,10 @@ declare module "xray16" { public SetTextColor(r: i32, g: i32, b: i32, a: i32): void; + public SetTextureColor(color: u32): void; + + public GetTextureColor(): u32; + public SetHeading(number: f32): void; public SetTextST(string: string): void; @@ -587,8 +605,6 @@ declare module "xray16" { public SetTextureOffset(x: f32, y: f32): void; - public SetColor(color: u32): void; - public SetElipsis(a: i32, b: i32): void; public GetHeading(): f32; @@ -829,6 +845,10 @@ declare module "xray16" { public GetActiveSection(): string; public GetTabControl(): CUITabControl; + + public SetActiveDialog(dialog: CUIWindow | null): void; + + public GetActiveDialog(): CUIWindow | null; } /** @@ -850,6 +870,10 @@ declare module "xray16" { ): void; public refresh_current_cell_item(): void; + + public ToSlot(object: game_object, force_place: boolean, slot_id: u16): boolean; + + public ToBelt(object: game_object, use_cursor_position: boolean): boolean; } /** From 51cb6ae7365b438e042f9017702e10798ffa7e63 Mon Sep 17 00:00:00 2001 From: Neloreck Date: Fri, 20 Dec 2024 00:41:39 +0200 Subject: [PATCH 2/5] Version bump. --- package-lock.json | 177 ++++++++++++++++++++++++++-------------------- package.json | 6 +- 2 files changed, 102 insertions(+), 81 deletions(-) diff --git a/package-lock.json b/package-lock.json index 15460f5ad..72f09b288 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "xray16", - "version": "1.1.1", + "version": "1.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "xray16", - "version": "1.1.1", + "version": "1.2.0", "devDependencies": { "@types/node": "20.3.1", "@typescript-eslint/eslint-plugin": "^5.54.0", @@ -20,10 +20,10 @@ "eslint-plugin-sort-keys-fix": "^1.1.2", "prettier": "^3.0.1", "typedoc": "^0.24.8", - "typescript": "^5.1.6" + "typescript": "5.1.6" }, "peerDependencies": { - "typescript-to-lua": "^1.16.3" + "typescript-to-lua": "1.16.3" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -481,10 +481,11 @@ } }, "node_modules/ansi-sequence-parser": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", - "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true, + "license": "MIT" }, "node_modules/ansi-styles": { "version": "4.3.0", @@ -656,17 +657,19 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -766,10 +769,11 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -857,9 +861,10 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", + "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", + "license": "MIT", "peer": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -1651,10 +1656,11 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1895,6 +1901,7 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC", "peer": true }, "node_modules/grapheme-splitter": { @@ -2186,6 +2193,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -2357,10 +2365,11 @@ } }, "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" }, "node_modules/levn": { "version": "0.4.1", @@ -2419,6 +2428,7 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, + "license": "MIT", "bin": { "marked": "bin/marked.js" }, @@ -2436,12 +2446,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -2449,10 +2460,11 @@ } }, "node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2703,10 +2715,11 @@ } }, "node_modules/prettier": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.1.tgz", - "integrity": "sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -2940,10 +2953,11 @@ } }, "node_modules/shiki": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.1.tgz", - "integrity": "sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==", + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, + "license": "MIT", "dependencies": { "ansi-sequence-parser": "^1.1.0", "jsonc-parser": "^3.2.0", @@ -3110,6 +3124,7 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=6" @@ -3126,6 +3141,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -3260,6 +3276,7 @@ "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.8.tgz", "integrity": "sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==", "dev": true, + "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", @@ -3280,6 +3297,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3289,9 +3307,10 @@ } }, "node_modules/typescript-to-lua": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/typescript-to-lua/-/typescript-to-lua-1.17.0.tgz", - "integrity": "sha512-mfMgZHAOtkHcfAT4T9M/RsthWwsLQarP00FUExuisH3ixABzAQQDoJxLMBKW3ybmu4NcYrhNysJXwgApw3TeRg==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/typescript-to-lua/-/typescript-to-lua-1.16.3.tgz", + "integrity": "sha512-vWJIfupLO6u22tMYmlczdcb5TtFUv8Mwf79ZKUyxqX4td5xWv3L2wu5WCx0YrOZ4//JwDQohrkfX1y4LbZTugQ==", + "license": "MIT", "peer": true, "dependencies": { "@typescript-to-lua/language-extensions": "1.0.0", @@ -3337,13 +3356,15 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/vscode-textmate": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/which": { "version": "2.0.2", @@ -3727,9 +3748,9 @@ "dev": true }, "ansi-sequence-parser": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz", - "integrity": "sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", "dev": true }, "ansi-styles": { @@ -3856,12 +3877,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "builtin-modules": { @@ -3934,9 +3955,9 @@ "dev": true }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -3999,9 +4020,9 @@ } }, "enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", + "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", "peer": true, "requires": { "graceful-fs": "^4.2.4", @@ -4595,9 +4616,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -5099,9 +5120,9 @@ } }, "jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", "dev": true }, "levn": { @@ -5157,19 +5178,19 @@ "dev": true }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -5349,9 +5370,9 @@ "dev": true }, "prettier": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.1.tgz", - "integrity": "sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true }, "punycode": { @@ -5488,9 +5509,9 @@ "dev": true }, "shiki": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.1.tgz", - "integrity": "sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==", + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, "requires": { "ansi-sequence-parser": "^1.1.0", @@ -5740,9 +5761,9 @@ "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==" }, "typescript-to-lua": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/typescript-to-lua/-/typescript-to-lua-1.17.0.tgz", - "integrity": "sha512-mfMgZHAOtkHcfAT4T9M/RsthWwsLQarP00FUExuisH3ixABzAQQDoJxLMBKW3ybmu4NcYrhNysJXwgApw3TeRg==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/typescript-to-lua/-/typescript-to-lua-1.16.3.tgz", + "integrity": "sha512-vWJIfupLO6u22tMYmlczdcb5TtFUv8Mwf79ZKUyxqX4td5xWv3L2wu5WCx0YrOZ4//JwDQohrkfX1y4LbZTugQ==", "peer": true, "requires": { "@typescript-to-lua/language-extensions": "1.0.0", diff --git a/package.json b/package.json index 32695056b..a9fc8b7f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xray16", - "version": "1.1.3", + "version": "1.2.0", "author": "Neloreck", "repository": "https://github.com/stalker-xrts/xray-16-types", "private": false, @@ -16,7 +16,7 @@ "lint": "eslint . --ext .ts,.tsx,.js" }, "peerDependencies": { - "typescript-to-lua": "^1.16.3" + "typescript-to-lua": "1.16.3" }, "devDependencies": { "@types/node": "20.3.1", @@ -31,7 +31,7 @@ "eslint-plugin-sort-keys-fix": "^1.1.2", "prettier": "^3.0.1", "typedoc": "^0.24.8", - "typescript": "^5.1.6" + "typescript": "5.1.6" }, "files": [ "plugins/**/*", From ba250f76900a7677771bf86920d460046830ab69 Mon Sep 17 00:00:00 2001 From: Neloreck Date: Fri, 20 Dec 2024 00:58:52 +0200 Subject: [PATCH 3/5] Add type checking method. Add some UI methods. --- types/xr_object/client/xr_physic.d.ts | 20 +++++- types/xr_object/script/xr_script_object.d.ts | 65 ++++++++++++++++++++ types/xr_ui/xr_ui_core.d.ts | 61 +++++++++--------- 3 files changed, 114 insertions(+), 32 deletions(-) diff --git a/types/xr_object/client/xr_physic.d.ts b/types/xr_object/client/xr_physic.d.ts index 7e54cc874..84f64b317 100644 --- a/types/xr_object/client/xr_physic.d.ts +++ b/types/xr_object/client/xr_physic.d.ts @@ -194,8 +194,22 @@ declare module "xray16" { export class holder { public engaged(): boolean; - public Action(value1: u16, value2: u32): void; - - public SetParam(value: i32, vector: vector): void; + public Action(id: u16, flags: u32): void; + + public SetParam(id: i32, value: vector): void; + + /** + * Set holder object enter state. + * + * @param is_enabled - whether holder object can be entered + */ + public SetEnterLocked(is_enabled: boolean): void; + + /** + * Set holder object exist state. + * + * @param is_enabled - whether holder object can be exited + */ + public SetExitLocked(is_enabled: boolean): void; } } diff --git a/types/xr_object/script/xr_script_object.d.ts b/types/xr_object/script/xr_script_object.d.ts index 09a2913b9..d80381331 100644 --- a/types/xr_object/script/xr_script_object.d.ts +++ b/types/xr_object/script/xr_script_object.d.ts @@ -502,6 +502,8 @@ declare module "xray16" { public set_character_rank(value: i32): void; + public set_character_reputation(value: i32): void; + public set_collision_off(value: boolean): void; public set_default_panic_threshold(): void; @@ -620,6 +622,8 @@ declare module "xray16" { public change_goodwill(delta_goodwill: i32, to_object: game_object): void; + public change_character_rank(value: i32): void; + public character_reputation(): i32; public community_goodwill(from_community: string): i32; @@ -1302,6 +1306,50 @@ declare module "xray16" { public force_set_position(position: vector, bool: boolean): void; public get_ammo_count_for_type(type: u8): i32; + + public weapon_in_grenade_mode(): boolean; + + public is_entity_alive(): boolean; + + public is_inventory_item(): boolean; + + public is_inventory_owner(): boolean; + + public is_actor(): boolean; + + public is_custom_monster(): boolean; + + public is_weapon(): boolean; + + public is_outfit(): boolean; + + public is_scope(): boolean; + + public is_silencer(): boolean; + + public is_grenade_launcher(): boolean; + + public is_weapon_magazined(): boolean; + + public is_space_restrictor(): boolean; + + public is_stalker(): boolean; + + public is_anomaly(): boolean; + + public is_monster(): boolean; + + public is_artefact(): boolean; + + public is_ammo(): boolean; + + public is_trader(): boolean; + + public is_hud_item(): boolean; + + public is_weapon_gl(): boolean; + + public is_inventory_box(): boolean; } /* @@ -1321,5 +1369,22 @@ declare module "xray16" { * remove_memory_hit_object(); * void iterate_feel_touch(function); * } + * + * //.def("is_medkit", &CScriptGameObject::IsMedkit) + * //.def("is_eatable_item", &CScriptGameObject::IsEatableItem) + * //.def("is_antirad", &CScriptGameObject::IsAntirad) + * //.def("is_game_object", &CScriptGameObject::IsGameObject) + * //.def("is_car", &CScriptGameObject::IsCar) + * //.def("is_helicopter", &CScriptGameObject::IsHeli) + * //.def("is_holder", &CScriptGameObject::IsHolderCustom) + * //.def("is_explosive", &CScriptGameObject::IsExplosive) + * //.def("is_script_zone", &CScriptGameObject::IsScriptZone) + * //.def("is_projector", &CScriptGameObject::IsProjector) + * //.def("is_food_item", &CScriptGameObject::IsFoodItem) + * //.def("is_missile", &CScriptGameObject::IsMissile) + * //.def("is_physics_shell_holder", &CScriptGameObject::IsPhysicsShellHolder) + * //.def("is_grenade", &CScriptGameObject::IsGrenade) + * //.def("is_bottle_item", &CScriptGameObject::IsBottleItem) + * //.def("is_torch", &CScriptGameObject::IsTorch) */ } diff --git a/types/xr_ui/xr_ui_core.d.ts b/types/xr_ui/xr_ui_core.d.ts index b00e1484a..5ade2294a 100644 --- a/types/xr_ui/xr_ui_core.d.ts +++ b/types/xr_ui/xr_ui_core.d.ts @@ -11,66 +11,69 @@ declare module "xray16" { public ParseShTexInfo(path: string): void; - public Init3tButton(selector: string, window: CUIWindow | null): CUI3tButton; + public Init3tButton(selector: string, parent: CUIWindow | null): CUI3tButton; - public InitAnimStatic(selector: string, window: CUIWindow | null): CUIStatic; + public InitAnimStatic(selector: string, parent: CUIWindow | null): CUIStatic; - public InitCDkey(selector: string, window: CUIWindow | null): CUIEditBox; + public InitCDkey(selector: string, parent: CUIWindow | null): CUIEditBox; - public InitCheck(selector: string, window: CUIWindow | null): CUICheckButton; + public InitCheck(selector: string, parent: CUIWindow | null): CUICheckButton; - public InitComboBox(selector: string, window: CUIWindow | null): CUIComboBox; + public InitComboBox(selector: string, parent: CUIWindow | null): CUIComboBox; - public InitEditBox(selector: string, window: CUIWindow | null): CUIEditBox; + public InitEditBox(selector: string, parent: CUIWindow | null): CUIEditBox; - public InitFrame(selector: string, window: CUIWindow | null): CUIFrameWindow; + public InitFrame(selector: string, parent: CUIWindow | null): CUIFrameWindow; - public InitFrameLine(selector: string, window: CUIWindow | null): CUIFrameLineWnd; + public InitFrameLine(selector: string, parent: CUIWindow | null): CUIFrameLineWnd; - public InitKeyBinding(selector: string, window: CUIWindow | null): CUIWindow; + public InitKeyBinding(selector: string, parent: CUIWindow | null): CUIWindow; - public InitLabel(selector: string, window: CUIWindow | null): CUIStatic; + public InitLabel(selector: string, parent: CUIWindow | null): CUIStatic; - public InitList(selector: string, window: CUIWindow | null): CUIListWnd; + public InitList(selector: string, parent: CUIWindow | null): CUIListWnd; public InitListBox( selector: string, - window: CUIWindow | null + parent: CUIWindow | null ): CUIListBox; - public InitMMShniaga(selector: string, window: CUIWindow | null): CUIMMShniaga; + public InitMMShniaga(selector: string, parent: CUIWindow | null): CUIMMShniaga; - public InitMPPlayerName(selector: string, window: CUIWindow | null): CUIEditBox; + public InitMPPlayerName(selector: string, parent: CUIWindow | null): CUIEditBox; - public InitMapInfo(selector: string, window: CUIWindow | null): CUIMapInfo; + public InitMapInfo(selector: string, parent: CUIWindow | null): CUIMapInfo; - public InitMapList(selector: string, window: CUIWindow | null): CUIMapList; + public InitMapList(selector: string, parent: CUIWindow | null): CUIMapList; - public InitProgressBar(selector: string, window: CUIWindow | null): CUIProgressBar; + public InitProgressBar(selector: string, parent: CUIWindow | null): CUIProgressBar; - public InitScrollView(selector: string, window: CUIWindow | null): CUIScrollView; + public InitScrollView(selector: string, parent: CUIWindow | null): CUIScrollView; - public InitServerList(selector: string, window: CUIWindow | null): CServerList; + public InitServerList(selector: string, parent: CUIWindow | null): CServerList; - public InitSleepStatic(selector: string, window: CUIWindow | null): CUISleepStatic; + public InitSleepStatic(selector: string, parent: CUIWindow | null): CUISleepStatic; - public InitSpinFlt(selector: string, window: CUIWindow | null): CUISpinFlt; + public InitSpinFlt(selector: string, parent: CUIWindow | null): CUISpinFlt; - public InitSpinNum(selector: string, window: CUIWindow | null): CUISpinNum; + public InitSpinNum(selector: string, parent: CUIWindow | null): CUISpinNum; - public InitSpinText(selector: string, window: CUIWindow | null): CUISpinText; + public InitSpinText(selector: string, parent: CUIWindow | null): CUISpinText; - public InitStatic(selector: string, window: CUIWindow | null): CUIStatic; + public InitStatic(selector: string, parent: CUIWindow | null): CUIStatic; - public InitTab(selector: string, window: CUIWindow | null): CUITabControl; + public InitTab(selector: string, parent: CUIWindow | null): CUITabControl; - public InitTextWnd(selector: string, window: CUIWindow | null): CUITextWnd; + public InitTextWnd(selector: string, parent: CUIWindow | null): CUITextWnd; - public InitTrackBar(selector: string, window: CUIWindow | null): CUITrackBar; + public InitTrackBar(selector: string, parent: CUIWindow | null): CUITrackBar; - public InitVerList(selector: string, window: CUIWindow | null): CUIVersionList; + public InitVerList(selector: string, parent: CUIWindow | null): CUIVersionList; + + public InitHint(selector: string, parent: CUIWindow | null): UIHint; + + public InitWindow(selector: string, index: i32, parent: CUIWindow | null): void; - public InitWindow(selector: string, index: i32, window: CUIWindow | null): void; } /** From 481478655549654eae89fa0cc204a55e14d67a3c Mon Sep 17 00:00:00 2001 From: Neloreck Date: Fri, 20 Dec 2024 01:00:40 +0200 Subject: [PATCH 4/5] Correct implementation of holder interface by car class. --- types/xr_object/client/xr_level.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/xr_object/client/xr_level.d.ts b/types/xr_object/client/xr_level.d.ts index b3378723b..b0d2ea88b 100644 --- a/types/xr_object/client/xr_level.d.ts +++ b/types/xr_object/client/xr_level.d.ts @@ -67,6 +67,10 @@ declare module "xray16" { public constructor(); + public SetEnterLocked(is_enabled: boolean): void; + + public SetExitLocked(is_enabled: boolean): void; + public CanHit(): boolean; public CarExplode(): void; From 9af707e7441858e13ce7facf6bf0432125eb7426 Mon Sep 17 00:00:00 2001 From: Neloreck Date: Fri, 20 Dec 2024 01:03:48 +0200 Subject: [PATCH 5/5] Reformat code. --- types/xr_lib/xr_game.d.ts | 1 - types/xr_lib/xr_render.d.ts | 1 - types/xr_object/client/xr_physic.d.ts | 1 - .../xr_object/script/xr_script_interface.d.ts | 29 ++++---- types/xr_object/script/xr_script_object.d.ts | 68 +++++++++---------- types/xr_object/server/xr_server_object.d.ts | 4 +- types/xr_ui/xr_ui_core.d.ts | 1 - types/xr_ui/xr_ui_event.d.ts | 1 - 8 files changed, 50 insertions(+), 56 deletions(-) diff --git a/types/xr_lib/xr_game.d.ts b/types/xr_lib/xr_game.d.ts index 0a639c942..d362e5229 100644 --- a/types/xr_lib/xr_game.d.ts +++ b/types/xr_lib/xr_game.d.ts @@ -1,5 +1,4 @@ declare module "xray16" { - /** * Enumeration with possible game types: * - eGameIDNoGame = u32(0), diff --git a/types/xr_lib/xr_render.d.ts b/types/xr_lib/xr_render.d.ts index 5542dd4e4..45352e782 100644 --- a/types/xr_lib/xr_render.d.ts +++ b/types/xr_lib/xr_render.d.ts @@ -66,5 +66,4 @@ declare module "xray16" { * @returns whether renderer setting can be changed */ export function renderer_allow_override(this: void): boolean; - } diff --git a/types/xr_object/client/xr_physic.d.ts b/types/xr_object/client/xr_physic.d.ts index 84f64b317..05018a234 100644 --- a/types/xr_object/client/xr_physic.d.ts +++ b/types/xr_object/client/xr_physic.d.ts @@ -1,4 +1,3 @@ - declare module "xray16" { /** * @source C++ class physics_element diff --git a/types/xr_object/script/xr_script_interface.d.ts b/types/xr_object/script/xr_script_interface.d.ts index 6c3bfd00e..58c5e34d4 100644 --- a/types/xr_object/script/xr_script_interface.d.ts +++ b/types/xr_object/script/xr_script_interface.d.ts @@ -118,7 +118,6 @@ declare module "xray16" { public static readonly on_attach_vehicle: 54; public static readonly on_detach_vehicle: 55; public static readonly on_use_vehicle: 56; - } /** @@ -250,13 +249,13 @@ declare module "xray16" { type: TXR_callbacks["hit"], cb?: | (( - this: void, - object: game_object, - damage: number, - direction: vector, - who: game_object, - bone_id: number - ) => void) + this: void, + object: game_object, + damage: number, + direction: vector, + who: game_object, + bone_id: number + ) => void) | null, object?: Maybe ): void; @@ -268,13 +267,13 @@ declare module "xray16" { type: TXR_callbacks["sound"], cb?: | (( - this: void, - object: game_object, - source_id: number, - sound_type: TXR_snd_type, - position: vector, - sound_power: number - ) => void) + this: void, + object: game_object, + source_id: number, + sound_type: TXR_snd_type, + position: vector, + sound_power: number + ) => void) | null, object?: Maybe ): void; diff --git a/types/xr_object/script/xr_script_object.d.ts b/types/xr_object/script/xr_script_object.d.ts index d80381331..7affadf94 100644 --- a/types/xr_object/script/xr_script_object.d.ts +++ b/types/xr_object/script/xr_script_object.d.ts @@ -1353,38 +1353,38 @@ declare module "xray16" { } /* - * vector > not_yet_visible_objects(); - * vector> memory_sound_objects(); - * enum DetailPathManager::EDetailPathType detail_path_type(); - * enum ETaskState get_task_state(char const*); - * enum MonsterSpace::EBodyState body_state(); - * enum MonsterSpace::EBodyState target_body_state(); - * enum MonsterSpace::EMentalState mental_state(); - * enum MonsterSpace::EMentalState target_mental_state(); - * enum MonsterSpace::EMovementType movement_type(); - * enum MovementManager::EPathType path_type(); - * remove_danger(); - * remove_memory_sound_object(); - * remove_memory_visible_object(); - * remove_memory_hit_object(); - * void iterate_feel_touch(function); - * } - * - * //.def("is_medkit", &CScriptGameObject::IsMedkit) - * //.def("is_eatable_item", &CScriptGameObject::IsEatableItem) - * //.def("is_antirad", &CScriptGameObject::IsAntirad) - * //.def("is_game_object", &CScriptGameObject::IsGameObject) - * //.def("is_car", &CScriptGameObject::IsCar) - * //.def("is_helicopter", &CScriptGameObject::IsHeli) - * //.def("is_holder", &CScriptGameObject::IsHolderCustom) - * //.def("is_explosive", &CScriptGameObject::IsExplosive) - * //.def("is_script_zone", &CScriptGameObject::IsScriptZone) - * //.def("is_projector", &CScriptGameObject::IsProjector) - * //.def("is_food_item", &CScriptGameObject::IsFoodItem) - * //.def("is_missile", &CScriptGameObject::IsMissile) - * //.def("is_physics_shell_holder", &CScriptGameObject::IsPhysicsShellHolder) - * //.def("is_grenade", &CScriptGameObject::IsGrenade) - * //.def("is_bottle_item", &CScriptGameObject::IsBottleItem) - * //.def("is_torch", &CScriptGameObject::IsTorch) - */ + * vector > not_yet_visible_objects(); + * vector> memory_sound_objects(); + * enum DetailPathManager::EDetailPathType detail_path_type(); + * enum ETaskState get_task_state(char const*); + * enum MonsterSpace::EBodyState body_state(); + * enum MonsterSpace::EBodyState target_body_state(); + * enum MonsterSpace::EMentalState mental_state(); + * enum MonsterSpace::EMentalState target_mental_state(); + * enum MonsterSpace::EMovementType movement_type(); + * enum MovementManager::EPathType path_type(); + * remove_danger(); + * remove_memory_sound_object(); + * remove_memory_visible_object(); + * remove_memory_hit_object(); + * void iterate_feel_touch(function); + * } + * + * //.def("is_medkit", &CScriptGameObject::IsMedkit) + * //.def("is_eatable_item", &CScriptGameObject::IsEatableItem) + * //.def("is_antirad", &CScriptGameObject::IsAntirad) + * //.def("is_game_object", &CScriptGameObject::IsGameObject) + * //.def("is_car", &CScriptGameObject::IsCar) + * //.def("is_helicopter", &CScriptGameObject::IsHeli) + * //.def("is_holder", &CScriptGameObject::IsHolderCustom) + * //.def("is_explosive", &CScriptGameObject::IsExplosive) + * //.def("is_script_zone", &CScriptGameObject::IsScriptZone) + * //.def("is_projector", &CScriptGameObject::IsProjector) + * //.def("is_food_item", &CScriptGameObject::IsFoodItem) + * //.def("is_missile", &CScriptGameObject::IsMissile) + * //.def("is_physics_shell_holder", &CScriptGameObject::IsPhysicsShellHolder) + * //.def("is_grenade", &CScriptGameObject::IsGrenade) + * //.def("is_bottle_item", &CScriptGameObject::IsBottleItem) + * //.def("is_torch", &CScriptGameObject::IsTorch) + */ } diff --git a/types/xr_object/server/xr_server_object.d.ts b/types/xr_object/server/xr_server_object.d.ts index b4bc540c9..1dce5972a 100644 --- a/types/xr_object/server/xr_server_object.d.ts +++ b/types/xr_object/server/xr_server_object.d.ts @@ -76,9 +76,9 @@ declare module "xray16" { * @group xr_object_server */ export interface IXR_cse_alife_inventory_item { - has_upgrade(section: string): boolean; + has_upgrade(section: string): boolean; - add_upgrade(section: string): boolean; + add_upgrade(section: string): boolean; } /** diff --git a/types/xr_ui/xr_ui_core.d.ts b/types/xr_ui/xr_ui_core.d.ts index 5ade2294a..50f52a6d2 100644 --- a/types/xr_ui/xr_ui_core.d.ts +++ b/types/xr_ui/xr_ui_core.d.ts @@ -73,7 +73,6 @@ declare module "xray16" { public InitHint(selector: string, parent: CUIWindow | null): UIHint; public InitWindow(selector: string, index: i32, parent: CUIWindow | null): void; - } /** diff --git a/types/xr_ui/xr_ui_event.d.ts b/types/xr_ui/xr_ui_event.d.ts index 071a3eaac..1829e1e2a 100644 --- a/types/xr_ui/xr_ui_event.d.ts +++ b/types/xr_ui/xr_ui_event.d.ts @@ -378,5 +378,4 @@ declare module "xray16" { * @group xr_ui_event */ export function dik_to_bind(this: void, keycode: i32): i32; - }