@gwigz/slua-types 1.2.0 → 1.3.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.
- package/index.d.ts +542 -18
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -6080,6 +6080,9 @@ declare const XP_ERROR_UNKNOWN_ERROR: number
|
|
|
6080
6080
|
declare const ZERO_ROTATION: Quaternion
|
|
6081
6081
|
declare const ZERO_VECTOR: Vector
|
|
6082
6082
|
|
|
6083
|
+
/** Branded error type that surfaces a human-readable message in diagnostics. */
|
|
6084
|
+
type TypedListError<Msg extends string> = { [K in `__error: ${Msg}`]: never }
|
|
6085
|
+
|
|
6083
6086
|
/** Maps each constant to the tuple of arguments that follow it. */
|
|
6084
6087
|
interface PrimParamMap {
|
|
6085
6088
|
[PRIM_NAME]: [name: string]
|
|
@@ -6193,6 +6196,52 @@ interface PrimParamMap {
|
|
|
6193
6196
|
[PRIM_HEALTH]: [health: number]
|
|
6194
6197
|
}
|
|
6195
6198
|
|
|
6199
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6200
|
+
interface PrimParamNameMap {
|
|
6201
|
+
27: "PRIM_NAME"
|
|
6202
|
+
28: "PRIM_DESC"
|
|
6203
|
+
35: "PRIM_SLICE"
|
|
6204
|
+
30: "PRIM_PHYSICS_SHAPE_TYPE"
|
|
6205
|
+
2: "PRIM_MATERIAL"
|
|
6206
|
+
3: "PRIM_PHYSICS"
|
|
6207
|
+
4: "PRIM_TEMP_ON_REZ"
|
|
6208
|
+
5: "PRIM_PHANTOM"
|
|
6209
|
+
6: "PRIM_POSITION"
|
|
6210
|
+
33: "PRIM_POS_LOCAL"
|
|
6211
|
+
8: "PRIM_ROTATION"
|
|
6212
|
+
29: "PRIM_ROT_LOCAL"
|
|
6213
|
+
7: "PRIM_SIZE"
|
|
6214
|
+
17: "PRIM_TEXTURE"
|
|
6215
|
+
49: "PRIM_RENDER_MATERIAL"
|
|
6216
|
+
26: "PRIM_TEXT"
|
|
6217
|
+
18: "PRIM_COLOR"
|
|
6218
|
+
19: "PRIM_BUMP_SHINY"
|
|
6219
|
+
23: "PRIM_POINT_LIGHT"
|
|
6220
|
+
44: "PRIM_REFLECTION_PROBE"
|
|
6221
|
+
20: "PRIM_FULLBRIGHT"
|
|
6222
|
+
21: "PRIM_FLEXIBLE"
|
|
6223
|
+
22: "PRIM_TEXGEN"
|
|
6224
|
+
25: "PRIM_GLOW"
|
|
6225
|
+
32: "PRIM_OMEGA"
|
|
6226
|
+
37: "PRIM_NORMAL"
|
|
6227
|
+
36: "PRIM_SPECULAR"
|
|
6228
|
+
38: "PRIM_ALPHA_MODE"
|
|
6229
|
+
34: "PRIM_LINK_TARGET"
|
|
6230
|
+
24: "PRIM_CAST_SHADOWS"
|
|
6231
|
+
39: "PRIM_ALLOW_UNSIT"
|
|
6232
|
+
40: "PRIM_SCRIPTED_SIT_ONLY"
|
|
6233
|
+
41: "PRIM_SIT_TARGET"
|
|
6234
|
+
42: "PRIM_PROJECTOR"
|
|
6235
|
+
43: "PRIM_CLICK_ACTION"
|
|
6236
|
+
48: "PRIM_GLTF_BASE_COLOR"
|
|
6237
|
+
45: "PRIM_GLTF_NORMAL"
|
|
6238
|
+
47: "PRIM_GLTF_METALLIC_ROUGHNESS"
|
|
6239
|
+
46: "PRIM_GLTF_EMISSIVE"
|
|
6240
|
+
50: "PRIM_SIT_FLAGS"
|
|
6241
|
+
51: "PRIM_DAMAGE"
|
|
6242
|
+
52: "PRIM_HEALTH"
|
|
6243
|
+
}
|
|
6244
|
+
|
|
6196
6245
|
/** Maps each sub-dispatch constant to the tuple of arguments that follow it. */
|
|
6197
6246
|
interface PrimTypeShapeMap {
|
|
6198
6247
|
[PRIM_TYPE_BOX]: [
|
|
@@ -6268,6 +6317,18 @@ interface PrimTypeShapeMap {
|
|
|
6268
6317
|
[PRIM_TYPE_SCULPT]: [map: string, type: number]
|
|
6269
6318
|
}
|
|
6270
6319
|
|
|
6320
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6321
|
+
interface PrimTypeShapeNameMap {
|
|
6322
|
+
0: "PRIM_TYPE_BOX"
|
|
6323
|
+
1: "PRIM_TYPE_CYLINDER"
|
|
6324
|
+
2: "PRIM_TYPE_PRISM"
|
|
6325
|
+
3: "PRIM_TYPE_SPHERE"
|
|
6326
|
+
4: "PRIM_TYPE_TORUS"
|
|
6327
|
+
5: "PRIM_TYPE_TUBE"
|
|
6328
|
+
6: "PRIM_TYPE_RING"
|
|
6329
|
+
7: "PRIM_TYPE_SCULPT"
|
|
6330
|
+
}
|
|
6331
|
+
|
|
6271
6332
|
/** Recursive type that validates a flat parameter list for PrimParam constants. */
|
|
6272
6333
|
type ParsePrimParams<T extends readonly unknown[]> = T extends readonly []
|
|
6273
6334
|
? []
|
|
@@ -6277,14 +6338,14 @@ type ParsePrimParams<T extends readonly unknown[]> = T extends readonly []
|
|
|
6277
6338
|
? S extends keyof PrimTypeShapeMap
|
|
6278
6339
|
? ShapeRest extends readonly [...PrimTypeShapeMap[S], ...infer Remaining]
|
|
6279
6340
|
? [flag: K, shape: S, ...PrimTypeShapeMap[S], ...ParsePrimParams<Remaining>]
|
|
6280
|
-
:
|
|
6281
|
-
:
|
|
6341
|
+
: TypedListError<`invalid arguments after ${PrimTypeShapeNameMap[S & keyof PrimTypeShapeNameMap]}`>
|
|
6342
|
+
: TypedListError<`unknown shape type ${S & (string | number)}`>
|
|
6282
6343
|
: never
|
|
6283
6344
|
: K extends keyof PrimParamMap
|
|
6284
6345
|
? Rest extends readonly [...PrimParamMap[K], ...infer Remaining]
|
|
6285
6346
|
? [flag: K, ...PrimParamMap[K], ...ParsePrimParams<Remaining>]
|
|
6286
|
-
:
|
|
6287
|
-
:
|
|
6347
|
+
: TypedListError<`invalid arguments after ${PrimParamNameMap[K & keyof PrimParamNameMap]}`>
|
|
6348
|
+
: TypedListError<`unknown parameter flag ${K & (string | number)}`>
|
|
6288
6349
|
: never
|
|
6289
6350
|
|
|
6290
6351
|
/** Maps each constant to the tuple of arguments that follow it. */
|
|
@@ -6333,6 +6394,52 @@ interface PrimParamGetMap {
|
|
|
6333
6394
|
[PRIM_HEALTH]: []
|
|
6334
6395
|
}
|
|
6335
6396
|
|
|
6397
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6398
|
+
interface PrimParamGetNameMap {
|
|
6399
|
+
27: "PRIM_NAME"
|
|
6400
|
+
28: "PRIM_DESC"
|
|
6401
|
+
35: "PRIM_SLICE"
|
|
6402
|
+
30: "PRIM_PHYSICS_SHAPE_TYPE"
|
|
6403
|
+
2: "PRIM_MATERIAL"
|
|
6404
|
+
3: "PRIM_PHYSICS"
|
|
6405
|
+
4: "PRIM_TEMP_ON_REZ"
|
|
6406
|
+
5: "PRIM_PHANTOM"
|
|
6407
|
+
6: "PRIM_POSITION"
|
|
6408
|
+
33: "PRIM_POS_LOCAL"
|
|
6409
|
+
8: "PRIM_ROTATION"
|
|
6410
|
+
29: "PRIM_ROT_LOCAL"
|
|
6411
|
+
7: "PRIM_SIZE"
|
|
6412
|
+
17: "PRIM_TEXTURE"
|
|
6413
|
+
49: "PRIM_RENDER_MATERIAL"
|
|
6414
|
+
26: "PRIM_TEXT"
|
|
6415
|
+
18: "PRIM_COLOR"
|
|
6416
|
+
19: "PRIM_BUMP_SHINY"
|
|
6417
|
+
20: "PRIM_FULLBRIGHT"
|
|
6418
|
+
21: "PRIM_FLEXIBLE"
|
|
6419
|
+
22: "PRIM_TEXGEN"
|
|
6420
|
+
23: "PRIM_POINT_LIGHT"
|
|
6421
|
+
44: "PRIM_REFLECTION_PROBE"
|
|
6422
|
+
25: "PRIM_GLOW"
|
|
6423
|
+
32: "PRIM_OMEGA"
|
|
6424
|
+
37: "PRIM_NORMAL"
|
|
6425
|
+
36: "PRIM_SPECULAR"
|
|
6426
|
+
38: "PRIM_ALPHA_MODE"
|
|
6427
|
+
34: "PRIM_LINK_TARGET"
|
|
6428
|
+
24: "PRIM_CAST_SHADOWS"
|
|
6429
|
+
39: "PRIM_ALLOW_UNSIT"
|
|
6430
|
+
40: "PRIM_SCRIPTED_SIT_ONLY"
|
|
6431
|
+
41: "PRIM_SIT_TARGET"
|
|
6432
|
+
42: "PRIM_PROJECTOR"
|
|
6433
|
+
43: "PRIM_CLICK_ACTION"
|
|
6434
|
+
48: "PRIM_GLTF_BASE_COLOR"
|
|
6435
|
+
45: "PRIM_GLTF_NORMAL"
|
|
6436
|
+
47: "PRIM_GLTF_METALLIC_ROUGHNESS"
|
|
6437
|
+
46: "PRIM_GLTF_EMISSIVE"
|
|
6438
|
+
50: "PRIM_SIT_FLAGS"
|
|
6439
|
+
51: "PRIM_DAMAGE"
|
|
6440
|
+
52: "PRIM_HEALTH"
|
|
6441
|
+
}
|
|
6442
|
+
|
|
6336
6443
|
/** Recursive type that validates a flat parameter list for PrimParamGet constants. */
|
|
6337
6444
|
type ParsePrimParamGets<T extends readonly unknown[]> = T extends readonly []
|
|
6338
6445
|
? []
|
|
@@ -6340,8 +6447,8 @@ type ParsePrimParamGets<T extends readonly unknown[]> = T extends readonly []
|
|
|
6340
6447
|
? K extends keyof PrimParamGetMap
|
|
6341
6448
|
? Rest extends readonly [...PrimParamGetMap[K], ...infer Remaining]
|
|
6342
6449
|
? [flag: K, ...PrimParamGetMap[K], ...ParsePrimParamGets<Remaining>]
|
|
6343
|
-
:
|
|
6344
|
-
:
|
|
6450
|
+
: TypedListError<`invalid arguments after ${PrimParamGetNameMap[K & keyof PrimParamGetNameMap]}`>
|
|
6451
|
+
: TypedListError<`unknown parameter flag ${K & (string | number)}`>
|
|
6345
6452
|
: never
|
|
6346
6453
|
|
|
6347
6454
|
/** Maps each constant to the tuple of arguments that follow it. */
|
|
@@ -6358,6 +6465,20 @@ interface HttpParamMap {
|
|
|
6358
6465
|
[HTTP_EXTENDED_ERROR]: [extended: number]
|
|
6359
6466
|
}
|
|
6360
6467
|
|
|
6468
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6469
|
+
interface HttpParamNameMap {
|
|
6470
|
+
0: "HTTP_METHOD"
|
|
6471
|
+
1: "HTTP_MIMETYPE"
|
|
6472
|
+
2: "HTTP_BODY_MAXLENGTH"
|
|
6473
|
+
3: "HTTP_VERIFY_CERT"
|
|
6474
|
+
4: "HTTP_VERBOSE_THROTTLE"
|
|
6475
|
+
5: "HTTP_CUSTOM_HEADER"
|
|
6476
|
+
6: "HTTP_PRAGMA_NO_CACHE"
|
|
6477
|
+
7: "HTTP_USER_AGENT"
|
|
6478
|
+
8: "HTTP_ACCEPT"
|
|
6479
|
+
9: "HTTP_EXTENDED_ERROR"
|
|
6480
|
+
}
|
|
6481
|
+
|
|
6361
6482
|
/** Recursive type that validates a flat parameter list for HttpParam constants. */
|
|
6362
6483
|
type ParseHttpParams<T extends readonly unknown[]> = T extends readonly []
|
|
6363
6484
|
? []
|
|
@@ -6365,8 +6486,8 @@ type ParseHttpParams<T extends readonly unknown[]> = T extends readonly []
|
|
|
6365
6486
|
? K extends keyof HttpParamMap
|
|
6366
6487
|
? Rest extends readonly [...HttpParamMap[K], ...infer Remaining]
|
|
6367
6488
|
? [flag: K, ...HttpParamMap[K], ...ParseHttpParams<Remaining>]
|
|
6368
|
-
:
|
|
6369
|
-
:
|
|
6489
|
+
: TypedListError<`invalid arguments after ${HttpParamNameMap[K & keyof HttpParamNameMap]}`>
|
|
6490
|
+
: TypedListError<`unknown parameter flag ${K & (string | number)}`>
|
|
6370
6491
|
: never
|
|
6371
6492
|
|
|
6372
6493
|
/** Maps each constant to the tuple of arguments that follow it. */
|
|
@@ -6400,6 +6521,37 @@ interface ParticleSystemParamMap {
|
|
|
6400
6521
|
[PSYS_SRC_BURST_SPEED_MAX]: [speedMax: number]
|
|
6401
6522
|
}
|
|
6402
6523
|
|
|
6524
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6525
|
+
interface ParticleSystemParamNameMap {
|
|
6526
|
+
0: "PSYS_PART_FLAGS"
|
|
6527
|
+
9: "PSYS_SRC_PATTERN"
|
|
6528
|
+
16: "PSYS_SRC_BURST_RADIUS"
|
|
6529
|
+
22: "PSYS_SRC_ANGLE_BEGIN"
|
|
6530
|
+
23: "PSYS_SRC_ANGLE_END"
|
|
6531
|
+
10: "PSYS_SRC_INNERANGLE"
|
|
6532
|
+
11: "PSYS_SRC_OUTERANGLE"
|
|
6533
|
+
20: "PSYS_SRC_TARGET_KEY"
|
|
6534
|
+
1: "PSYS_PART_START_COLOR"
|
|
6535
|
+
3: "PSYS_PART_END_COLOR"
|
|
6536
|
+
2: "PSYS_PART_START_ALPHA"
|
|
6537
|
+
4: "PSYS_PART_END_ALPHA"
|
|
6538
|
+
5: "PSYS_PART_START_SCALE"
|
|
6539
|
+
6: "PSYS_PART_END_SCALE"
|
|
6540
|
+
12: "PSYS_SRC_TEXTURE"
|
|
6541
|
+
26: "PSYS_PART_START_GLOW"
|
|
6542
|
+
27: "PSYS_PART_END_GLOW"
|
|
6543
|
+
24: "PSYS_PART_BLEND_FUNC_SOURCE"
|
|
6544
|
+
25: "PSYS_PART_BLEND_FUNC_DEST"
|
|
6545
|
+
19: "PSYS_SRC_MAX_AGE"
|
|
6546
|
+
7: "PSYS_PART_MAX_AGE"
|
|
6547
|
+
13: "PSYS_SRC_BURST_RATE"
|
|
6548
|
+
15: "PSYS_SRC_BURST_PART_COUNT"
|
|
6549
|
+
8: "PSYS_SRC_ACCEL"
|
|
6550
|
+
21: "PSYS_SRC_OMEGA"
|
|
6551
|
+
17: "PSYS_SRC_BURST_SPEED_MIN"
|
|
6552
|
+
18: "PSYS_SRC_BURST_SPEED_MAX"
|
|
6553
|
+
}
|
|
6554
|
+
|
|
6403
6555
|
/** Recursive type that validates a flat parameter list for ParticleSystemParam constants. */
|
|
6404
6556
|
type ParseParticleSystemParams<T extends readonly unknown[]> = T extends readonly []
|
|
6405
6557
|
? []
|
|
@@ -6407,8 +6559,8 @@ type ParseParticleSystemParams<T extends readonly unknown[]> = T extends readonl
|
|
|
6407
6559
|
? K extends keyof ParticleSystemParamMap
|
|
6408
6560
|
? Rest extends readonly [...ParticleSystemParamMap[K], ...infer Remaining]
|
|
6409
6561
|
? [flag: K, ...ParticleSystemParamMap[K], ...ParseParticleSystemParams<Remaining>]
|
|
6410
|
-
:
|
|
6411
|
-
:
|
|
6562
|
+
: TypedListError<`invalid arguments after ${ParticleSystemParamNameMap[K & keyof ParticleSystemParamNameMap]}`>
|
|
6563
|
+
: TypedListError<`unknown parameter flag ${K & (string | number)}`>
|
|
6412
6564
|
: never
|
|
6413
6565
|
|
|
6414
6566
|
/** Maps each constant to the tuple of arguments that follow it. */
|
|
@@ -6429,6 +6581,24 @@ interface CameraParamMap {
|
|
|
6429
6581
|
[CAMERA_POSITION_THRESHOLD]: [meters: number]
|
|
6430
6582
|
}
|
|
6431
6583
|
|
|
6584
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6585
|
+
interface CameraParamNameMap {
|
|
6586
|
+
12: "CAMERA_ACTIVE"
|
|
6587
|
+
8: "CAMERA_BEHINDNESS_ANGLE"
|
|
6588
|
+
9: "CAMERA_BEHINDNESS_LAG"
|
|
6589
|
+
7: "CAMERA_DISTANCE"
|
|
6590
|
+
17: "CAMERA_FOCUS"
|
|
6591
|
+
6: "CAMERA_FOCUS_LAG"
|
|
6592
|
+
22: "CAMERA_FOCUS_LOCKED"
|
|
6593
|
+
1: "CAMERA_FOCUS_OFFSET"
|
|
6594
|
+
11: "CAMERA_FOCUS_THRESHOLD"
|
|
6595
|
+
0: "CAMERA_PITCH"
|
|
6596
|
+
13: "CAMERA_POSITION"
|
|
6597
|
+
5: "CAMERA_POSITION_LAG"
|
|
6598
|
+
21: "CAMERA_POSITION_LOCKED"
|
|
6599
|
+
10: "CAMERA_POSITION_THRESHOLD"
|
|
6600
|
+
}
|
|
6601
|
+
|
|
6432
6602
|
/** Recursive type that validates a flat parameter list for CameraParam constants. */
|
|
6433
6603
|
type ParseCameraParams<T extends readonly unknown[]> = T extends readonly []
|
|
6434
6604
|
? []
|
|
@@ -6436,8 +6606,8 @@ type ParseCameraParams<T extends readonly unknown[]> = T extends readonly []
|
|
|
6436
6606
|
? K extends keyof CameraParamMap
|
|
6437
6607
|
? Rest extends readonly [...CameraParamMap[K], ...infer Remaining]
|
|
6438
6608
|
? [flag: K, ...CameraParamMap[K], ...ParseCameraParams<Remaining>]
|
|
6439
|
-
:
|
|
6440
|
-
:
|
|
6609
|
+
: TypedListError<`invalid arguments after ${CameraParamNameMap[K & keyof CameraParamNameMap]}`>
|
|
6610
|
+
: TypedListError<`unknown parameter flag ${K & (string | number)}`>
|
|
6441
6611
|
: never
|
|
6442
6612
|
|
|
6443
6613
|
/** Maps each constant to the tuple of arguments that follow it. */
|
|
@@ -6448,6 +6618,14 @@ interface CastRayParamMap {
|
|
|
6448
6618
|
[RC_DETECT_PHANTOM]: [detectPhantom: number]
|
|
6449
6619
|
}
|
|
6450
6620
|
|
|
6621
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6622
|
+
interface CastRayParamNameMap {
|
|
6623
|
+
0: "RC_REJECT_TYPES"
|
|
6624
|
+
2: "RC_DATA_FLAGS"
|
|
6625
|
+
3: "RC_MAX_HITS"
|
|
6626
|
+
1: "RC_DETECT_PHANTOM"
|
|
6627
|
+
}
|
|
6628
|
+
|
|
6451
6629
|
/** Recursive type that validates a flat parameter list for CastRayParam constants. */
|
|
6452
6630
|
type ParseCastRayParams<T extends readonly unknown[]> = T extends readonly []
|
|
6453
6631
|
? []
|
|
@@ -6455,8 +6633,8 @@ type ParseCastRayParams<T extends readonly unknown[]> = T extends readonly []
|
|
|
6455
6633
|
? K extends keyof CastRayParamMap
|
|
6456
6634
|
? Rest extends readonly [...CastRayParamMap[K], ...infer Remaining]
|
|
6457
6635
|
? [flag: K, ...CastRayParamMap[K], ...ParseCastRayParams<Remaining>]
|
|
6458
|
-
:
|
|
6459
|
-
:
|
|
6636
|
+
: TypedListError<`invalid arguments after ${CastRayParamNameMap[K & keyof CastRayParamNameMap]}`>
|
|
6637
|
+
: TypedListError<`unknown parameter flag ${K & (string | number)}`>
|
|
6460
6638
|
: never
|
|
6461
6639
|
|
|
6462
6640
|
/** Maps each constant to the tuple of arguments that follow it. */
|
|
@@ -6476,6 +6654,23 @@ interface CharacterParamMap {
|
|
|
6476
6654
|
[CHARACTER_STAY_WITHIN_PARCEL]: [stayWithinParcel: number]
|
|
6477
6655
|
}
|
|
6478
6656
|
|
|
6657
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6658
|
+
interface CharacterParamNameMap {
|
|
6659
|
+
1: "CHARACTER_DESIRED_SPEED"
|
|
6660
|
+
2: "CHARACTER_RADIUS"
|
|
6661
|
+
3: "CHARACTER_LENGTH"
|
|
6662
|
+
4: "CHARACTER_ORIENTATION"
|
|
6663
|
+
6: "CHARACTER_TYPE"
|
|
6664
|
+
5: "CHARACTER_AVOIDANCE_MODE"
|
|
6665
|
+
8: "CHARACTER_MAX_ACCEL"
|
|
6666
|
+
9: "CHARACTER_MAX_DECEL"
|
|
6667
|
+
12: "CHARACTER_DESIRED_TURN_SPEED"
|
|
6668
|
+
10: "CHARACTER_MAX_TURN_RADIUS"
|
|
6669
|
+
13: "CHARACTER_MAX_SPEED"
|
|
6670
|
+
14: "CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES"
|
|
6671
|
+
15: "CHARACTER_STAY_WITHIN_PARCEL"
|
|
6672
|
+
}
|
|
6673
|
+
|
|
6479
6674
|
/** Recursive type that validates a flat parameter list for CharacterParam constants. */
|
|
6480
6675
|
type ParseCharacterParams<T extends readonly unknown[]> = T extends readonly []
|
|
6481
6676
|
? []
|
|
@@ -6483,8 +6678,8 @@ type ParseCharacterParams<T extends readonly unknown[]> = T extends readonly []
|
|
|
6483
6678
|
? K extends keyof CharacterParamMap
|
|
6484
6679
|
? Rest extends readonly [...CharacterParamMap[K], ...infer Remaining]
|
|
6485
6680
|
? [flag: K, ...CharacterParamMap[K], ...ParseCharacterParams<Remaining>]
|
|
6486
|
-
:
|
|
6487
|
-
:
|
|
6681
|
+
: TypedListError<`invalid arguments after ${CharacterParamNameMap[K & keyof CharacterParamNameMap]}`>
|
|
6682
|
+
: TypedListError<`unknown parameter flag ${K & (string | number)}`>
|
|
6488
6683
|
: never
|
|
6489
6684
|
|
|
6490
6685
|
/** Maps each constant to the tuple of arguments that follow it. */
|
|
@@ -6504,6 +6699,23 @@ interface RezParamMap {
|
|
|
6504
6699
|
[REZ_PARAM_STRING]: [startParam: string]
|
|
6505
6700
|
}
|
|
6506
6701
|
|
|
6702
|
+
/** Reverse map from numeric value to constant name for error messages. */
|
|
6703
|
+
interface RezParamNameMap {
|
|
6704
|
+
0: "REZ_PARAM"
|
|
6705
|
+
1: "REZ_FLAGS"
|
|
6706
|
+
2: "REZ_POS"
|
|
6707
|
+
3: "REZ_ROT"
|
|
6708
|
+
4: "REZ_VEL"
|
|
6709
|
+
5: "REZ_ACCEL"
|
|
6710
|
+
7: "REZ_OMEGA"
|
|
6711
|
+
8: "REZ_DAMAGE"
|
|
6712
|
+
9: "REZ_SOUND"
|
|
6713
|
+
10: "REZ_SOUND_COLLIDE"
|
|
6714
|
+
11: "REZ_LOCK_AXES"
|
|
6715
|
+
12: "REZ_DAMAGE_TYPE"
|
|
6716
|
+
13: "REZ_PARAM_STRING"
|
|
6717
|
+
}
|
|
6718
|
+
|
|
6507
6719
|
/** Recursive type that validates a flat parameter list for RezParam constants. */
|
|
6508
6720
|
type ParseRezParams<T extends readonly unknown[]> = T extends readonly []
|
|
6509
6721
|
? []
|
|
@@ -6511,8 +6723,8 @@ type ParseRezParams<T extends readonly unknown[]> = T extends readonly []
|
|
|
6511
6723
|
? K extends keyof RezParamMap
|
|
6512
6724
|
? Rest extends readonly [...RezParamMap[K], ...infer Remaining]
|
|
6513
6725
|
? [flag: K, ...RezParamMap[K], ...ParseRezParams<Remaining>]
|
|
6514
|
-
:
|
|
6515
|
-
:
|
|
6726
|
+
: TypedListError<`invalid arguments after ${RezParamNameMap[K & keyof RezParamNameMap]}`>
|
|
6727
|
+
: TypedListError<`unknown parameter flag ${K & (string | number)}`>
|
|
6516
6728
|
: never
|
|
6517
6729
|
|
|
6518
6730
|
/** Valid constants for ObjectDetail functions. */
|
|
@@ -6588,3 +6800,315 @@ type ParcelDetailFlag =
|
|
|
6588
6800
|
| typeof PARCEL_DETAILS_TP_ROUTING
|
|
6589
6801
|
| typeof PARCEL_DETAILS_FLAGS
|
|
6590
6802
|
| typeof PARCEL_DETAILS_SCRIPT_DANGER
|
|
6803
|
+
|
|
6804
|
+
/** Fluent builder for PrimParam lists. Compiles to a flat parameter list at build time. */
|
|
6805
|
+
interface PrimParamBuilder {
|
|
6806
|
+
name(name: string): PrimParamBuilder
|
|
6807
|
+
desc(description: string): PrimParamBuilder
|
|
6808
|
+
slice(slice: Vector): PrimParamBuilder
|
|
6809
|
+
physicsShapeType(type: number): PrimParamBuilder
|
|
6810
|
+
material(flag: number): PrimParamBuilder
|
|
6811
|
+
physics(enabled: boolean): PrimParamBuilder
|
|
6812
|
+
tempOnRez(enabled: boolean): PrimParamBuilder
|
|
6813
|
+
phantom(enabled: boolean): PrimParamBuilder
|
|
6814
|
+
position(position: Vector): PrimParamBuilder
|
|
6815
|
+
posLocal(position: Vector): PrimParamBuilder
|
|
6816
|
+
rotation(rot: Quaternion): PrimParamBuilder
|
|
6817
|
+
rotLocal(rot: Quaternion): PrimParamBuilder
|
|
6818
|
+
size(size: Vector): PrimParamBuilder
|
|
6819
|
+
texture(
|
|
6820
|
+
face: number,
|
|
6821
|
+
texture: string,
|
|
6822
|
+
repeats: Vector,
|
|
6823
|
+
offsets: Vector,
|
|
6824
|
+
rotationInRadians: number,
|
|
6825
|
+
): PrimParamBuilder
|
|
6826
|
+
renderMaterial(face: number, renderMaterial: string): PrimParamBuilder
|
|
6827
|
+
text(text: string, color: Vector, alpha: number): PrimParamBuilder
|
|
6828
|
+
color(face: number, color: Vector, alpha: number): PrimParamBuilder
|
|
6829
|
+
bumpShiny(face: number, shiny: number, bump: number): PrimParamBuilder
|
|
6830
|
+
pointLight(
|
|
6831
|
+
enabled: boolean,
|
|
6832
|
+
linearColor: Vector,
|
|
6833
|
+
intensity: number,
|
|
6834
|
+
radius: number,
|
|
6835
|
+
falloff: number,
|
|
6836
|
+
): PrimParamBuilder
|
|
6837
|
+
reflectionProbe(
|
|
6838
|
+
enabled: boolean,
|
|
6839
|
+
ambiance: number,
|
|
6840
|
+
clipDistance: number,
|
|
6841
|
+
flags: number,
|
|
6842
|
+
): PrimParamBuilder
|
|
6843
|
+
fullbright(face: number, enabled: boolean): PrimParamBuilder
|
|
6844
|
+
flexible(
|
|
6845
|
+
enabled: boolean,
|
|
6846
|
+
softness: number,
|
|
6847
|
+
gravity: number,
|
|
6848
|
+
friction: number,
|
|
6849
|
+
wind: number,
|
|
6850
|
+
tension: number,
|
|
6851
|
+
force: Vector,
|
|
6852
|
+
): PrimParamBuilder
|
|
6853
|
+
texgen(face: number, type: number): PrimParamBuilder
|
|
6854
|
+
glow(face: number, intensity: number): PrimParamBuilder
|
|
6855
|
+
omega(axis: Vector, spinrate: number, gain: number): PrimParamBuilder
|
|
6856
|
+
normal(
|
|
6857
|
+
face: number,
|
|
6858
|
+
texture: string,
|
|
6859
|
+
repeats: Vector,
|
|
6860
|
+
offsets: Vector,
|
|
6861
|
+
rotationInRadians: number,
|
|
6862
|
+
): PrimParamBuilder
|
|
6863
|
+
specular(
|
|
6864
|
+
face: number,
|
|
6865
|
+
texture: string,
|
|
6866
|
+
repeats: Vector,
|
|
6867
|
+
offsets: Vector,
|
|
6868
|
+
rotationInRadians: number,
|
|
6869
|
+
color: Vector,
|
|
6870
|
+
glossiness: number,
|
|
6871
|
+
environment: number,
|
|
6872
|
+
): PrimParamBuilder
|
|
6873
|
+
alphaMode(face: number, alphaMode: number, maskCutoff: number): PrimParamBuilder
|
|
6874
|
+
castShadows(enabled: boolean): PrimParamBuilder
|
|
6875
|
+
allowUnsit(enabled: boolean): PrimParamBuilder
|
|
6876
|
+
scriptedSitOnly(enabled: boolean): PrimParamBuilder
|
|
6877
|
+
sitTarget(enabled: boolean, offset: Vector, rot: Quaternion): PrimParamBuilder
|
|
6878
|
+
projector(texture: string, fov: number, focus: number, ambiance: number): PrimParamBuilder
|
|
6879
|
+
clickAction(action: number): PrimParamBuilder
|
|
6880
|
+
gltfBaseColor(
|
|
6881
|
+
face: number,
|
|
6882
|
+
texture: string,
|
|
6883
|
+
repeats: Vector,
|
|
6884
|
+
offsets: Vector,
|
|
6885
|
+
rotationInRadians: number,
|
|
6886
|
+
linearColor: Vector,
|
|
6887
|
+
alpha: number,
|
|
6888
|
+
gltfAlphaMode: number,
|
|
6889
|
+
alphaMaskCutoff: number,
|
|
6890
|
+
doubleSided: number,
|
|
6891
|
+
): PrimParamBuilder
|
|
6892
|
+
gltfNormal(
|
|
6893
|
+
face: number,
|
|
6894
|
+
texture: string,
|
|
6895
|
+
repeats: Vector,
|
|
6896
|
+
offsets: Vector,
|
|
6897
|
+
rotationInRadians: number,
|
|
6898
|
+
): PrimParamBuilder
|
|
6899
|
+
gltfMetallicRoughness(
|
|
6900
|
+
face: number,
|
|
6901
|
+
texture: string,
|
|
6902
|
+
repeats: Vector,
|
|
6903
|
+
offsets: Vector,
|
|
6904
|
+
rotationInRadians: number,
|
|
6905
|
+
metallicFactor: number,
|
|
6906
|
+
roughnessFactor: number,
|
|
6907
|
+
): PrimParamBuilder
|
|
6908
|
+
gltfEmissive(
|
|
6909
|
+
face: number,
|
|
6910
|
+
texture: string,
|
|
6911
|
+
repeats: Vector,
|
|
6912
|
+
offsets: Vector,
|
|
6913
|
+
rotationInRadians: number,
|
|
6914
|
+
linearEmissiveTint: Vector,
|
|
6915
|
+
): PrimParamBuilder
|
|
6916
|
+
sitFlags(flags: number): PrimParamBuilder
|
|
6917
|
+
damage(damage: number, damageType: number): PrimParamBuilder
|
|
6918
|
+
health(health: number): PrimParamBuilder
|
|
6919
|
+
typeBox(
|
|
6920
|
+
holeShape: number,
|
|
6921
|
+
cut: Vector,
|
|
6922
|
+
hollow: number,
|
|
6923
|
+
twist: Vector,
|
|
6924
|
+
topSize: Vector,
|
|
6925
|
+
topShear: Vector,
|
|
6926
|
+
): PrimParamBuilder
|
|
6927
|
+
typeCylinder(
|
|
6928
|
+
holeShape: number,
|
|
6929
|
+
cut: Vector,
|
|
6930
|
+
hollow: number,
|
|
6931
|
+
twist: Vector,
|
|
6932
|
+
topSize: Vector,
|
|
6933
|
+
topShear: Vector,
|
|
6934
|
+
): PrimParamBuilder
|
|
6935
|
+
typePrism(
|
|
6936
|
+
holeShape: number,
|
|
6937
|
+
cut: Vector,
|
|
6938
|
+
hollow: number,
|
|
6939
|
+
twist: Vector,
|
|
6940
|
+
topSize: Vector,
|
|
6941
|
+
topShear: Vector,
|
|
6942
|
+
): PrimParamBuilder
|
|
6943
|
+
typeSphere(
|
|
6944
|
+
holeShape: number,
|
|
6945
|
+
cut: Vector,
|
|
6946
|
+
hollow: number,
|
|
6947
|
+
twist: Vector,
|
|
6948
|
+
dimple: Vector,
|
|
6949
|
+
): PrimParamBuilder
|
|
6950
|
+
typeTorus(
|
|
6951
|
+
holeShape: number,
|
|
6952
|
+
cut: Vector,
|
|
6953
|
+
hollow: number,
|
|
6954
|
+
twist: Vector,
|
|
6955
|
+
holeSize: Vector,
|
|
6956
|
+
topShear: Vector,
|
|
6957
|
+
advancedCut: Vector,
|
|
6958
|
+
taper: Vector,
|
|
6959
|
+
revolutions: number,
|
|
6960
|
+
radiusOffset: number,
|
|
6961
|
+
skew: number,
|
|
6962
|
+
): PrimParamBuilder
|
|
6963
|
+
typeTube(
|
|
6964
|
+
holeShape: number,
|
|
6965
|
+
cut: Vector,
|
|
6966
|
+
hollow: number,
|
|
6967
|
+
twist: Vector,
|
|
6968
|
+
holeSize: Vector,
|
|
6969
|
+
topShear: Vector,
|
|
6970
|
+
advancedCut: Vector,
|
|
6971
|
+
taper: Vector,
|
|
6972
|
+
revolutions: number,
|
|
6973
|
+
radiusOffset: number,
|
|
6974
|
+
skew: number,
|
|
6975
|
+
): PrimParamBuilder
|
|
6976
|
+
typeRing(
|
|
6977
|
+
holeShape: number,
|
|
6978
|
+
cut: Vector,
|
|
6979
|
+
hollow: number,
|
|
6980
|
+
twist: Vector,
|
|
6981
|
+
holeSize: Vector,
|
|
6982
|
+
topShear: Vector,
|
|
6983
|
+
advancedCut: Vector,
|
|
6984
|
+
taper: Vector,
|
|
6985
|
+
revolutions: number,
|
|
6986
|
+
radiusOffset: number,
|
|
6987
|
+
skew: number,
|
|
6988
|
+
): PrimParamBuilder
|
|
6989
|
+
typeSculpt(map: string, type: number): PrimParamBuilder
|
|
6990
|
+
link(linkTarget: number, cb: (link: PrimParamBuilder) => PrimParamBuilder): PrimParamBuilder
|
|
6991
|
+
}
|
|
6992
|
+
|
|
6993
|
+
declare function setPrimParams(linkNumber: number): PrimParamBuilder
|
|
6994
|
+
|
|
6995
|
+
/** Fluent builder for ParticleSystemParam lists. Compiles to a flat parameter list at build time. */
|
|
6996
|
+
interface ParticleSystemParamBuilder {
|
|
6997
|
+
partFlags(flags: number): ParticleSystemParamBuilder
|
|
6998
|
+
srcPattern(pattern: number): ParticleSystemParamBuilder
|
|
6999
|
+
srcBurstRadius(radius: number): ParticleSystemParamBuilder
|
|
7000
|
+
srcAngleBegin(angleBegin: number): ParticleSystemParamBuilder
|
|
7001
|
+
srcAngleEnd(angleEnd: number): ParticleSystemParamBuilder
|
|
7002
|
+
srcInnerangle(angleInner: number): ParticleSystemParamBuilder
|
|
7003
|
+
srcOuterangle(angleOuter: number): ParticleSystemParamBuilder
|
|
7004
|
+
srcTargetKey(target: UUID): ParticleSystemParamBuilder
|
|
7005
|
+
partStartColor(colorStart: Vector): ParticleSystemParamBuilder
|
|
7006
|
+
partEndColor(colorEnd: Vector): ParticleSystemParamBuilder
|
|
7007
|
+
partStartAlpha(alphaStart: number): ParticleSystemParamBuilder
|
|
7008
|
+
partEndAlpha(alphaEnd: number): ParticleSystemParamBuilder
|
|
7009
|
+
partStartScale(scaleStart: Vector): ParticleSystemParamBuilder
|
|
7010
|
+
partEndScale(scaleEnd: Vector): ParticleSystemParamBuilder
|
|
7011
|
+
srcTexture(texture: string): ParticleSystemParamBuilder
|
|
7012
|
+
partStartGlow(glowStart: number): ParticleSystemParamBuilder
|
|
7013
|
+
partEndGlow(glowEnd: number): ParticleSystemParamBuilder
|
|
7014
|
+
partBlendFuncSource(bfSource: number): ParticleSystemParamBuilder
|
|
7015
|
+
partBlendFuncDest(bfDest: number): ParticleSystemParamBuilder
|
|
7016
|
+
srcMaxAge(durationSystem: number): ParticleSystemParamBuilder
|
|
7017
|
+
partMaxAge(durationParticle: number): ParticleSystemParamBuilder
|
|
7018
|
+
srcBurstRate(burstSleep: number): ParticleSystemParamBuilder
|
|
7019
|
+
srcBurstPartCount(burstParticleCount: number): ParticleSystemParamBuilder
|
|
7020
|
+
srcAccel(acceleration: Vector): ParticleSystemParamBuilder
|
|
7021
|
+
srcOmega(omega: Vector): ParticleSystemParamBuilder
|
|
7022
|
+
srcBurstSpeedMin(speedMin: number): ParticleSystemParamBuilder
|
|
7023
|
+
srcBurstSpeedMax(speedMax: number): ParticleSystemParamBuilder
|
|
7024
|
+
}
|
|
7025
|
+
|
|
7026
|
+
declare function particleSystem(): ParticleSystemParamBuilder
|
|
7027
|
+
|
|
7028
|
+
declare function linkParticleSystem(linkNumber: number): ParticleSystemParamBuilder
|
|
7029
|
+
|
|
7030
|
+
/** Fluent builder for CameraParam lists. Compiles to a flat parameter list at build time. */
|
|
7031
|
+
interface CameraParamBuilder {
|
|
7032
|
+
active(isActive: boolean): CameraParamBuilder
|
|
7033
|
+
behindnessAngle(degrees: number): CameraParamBuilder
|
|
7034
|
+
behindnessLag(seconds: number): CameraParamBuilder
|
|
7035
|
+
distance(meters: number): CameraParamBuilder
|
|
7036
|
+
focus(position: Vector): CameraParamBuilder
|
|
7037
|
+
focusLag(seconds: number): CameraParamBuilder
|
|
7038
|
+
focusLocked(isLocked: number): CameraParamBuilder
|
|
7039
|
+
focusOffset(meters: Vector): CameraParamBuilder
|
|
7040
|
+
focusThreshold(meters: number): CameraParamBuilder
|
|
7041
|
+
pitch(degrees: number): CameraParamBuilder
|
|
7042
|
+
position(position: Vector): CameraParamBuilder
|
|
7043
|
+
positionLag(seconds: number): CameraParamBuilder
|
|
7044
|
+
positionLocked(isLocked: number): CameraParamBuilder
|
|
7045
|
+
positionThreshold(meters: number): CameraParamBuilder
|
|
7046
|
+
}
|
|
7047
|
+
|
|
7048
|
+
declare function setCameraParams(): CameraParamBuilder
|
|
7049
|
+
|
|
7050
|
+
/** Fluent builder for HttpParam lists. Compiles to a flat parameter list at build time. */
|
|
7051
|
+
interface HttpParamBuilder {
|
|
7052
|
+
method(method: string): HttpParamBuilder
|
|
7053
|
+
mimetype(mimeType: string): HttpParamBuilder
|
|
7054
|
+
bodyMaxlength(length: number): HttpParamBuilder
|
|
7055
|
+
verifyCert(verify: number): HttpParamBuilder
|
|
7056
|
+
verboseThrottle(noisy: number): HttpParamBuilder
|
|
7057
|
+
customHeader(name: string, value: string): HttpParamBuilder
|
|
7058
|
+
pragmaNoCache(sendHeader: number): HttpParamBuilder
|
|
7059
|
+
userAgent(user: string): HttpParamBuilder
|
|
7060
|
+
accept(mimeType: string): HttpParamBuilder
|
|
7061
|
+
extendedError(extended: number): HttpParamBuilder
|
|
7062
|
+
}
|
|
7063
|
+
|
|
7064
|
+
declare function httpRequest(url: string, body: string): HttpParamBuilder
|
|
7065
|
+
|
|
7066
|
+
/** Fluent builder for CastRayParam lists. Compiles to a flat parameter list at build time. */
|
|
7067
|
+
interface CastRayParamBuilder {
|
|
7068
|
+
rejectTypes(filter: number): CastRayParamBuilder
|
|
7069
|
+
dataFlags(flags: number): CastRayParamBuilder
|
|
7070
|
+
maxHits(maxHits: number): CastRayParamBuilder
|
|
7071
|
+
detectPhantom(detectPhantom: number): CastRayParamBuilder
|
|
7072
|
+
}
|
|
7073
|
+
|
|
7074
|
+
declare function castRay(start: Vector, end: Vector): CastRayParamBuilder
|
|
7075
|
+
|
|
7076
|
+
/** Fluent builder for CharacterParam lists. Compiles to a flat parameter list at build time. */
|
|
7077
|
+
interface CharacterParamBuilder {
|
|
7078
|
+
desiredSpeed(desiredSpeed: number): CharacterParamBuilder
|
|
7079
|
+
radius(radius: number): CharacterParamBuilder
|
|
7080
|
+
length(length: number): CharacterParamBuilder
|
|
7081
|
+
orientation(orientation: number): CharacterParamBuilder
|
|
7082
|
+
type(type: number): CharacterParamBuilder
|
|
7083
|
+
avoidanceMode(avoidanceMode: number): CharacterParamBuilder
|
|
7084
|
+
maxAccel(maxAccel: number): CharacterParamBuilder
|
|
7085
|
+
maxDecel(maxDecel: number): CharacterParamBuilder
|
|
7086
|
+
desiredTurnSpeed(desiredTurnSpeed: number): CharacterParamBuilder
|
|
7087
|
+
maxTurnRadius(maxTurnRadius: number): CharacterParamBuilder
|
|
7088
|
+
maxSpeed(maxSpeed: number): CharacterParamBuilder
|
|
7089
|
+
accountForSkippedFrames(accountForSkippedFrames: number): CharacterParamBuilder
|
|
7090
|
+
stayWithinParcel(stayWithinParcel: number): CharacterParamBuilder
|
|
7091
|
+
}
|
|
7092
|
+
|
|
7093
|
+
declare function createCharacter(): CharacterParamBuilder
|
|
7094
|
+
|
|
7095
|
+
declare function updateCharacter(): CharacterParamBuilder
|
|
7096
|
+
|
|
7097
|
+
/** Fluent builder for RezParam lists. Compiles to a flat parameter list at build time. */
|
|
7098
|
+
interface RezParamBuilder {
|
|
7099
|
+
param(param: number): RezParamBuilder
|
|
7100
|
+
flags(flags: number): RezParamBuilder
|
|
7101
|
+
pos(pos: Vector, relative: number, atRoot: number): RezParamBuilder
|
|
7102
|
+
rot(rot: Quaternion, relative: number): RezParamBuilder
|
|
7103
|
+
vel(velocity: Vector, local: number, inherit: number): RezParamBuilder
|
|
7104
|
+
accel(force: Vector, local: number): RezParamBuilder
|
|
7105
|
+
omega(axis: Vector, local: number, spin: number, gain: number): RezParamBuilder
|
|
7106
|
+
damage(damage: number): RezParamBuilder
|
|
7107
|
+
sound(sound: string, volume: number, loop: number): RezParamBuilder
|
|
7108
|
+
soundCollide(sound: string, volume: number): RezParamBuilder
|
|
7109
|
+
lockAxes(locks: Vector): RezParamBuilder
|
|
7110
|
+
damageType(damageType: number): RezParamBuilder
|
|
7111
|
+
paramString(startParam: string): RezParamBuilder
|
|
7112
|
+
}
|
|
7113
|
+
|
|
7114
|
+
declare function rezObjectWithParams(inventoryItem: string): RezParamBuilder
|