xray16 1.5.4 → 1.6.0

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.
@@ -1,3 +1,5 @@
1
+ import type { Nillable, Nullable } from "../../internal";
2
+
1
3
  declare module "xray16" {
2
4
  /**
3
5
  * Client object base presentation as script object.
@@ -22,14 +24,17 @@ declare module "xray16" {
22
24
  * Engine enum value for `game_object.game_path`.
23
25
  */
24
26
  public static readonly game_path: 0;
27
+
25
28
  /**
26
29
  * Engine enum value for `game_object.level_path`.
27
30
  */
28
31
  public static readonly level_path: 1;
32
+
29
33
  /**
30
34
  * Engine enum value for `game_object.patrol_path`.
31
35
  */
32
36
  public static readonly patrol_path: 2;
37
+
33
38
  /**
34
39
  * Engine enum value for `game_object.no_path`.
35
40
  */
@@ -39,10 +44,12 @@ declare module "xray16" {
39
44
  * Engine enum value for `game_object.friend`.
40
45
  */
41
46
  public static readonly friend: 0;
47
+
42
48
  /**
43
49
  * Engine enum value for `game_object.neutral`.
44
50
  */
45
51
  public static readonly neutral: 1;
52
+
46
53
  /**
47
54
  * Engine enum value for `game_object.enemy`.
48
55
  */
@@ -52,6 +59,7 @@ declare module "xray16" {
52
59
  * Engine enum value for `game_object.alifeMovementTypeMask`.
53
60
  */
54
61
  public static readonly alifeMovementTypeMask: 0;
62
+
55
63
  /**
56
64
  * Engine enum value for `game_object.alifeMovementTypeRandom`.
57
65
  */
@@ -61,10 +69,12 @@ declare module "xray16" {
61
69
  * Engine enum value for `game_object.dialog_pda_msg`.
62
70
  */
63
71
  public static readonly dialog_pda_msg: 0;
72
+
64
73
  /**
65
74
  * Engine enum value for `game_object.info_pda_msg`.
66
75
  */
67
76
  public static readonly info_pda_msg: 1;
77
+
68
78
  /**
69
79
  * Engine enum value for `game_object.no_pda_msg`.
70
80
  */
@@ -74,14 +84,17 @@ declare module "xray16" {
74
84
  * Engine enum value for `game_object.relation_kill`.
75
85
  */
76
86
  public static readonly relation_kill: 0;
87
+
77
88
  /**
78
89
  * Engine enum value for `game_object.relation_attack`.
79
90
  */
80
91
  public static readonly relation_attack: 1;
92
+
81
93
  /**
82
94
  * Engine enum value for `game_object.relation_fight_help_human`.
83
95
  */
84
96
  public static readonly relation_fight_help_human: 2;
97
+
85
98
  /**
86
99
  * Engine enum value for `game_object.relation_fight_help_monster`.
87
100
  */
@@ -91,26 +104,32 @@ declare module "xray16" {
91
104
  * Engine enum value for `game_object.movement`.
92
105
  */
93
106
  public static readonly movement: 0;
107
+
94
108
  /**
95
109
  * Engine enum value for `game_object.watch`.
96
110
  */
97
111
  public static readonly watch: 1;
112
+
98
113
  /**
99
114
  * Engine enum value for `game_object.animation`.
100
115
  */
101
116
  public static readonly animation: 2;
117
+
102
118
  /**
103
119
  * Engine enum value for `game_object.sound`.
104
120
  */
105
121
  public static readonly sound: 3;
122
+
106
123
  /**
107
124
  * Engine enum value for `game_object.particle`.
108
125
  */
109
126
  public static readonly particle: 4;
127
+
110
128
  /**
111
129
  * Engine enum value for `game_object.object`.
112
130
  */
113
131
  public static readonly object: 5;
132
+
114
133
  /**
115
134
  * Engine enum value for `game_object.action_type_count`.
116
135
  */
@@ -199,7 +218,7 @@ declare module "xray16" {
199
218
  * @param value - Inventory index or item name.
200
219
  * @returns Matching item, or `null` when it does not exist.
201
220
  */
202
- public object(value: i32 | string): game_object | null;
221
+ public object(value: i32 | string): Nullable<game_object>;
203
222
 
204
223
  /**
205
224
  * Get engine class id.
@@ -251,7 +270,7 @@ declare module "xray16" {
251
270
  *
252
271
  * @returns Current action, or `null` when no action is active.
253
272
  */
254
- public action(): entity_action | null;
273
+ public action(): Nullable<entity_action>;
255
274
 
256
275
  /**
257
276
  * Get queued action count.
@@ -273,7 +292,7 @@ declare module "xray16" {
273
292
  *
274
293
  * @returns Active detector, or `null`.
275
294
  */
276
- public active_detector(): game_object | null;
295
+ public active_detector(): Nullable<game_object>;
277
296
 
278
297
  /**
279
298
  * Get active inventory item.
@@ -284,7 +303,7 @@ declare module "xray16" {
284
303
  *
285
304
  * @returns Active item, or `null`.
286
305
  */
287
- public active_item(): game_object | null;
306
+ public active_item(): Nullable<game_object>;
288
307
 
289
308
  /**
290
309
  * @returns Active item slot of game object.
@@ -344,7 +363,7 @@ declare module "xray16" {
344
363
  *
345
364
  * @returns Best item, or `null`.
346
365
  */
347
- public best_item(): game_object | null;
366
+ public best_item(): Nullable<game_object>;
348
367
 
349
368
  /**
350
369
  * Get best available weapon for this object.
@@ -355,7 +374,7 @@ declare module "xray16" {
355
374
  *
356
375
  * @returns Best weapon, or `null`.
357
376
  */
358
- public best_weapon(): game_object | null;
377
+ public best_weapon(): Nullable<game_object>;
359
378
 
360
379
  /**
361
380
  * Attach a Lua binder to this object.
@@ -591,7 +610,7 @@ declare module "xray16" {
591
610
  *
592
611
  * @returns Cover name, or `null`.
593
612
  */
594
- public get_dest_smart_cover_name(): string | null;
613
+ public get_dest_smart_cover_name(): Nullable<string>;
595
614
 
596
615
  /**
597
616
  * Get latest monster hit information.
@@ -727,7 +746,7 @@ declare module "xray16" {
727
746
  * @param weapon - Weapon to check.
728
747
  * @returns Whether weapon is being strapped.
729
748
  */
730
- public is_weapon_going_to_be_strapped(weapon: game_object | null): boolean;
749
+ public is_weapon_going_to_be_strapped(weapon: Nillable<game_object>): boolean;
731
750
 
732
751
  /**
733
752
  * Iterate items inside an inventory box.
@@ -994,7 +1013,7 @@ declare module "xray16" {
994
1013
  * @param min_queue_size - Optional minimum queue size.
995
1014
  * @param max_queue_size - Optional maximum queue size.
996
1015
  */
997
- public set_item(action_id: number, object: game_object | null, min_queue_size?: u32, max_queue_size?: u32): void;
1016
+ public set_item(action_id: number, object: Nillable<game_object>, min_queue_size?: u32, max_queue_size?: u32): void;
998
1017
 
999
1018
  /**
1000
1019
  * Set mental animation state.
@@ -1322,7 +1341,7 @@ declare module "xray16" {
1322
1341
  *
1323
1342
  * @returns Danger object, or `null`.
1324
1343
  */
1325
- public best_danger(): danger_object | null;
1344
+ public best_danger(): Nullable<danger_object>;
1326
1345
 
1327
1346
  /**
1328
1347
  * @remarks
@@ -1638,7 +1657,7 @@ declare module "xray16" {
1638
1657
  *
1639
1658
  * @returns Currently equipped outfit, or `null` when none is equipped.
1640
1659
  */
1641
- public get_current_outfit(): game_object | null;
1660
+ public get_current_outfit(): Nullable<game_object>;
1642
1661
 
1643
1662
  /**
1644
1663
  * @remarks
@@ -1938,7 +1957,7 @@ declare module "xray16" {
1938
1957
  *
1939
1958
  * @returns Current patrol path name, or `null` when no patrol path is active.
1940
1959
  */
1941
- public patrol(): string | null;
1960
+ public patrol(): Nullable<string>;
1942
1961
 
1943
1962
  /**
1944
1963
  * Mark the current patrol path as needing recalculation.
@@ -2353,7 +2372,7 @@ declare module "xray16" {
2353
2372
  /**
2354
2373
  * @returns Spawn ini attached to this object, or `null`.
2355
2374
  */
2356
- public spawn_ini(): ini_file | null;
2375
+ public spawn_ini(): Nullable<ini_file>;
2357
2376
 
2358
2377
  /**
2359
2378
  * @remarks
@@ -2484,7 +2503,7 @@ declare module "xray16" {
2484
2503
  * @param target - Point to look at, or `null` to clear the explicit point.
2485
2504
  * @param look_over_delay - Delay before looking over.
2486
2505
  */
2487
- public set_sight(type: TXR_SightType, target: vector | null, look_over_delay: u32): void;
2506
+ public set_sight(type: TXR_SightType, target: Nillable<vector>, look_over_delay: u32): void;
2488
2507
 
2489
2508
  /**
2490
2509
  * Set the NPC sight mode toward a point and optionally fire at it.
@@ -2963,12 +2982,12 @@ declare module "xray16" {
2963
2982
  *
2964
2983
  * @returns Corpse selected by this monster, or `null`.
2965
2984
  */
2966
- public get_corpse(): game_object | null;
2985
+ public get_corpse(): Nullable<game_object>;
2967
2986
 
2968
2987
  /**
2969
2988
  * @returns Current holder used by the actor, or `null`.
2970
2989
  */
2971
- public get_current_holder(): holder | null;
2990
+ public get_current_holder(): Nullable<holder>;
2972
2991
 
2973
2992
  /**
2974
2993
  * @remarks
@@ -2977,7 +2996,7 @@ declare module "xray16" {
2977
2996
  *
2978
2997
  * @returns Current enemy object, or `null`.
2979
2998
  */
2980
- public get_enemy(): game_object | null;
2999
+ public get_enemy(): Nullable<game_object>;
2981
3000
 
2982
3001
  /**
2983
3002
  * @remarks
@@ -2995,7 +3014,7 @@ declare module "xray16" {
2995
3014
  *
2996
3015
  * @returns Physics shell for this object, or `null`.
2997
3016
  */
2998
- public get_physics_shell(): physics_shell | null;
3017
+ public get_physics_shell(): Nullable<physics_shell>;
2999
3018
 
3000
3019
  /**
3001
3020
  * Get current start dialog id.
@@ -3017,7 +3036,7 @@ declare module "xray16" {
3017
3036
  * @param only_in_process - Whether to return only active tasks.
3018
3037
  * @returns Task object, or `null`.
3019
3038
  */
3020
- public get_task(task_id: string, only_in_process: boolean): CGameTask | null;
3039
+ public get_task(task_id: string, only_in_process: boolean): Nullable<CGameTask>;
3021
3040
 
3022
3041
  /**
3023
3042
  * Get task state by id.
@@ -3262,7 +3281,7 @@ declare module "xray16" {
3262
3281
  * @param slot - Slot id.
3263
3282
  * @returns Item in slot, or `null`.
3264
3283
  */
3265
- public item_in_slot(slot: u32): game_object | null;
3284
+ public item_in_slot(slot: u32): Nullable<game_object>;
3266
3285
 
3267
3286
  /**
3268
3287
  * Get item on belt by slot.
@@ -3276,7 +3295,7 @@ declare module "xray16" {
3276
3295
  * @param slot - Belt slot id.
3277
3296
  * @returns Item on belt, or `null`.
3278
3297
  */
3279
- public item_on_belt(slot: u32): game_object | null;
3298
+ public item_on_belt(slot: u32): Nullable<game_object>;
3280
3299
 
3281
3300
  /**
3282
3301
  * Force this monster to jump toward a point.
@@ -3514,7 +3533,7 @@ declare module "xray16" {
3514
3533
  * @param mid_radius - Middle home radius.
3515
3534
  */
3516
3535
  public set_home(
3517
- name: string | null,
3536
+ name: Nillable<string>,
3518
3537
  min_radius: f32,
3519
3538
  max_radius?: f32,
3520
3539
  is_aggressive?: boolean,
@@ -3531,7 +3550,7 @@ declare module "xray16" {
3531
3550
  * @param mid_radius - Middle home radius.
3532
3551
  */
3533
3552
  public set_home(
3534
- lvid: u32 | null,
3553
+ lvid: Nillable<u32>,
3535
3554
  min_radius: f32,
3536
3555
  max_radius?: f32,
3537
3556
  is_aggressive?: boolean,
@@ -3906,7 +3925,7 @@ declare module "xray16" {
3906
3925
  icon_texture: string,
3907
3926
  delay: i32,
3908
3927
  show_time: i32,
3909
- type?: Maybe<i32>
3928
+ type?: Nillable<i32>
3910
3929
  ): void;
3911
3930
 
3912
3931
  /**
@@ -3980,7 +3999,7 @@ declare module "xray16" {
3980
3999
  *
3981
4000
  * @returns Enemy object, or `null`.
3982
4001
  */
3983
- public best_enemy(): game_object | null;
4002
+ public best_enemy(): Nullable<game_object>;
3984
4003
 
3985
4004
  /**
3986
4005
  * Get object center position.
@@ -4259,7 +4278,7 @@ declare module "xray16" {
4259
4278
  * @param index - Action index.
4260
4279
  * @returns Action object, or `null`.
4261
4280
  */
4262
- public action_by_index(index: u32): entity_action | null;
4281
+ public action_by_index(index: u32): Nullable<entity_action>;
4263
4282
 
4264
4283
  /**
4265
4284
  * @returns Whether game object is alive.
@@ -5349,7 +5368,7 @@ declare module "xray16" {
5349
5368
  *
5350
5369
  * @returns Vehicle currently attached to the actor, or `null`.
5351
5370
  */
5352
- public get_attached_vehicle(): game_object | null;
5371
+ public get_attached_vehicle(): Nullable<game_object>;
5353
5372
 
5354
5373
  /**
5355
5374
  * Get actor belt slot count.
@@ -5680,40 +5699,4 @@ declare module "xray16" {
5680
5699
  */
5681
5700
  public is_inventory_box(): boolean;
5682
5701
  }
5683
-
5684
- /*
5685
- * Vector<MemorySpace::CNotYetVisibleObject,xalloc<MemorySpace::CNotYetVisibleObject> > not_yet_visible_objects();
5686
- * vector<MemorySpace::CSoundObject,xalloc<MemorySpace::CSoundObject>> memory_sound_objects();
5687
- * enum DetailPathManager::EDetailPathType detail_path_type();
5688
- * enum ETaskState get_task_state(char const*);
5689
- * enum MonsterSpace::EBodyState body_state();
5690
- * enum MonsterSpace::EBodyState target_body_state();
5691
- * enum MonsterSpace::EMentalState mental_state();
5692
- * enum MonsterSpace::EMentalState target_mental_state();
5693
- * enum MonsterSpace::EMovementType movement_type();
5694
- * enum MovementManager::EPathType path_type();
5695
- * remove_danger();
5696
- * remove_memory_sound_object();
5697
- * remove_memory_visible_object();
5698
- * remove_memory_hit_object();
5699
- * void iterate_feel_touch(function<void>);
5700
- * }
5701
- *
5702
- * //.def("is_medkit", &CScriptGameObject::IsMedkit)
5703
- * //.def("is_eatable_item", &CScriptGameObject::IsEatableItem)
5704
- * //.def("is_antirad", &CScriptGameObject::IsAntirad)
5705
- * //.def("is_game_object", &CScriptGameObject::IsGameObject)
5706
- * //.def("is_car", &CScriptGameObject::IsCar)
5707
- * //.def("is_helicopter", &CScriptGameObject::IsHeli)
5708
- * //.def("is_holder", &CScriptGameObject::IsHolderCustom)
5709
- * //.def("is_explosive", &CScriptGameObject::IsExplosive)
5710
- * //.def("is_script_zone", &CScriptGameObject::IsScriptZone)
5711
- * //.def("is_projector", &CScriptGameObject::IsProjector)
5712
- * //.def("is_food_item", &CScriptGameObject::IsFoodItem)
5713
- * //.def("is_missile", &CScriptGameObject::IsMissile)
5714
- * //.def("is_physics_shell_holder", &CScriptGameObject::IsPhysicsShellHolder)
5715
- * //.def("is_grenade", &CScriptGameObject::IsGrenade)
5716
- * //.def("is_bottle_item", &CScriptGameObject::IsBottleItem)
5717
- * //.def("is_torch", &CScriptGameObject::IsTorch)
5718
- */
5719
5702
  }
@@ -1,3 +1,5 @@
1
+ import type { Nullable } from "../../internal";
2
+
1
3
  declare module "xray16" {
2
4
  /**
3
5
  * @source C++ class cse_motion
@@ -247,7 +249,7 @@ declare module "xray16" {
247
249
  /**
248
250
  * @returns Spawn ini attached to this object, if any.
249
251
  */
250
- public spawn_ini(): ini_file | null;
252
+ public spawn_ini(): Nullable<ini_file>;
251
253
 
252
254
  /**
253
255
  * @returns Spawn section name.
@@ -1244,7 +1246,7 @@ declare module "xray16" {
1244
1246
  * @param monster - Monster server object.
1245
1247
  * @returns Smart terrain task, or `null` when none is assigned.
1246
1248
  */
1247
- public task(monster: cse_alife_monster_abstract): CALifeSmartTerrainTask | null;
1249
+ public task(monster: cse_alife_monster_abstract): Nullable<CALifeSmartTerrainTask>;
1248
1250
 
1249
1251
  /**
1250
1252
  * Check whether this smart zone is enabled for a monster.
@@ -1346,7 +1348,7 @@ declare module "xray16" {
1346
1348
  /**
1347
1349
  * @returns Smart-cover description table id.
1348
1350
  */
1349
- public description<T extends string = string>(): T | null;
1351
+ public description<T extends string = string>(): Nullable<T>;
1350
1352
 
1351
1353
  /**
1352
1354
  * Replace the table of available loopholes.
@@ -1,3 +1,5 @@
1
+ import type { Nillable } from "../internal";
2
+
1
3
  declare module "xray16" {
2
4
  /**
3
5
  * XML UI initialization helper.
@@ -47,7 +49,7 @@ declare module "xray16" {
47
49
  * @param parent - Optional parent window.
48
50
  * @returns Created button.
49
51
  */
50
- public InitButton(selector: string, parent: CUIWindow | null): CUIButton;
52
+ public InitButton(selector: string, parent: Nillable<CUIWindow>): CUIButton;
51
53
 
52
54
  /**
53
55
  * Create and initialize a three-state button from XML.
@@ -59,7 +61,7 @@ declare module "xray16" {
59
61
  * @param parent - Optional parent window.
60
62
  * @returns Created button.
61
63
  */
62
- public Init3tButton(selector: string, parent: CUIWindow | null): CUI3tButton;
64
+ public Init3tButton(selector: string, parent: Nillable<CUIWindow>): CUI3tButton;
63
65
 
64
66
  /**
65
67
  * Create and initialize an animated static from XML.
@@ -71,7 +73,7 @@ declare module "xray16" {
71
73
  * @param parent - Optional parent window.
72
74
  * @returns Created static control.
73
75
  */
74
- public InitAnimStatic(selector: string, parent: CUIWindow | null): CUIStatic;
76
+ public InitAnimStatic(selector: string, parent: Nillable<CUIWindow>): CUIStatic;
75
77
 
76
78
  /**
77
79
  * Create and initialize a CD key edit box from XML.
@@ -83,7 +85,7 @@ declare module "xray16" {
83
85
  * @param parent - Optional parent window.
84
86
  * @returns Created edit box.
85
87
  */
86
- public InitCDkey(selector: string, parent: CUIWindow | null): CUIEditBox;
88
+ public InitCDkey(selector: string, parent: Nillable<CUIWindow>): CUIEditBox;
87
89
 
88
90
  /**
89
91
  * Create and initialize a check button from XML.
@@ -92,7 +94,7 @@ declare module "xray16" {
92
94
  * @param parent - Optional parent window.
93
95
  * @returns Created check button.
94
96
  */
95
- public InitCheck(selector: string, parent: CUIWindow | null): CUICheckButton;
97
+ public InitCheck(selector: string, parent: Nillable<CUIWindow>): CUICheckButton;
96
98
 
97
99
  /**
98
100
  * Create and initialize a combo box from XML.
@@ -101,7 +103,7 @@ declare module "xray16" {
101
103
  * @param parent - Optional parent window.
102
104
  * @returns Created combo box.
103
105
  */
104
- public InitComboBox(selector: string, parent: CUIWindow | null): CUIComboBox;
106
+ public InitComboBox(selector: string, parent: Nillable<CUIWindow>): CUIComboBox;
105
107
 
106
108
  /**
107
109
  * Create and initialize an edit box from XML.
@@ -110,7 +112,7 @@ declare module "xray16" {
110
112
  * @param parent - Optional parent window.
111
113
  * @returns Created edit box.
112
114
  */
113
- public InitEditBox(selector: string, parent: CUIWindow | null): CUIEditBox;
115
+ public InitEditBox(selector: string, parent: Nillable<CUIWindow>): CUIEditBox;
114
116
 
115
117
  /**
116
118
  * Create and initialize a frame window from XML.
@@ -119,7 +121,7 @@ declare module "xray16" {
119
121
  * @param parent - Optional parent window.
120
122
  * @returns Created frame window.
121
123
  */
122
- public InitFrame(selector: string, parent: CUIWindow | null): CUIFrameWindow;
124
+ public InitFrame(selector: string, parent: Nillable<CUIWindow>): CUIFrameWindow;
123
125
 
124
126
  /**
125
127
  * Create and initialize a frame line from XML.
@@ -128,7 +130,7 @@ declare module "xray16" {
128
130
  * @param parent - Optional parent window.
129
131
  * @returns Created frame line.
130
132
  */
131
- public InitFrameLine(selector: string, parent: CUIWindow | null): CUIFrameLineWnd;
133
+ public InitFrameLine(selector: string, parent: Nillable<CUIWindow>): CUIFrameLineWnd;
132
134
 
133
135
  /**
134
136
  * Create and initialize a key binding control from XML.
@@ -137,7 +139,7 @@ declare module "xray16" {
137
139
  * @param parent - Optional parent window.
138
140
  * @returns Created key binding window.
139
141
  */
140
- public InitKeyBinding(selector: string, parent: CUIWindow | null): CUIWindow;
142
+ public InitKeyBinding(selector: string, parent: Nillable<CUIWindow>): CUIWindow;
141
143
 
142
144
  /**
143
145
  * Create and initialize a label from XML.
@@ -146,7 +148,7 @@ declare module "xray16" {
146
148
  * @param parent - Optional parent window.
147
149
  * @returns Created label static.
148
150
  */
149
- public InitLabel(selector: string, parent: CUIWindow | null): CUIStatic;
151
+ public InitLabel(selector: string, parent: Nillable<CUIWindow>): CUIStatic;
150
152
 
151
153
  /**
152
154
  * Create and initialize a list window from XML.
@@ -158,7 +160,7 @@ declare module "xray16" {
158
160
  * @param parent - Optional parent window.
159
161
  * @returns Created list window.
160
162
  */
161
- public InitList(selector: string, parent: CUIWindow | null): CUIListWnd;
163
+ public InitList(selector: string, parent: Nillable<CUIWindow>): CUIListWnd;
162
164
 
163
165
  /**
164
166
  * Create and initialize a list box from XML.
@@ -172,7 +174,7 @@ declare module "xray16" {
172
174
  */
173
175
  public InitListBox<T extends CUIListBoxItem = CUIListBoxItem>(
174
176
  selector: string,
175
- parent: CUIWindow | null
177
+ parent: Nillable<CUIWindow>
176
178
  ): CUIListBox<T>;
177
179
 
178
180
  /**
@@ -182,7 +184,7 @@ declare module "xray16" {
182
184
  * @param parent - Optional parent window.
183
185
  * @returns Created main-menu shniaga control.
184
186
  */
185
- public InitMMShniaga(selector: string, parent: CUIWindow | null): CUIMMShniaga;
187
+ public InitMMShniaga(selector: string, parent: Nillable<CUIWindow>): CUIMMShniaga;
186
188
 
187
189
  /**
188
190
  * Create and initialize a multiplayer player-name edit box from XML.
@@ -191,7 +193,7 @@ declare module "xray16" {
191
193
  * @param parent - Optional parent window.
192
194
  * @returns Created edit box.
193
195
  */
194
- public InitMPPlayerName(selector: string, parent: CUIWindow | null): CUIEditBox;
196
+ public InitMPPlayerName(selector: string, parent: Nillable<CUIWindow>): CUIEditBox;
195
197
 
196
198
  /**
197
199
  * Create and initialize a map info control from XML.
@@ -203,7 +205,7 @@ declare module "xray16" {
203
205
  * @param parent - Optional parent window.
204
206
  * @returns Created map info control.
205
207
  */
206
- public InitMapInfo(selector: string, parent: CUIWindow | null): CUIMapInfo;
208
+ public InitMapInfo(selector: string, parent: Nillable<CUIWindow>): CUIMapInfo;
207
209
 
208
210
  /**
209
211
  * Create and initialize a map list control from XML.
@@ -212,7 +214,7 @@ declare module "xray16" {
212
214
  * @param parent - Optional parent window.
213
215
  * @returns Created map list control.
214
216
  */
215
- public InitMapList(selector: string, parent: CUIWindow | null): CUIMapList;
217
+ public InitMapList(selector: string, parent: Nillable<CUIWindow>): CUIMapList;
216
218
 
217
219
  /**
218
220
  * Create and initialize a progress bar from XML.
@@ -221,7 +223,7 @@ declare module "xray16" {
221
223
  * @param parent - Optional parent window.
222
224
  * @returns Created progress bar.
223
225
  */
224
- public InitProgressBar(selector: string, parent: CUIWindow | null): CUIProgressBar;
226
+ public InitProgressBar(selector: string, parent: Nillable<CUIWindow>): CUIProgressBar;
225
227
 
226
228
  /**
227
229
  * Create and initialize a scroll view from XML.
@@ -233,7 +235,7 @@ declare module "xray16" {
233
235
  * @param parent - Optional parent window.
234
236
  * @returns Created scroll view.
235
237
  */
236
- public InitScrollView(selector: string, parent: CUIWindow | null): CUIScrollView;
238
+ public InitScrollView(selector: string, parent: Nillable<CUIWindow>): CUIScrollView;
237
239
 
238
240
  /**
239
241
  * Create and initialize a server list from XML.
@@ -242,7 +244,7 @@ declare module "xray16" {
242
244
  * @param parent - Optional parent window.
243
245
  * @returns Created server list.
244
246
  */
245
- public InitServerList(selector: string, parent: CUIWindow | null): CServerList;
247
+ public InitServerList(selector: string, parent: Nillable<CUIWindow>): CServerList;
246
248
 
247
249
  /**
248
250
  * Create and initialize a sleep static from XML.
@@ -251,7 +253,7 @@ declare module "xray16" {
251
253
  * @param parent - Optional parent window.
252
254
  * @returns Created sleep static.
253
255
  */
254
- public InitSleepStatic(selector: string, parent: CUIWindow | null): CUISleepStatic;
256
+ public InitSleepStatic(selector: string, parent: Nillable<CUIWindow>): CUISleepStatic;
255
257
 
256
258
  /**
257
259
  * Create and initialize a float spin control from XML.
@@ -260,7 +262,7 @@ declare module "xray16" {
260
262
  * @param parent - Optional parent window.
261
263
  * @returns Created spin control.
262
264
  */
263
- public InitSpinFlt(selector: string, parent: CUIWindow | null): CUISpinFlt;
265
+ public InitSpinFlt(selector: string, parent: Nillable<CUIWindow>): CUISpinFlt;
264
266
 
265
267
  /**
266
268
  * Create and initialize an integer spin control from XML.
@@ -269,7 +271,7 @@ declare module "xray16" {
269
271
  * @param parent - Optional parent window.
270
272
  * @returns Created spin control.
271
273
  */
272
- public InitSpinNum(selector: string, parent: CUIWindow | null): CUISpinNum;
274
+ public InitSpinNum(selector: string, parent: Nillable<CUIWindow>): CUISpinNum;
273
275
 
274
276
  /**
275
277
  * Create and initialize a text spin control from XML.
@@ -278,7 +280,7 @@ declare module "xray16" {
278
280
  * @param parent - Optional parent window.
279
281
  * @returns Created spin control.
280
282
  */
281
- public InitSpinText(selector: string, parent: CUIWindow | null): CUISpinText;
283
+ public InitSpinText(selector: string, parent: Nillable<CUIWindow>): CUISpinText;
282
284
 
283
285
  /**
284
286
  * Create and initialize a static control from XML.
@@ -290,7 +292,7 @@ declare module "xray16" {
290
292
  * @param parent - Optional parent window.
291
293
  * @returns Created static control.
292
294
  */
293
- public InitStatic(selector: string, parent: CUIWindow | null): CUIStatic;
295
+ public InitStatic(selector: string, parent: Nillable<CUIWindow>): CUIStatic;
294
296
 
295
297
  /**
296
298
  * Create and initialize a tab control from XML.
@@ -299,7 +301,7 @@ declare module "xray16" {
299
301
  * @param parent - Optional parent window.
300
302
  * @returns Created tab control.
301
303
  */
302
- public InitTab(selector: string, parent: CUIWindow | null): CUITabControl;
304
+ public InitTab(selector: string, parent: Nillable<CUIWindow>): CUITabControl;
303
305
 
304
306
  /**
305
307
  * Create and initialize a text window from XML.
@@ -308,7 +310,7 @@ declare module "xray16" {
308
310
  * @param parent - Optional parent window.
309
311
  * @returns Created text window.
310
312
  */
311
- public InitTextWnd(selector: string, parent: CUIWindow | null): CUITextWnd;
313
+ public InitTextWnd(selector: string, parent: Nillable<CUIWindow>): CUITextWnd;
312
314
 
313
315
  /**
314
316
  * Create and initialize a track bar from XML.
@@ -317,7 +319,7 @@ declare module "xray16" {
317
319
  * @param parent - Optional parent window.
318
320
  * @returns Created track bar.
319
321
  */
320
- public InitTrackBar(selector: string, parent: CUIWindow | null): CUITrackBar;
322
+ public InitTrackBar(selector: string, parent: Nillable<CUIWindow>): CUITrackBar;
321
323
 
322
324
  /**
323
325
  * Create and initialize a version list from XML.
@@ -326,7 +328,7 @@ declare module "xray16" {
326
328
  * @param parent - Optional parent window.
327
329
  * @returns Created version list.
328
330
  */
329
- public InitVerList(selector: string, parent: CUIWindow | null): CUIVersionList;
331
+ public InitVerList(selector: string, parent: Nillable<CUIWindow>): CUIVersionList;
330
332
 
331
333
  /**
332
334
  * Create and initialize a hint window from XML.
@@ -335,7 +337,7 @@ declare module "xray16" {
335
337
  * @param parent - Optional parent window.
336
338
  * @returns Created hint window.
337
339
  */
338
- public InitHint(selector: string, parent: CUIWindow | null): UIHint;
340
+ public InitHint(selector: string, parent: Nillable<CUIWindow>): UIHint;
339
341
 
340
342
  /**
341
343
  * Initialize a window already created by script.
@@ -348,7 +350,7 @@ declare module "xray16" {
348
350
  * @param index - XML node index.
349
351
  * @param parent - Window to initialize.
350
352
  */
351
- public InitWindow(selector: string, index: i32, parent: CUIWindow | null): void;
353
+ public InitWindow(selector: string, index: i32, parent: Nillable<CUIWindow>): void;
352
354
 
353
355
  /**
354
356
  * Initialize a group of auto-created static controls under an existing window.