@falloutmp/types 0.3.1 → 0.3.2
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/generated/client-api.d.ts +273 -29
- package/generated/server-api.d.ts +1007 -11
- package/package.json +1 -1
|
@@ -15,6 +15,11 @@ declare global {
|
|
|
15
15
|
*/
|
|
16
16
|
menuClose: [name: string];
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Dispatched when what lies under the crosshair changes, as the activation prompt follows it: the reference now there and the one before, 0 for none, and, when the new one is another player's body or an NPC, its network ID as the server knows it.
|
|
20
|
+
*/
|
|
21
|
+
crosshairChange: [ref: number, previous: number, entity: number | null];
|
|
22
|
+
|
|
18
23
|
/**
|
|
19
24
|
* Dispatched once when the local player goes down. The server decides when they come back.
|
|
20
25
|
*/
|
|
@@ -135,6 +140,21 @@ declare global {
|
|
|
135
140
|
*/
|
|
136
141
|
workshopRemove: [form: number];
|
|
137
142
|
|
|
143
|
+
/**
|
|
144
|
+
* Dispatched when the sky switches its current weather: a change the server made, this player's own, or one the game rolled, starting its fade or snapping to it. `previous` is the weather it leaves, 0 for none. The fade itself goes on for up to a game hour; `World.getSky` follows it.
|
|
145
|
+
*/
|
|
146
|
+
weatherChange: [weather: number, previous: number];
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Dispatched when lightning strikes in the sky: a flash and a thunderclap, with the flash's brightness from 0 to 1. In a session every player's sky strikes together, on the server's word.
|
|
150
|
+
*/
|
|
151
|
+
lightning: [flash: number];
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Dispatched when the game finds the player under another weather region as they change cell: the TESRegion form ID whose weathers the sky would roll, 0 for none. The server hears it too (`playerWeatherRegionChange`).
|
|
155
|
+
*/
|
|
156
|
+
weatherRegionChange: [region: number, previous: number];
|
|
157
|
+
|
|
138
158
|
/**
|
|
139
159
|
* Dispatched after a resource entry point has run and immediately before the resource becomes running.
|
|
140
160
|
*/
|
|
@@ -273,6 +293,58 @@ declare global {
|
|
|
273
293
|
*/
|
|
274
294
|
showHitMarker(): void;
|
|
275
295
|
|
|
296
|
+
/**
|
|
297
|
+
* What the HUD's ammo counter shows: the rounds in the weapon and the rounds carried besides.
|
|
298
|
+
* @returns Null while the HUD shows no counter: no gun in hand.
|
|
299
|
+
*/
|
|
300
|
+
getAmmo(): { clip: number; reserve: number } | null;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* What the HUD's enemy health bar shows for the actor the player is aiming at: its name, its health from 0 to 100, the bar's second meter, and whether it is hostile, legendary or far above the player's level.
|
|
304
|
+
* @returns Null while the HUD shows no bar: nobody under the crosshair.
|
|
305
|
+
*/
|
|
306
|
+
getEnemyHealth(): { name: string; healthPercent: number; secondaryPercent: number; hostile: boolean; legendary: boolean; skull: boolean } | null;
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* What the HUD's activation prompt shows for what the player looks at: its name, the label of the activate button and of the second button, whether activating is enabled, the legendary and tagged-for-search icons, and whether activating would be a crime.
|
|
310
|
+
* @returns Null while the HUD shows no prompt.
|
|
311
|
+
*/
|
|
312
|
+
getRollover(): { name: string; activateText: string; secondaryText: string; activateEnabled: boolean; legendary: boolean; taggedForSearch: boolean; crime: boolean } | null;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* The arcs the HUD's hit indicator shows: for each recent hit, the angle to the attacker in radians, where an attacker straight ahead reads about -pi/2, and a strength that starts at 100 and fades.
|
|
316
|
+
* @returns Empty while the HUD shows none.
|
|
317
|
+
*/
|
|
318
|
+
getHitIndicators(): { angle: number; strength: number }[];
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The markers the HUD's explosive indicator shows: for each grenade or mine near the player, whether it is a placed explosive, how far it is in game units and the angle to it in radians, where straight ahead reads about -pi/2.
|
|
322
|
+
* @returns Empty while the HUD shows none.
|
|
323
|
+
*/
|
|
324
|
+
getExplosiveIndicators(): { placed: boolean; distance: number; angle: number }[];
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* What the HUD's experience meter last showed: the amount it printed, its fill, and whether it announced a level.
|
|
328
|
+
* @returns Null until the meter has come up once.
|
|
329
|
+
*/
|
|
330
|
+
getExperienceMeter(): { amount: number; percent: number; levelUp: boolean } | null;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* The icons the HUD's active effects widget shows: four arrays, one per effect category, each holding the indices of the icons lit.
|
|
334
|
+
*/
|
|
335
|
+
getActiveEffectIcons(): number[][];
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* What the HUD's radiation meter holds: the rads it displays, their share of a lethal dose, and how many radiation sources reach the player. Each is null until the game has set it.
|
|
339
|
+
* @returns Null before the HUD exists.
|
|
340
|
+
*/
|
|
341
|
+
getRadiation(): { rads: number | null; lethalShare: number | null; sources: number | null } | null;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Whether the HUD still has corner messages to show or on screen, as its notification model was last told: a script can wait for the corner to clear before it shows its own.
|
|
345
|
+
*/
|
|
346
|
+
hasMessages(): boolean;
|
|
347
|
+
|
|
276
348
|
/**
|
|
277
349
|
* Keeps the health or the action point bar on the HUD. The game hides each while it is full and nothing touches it; this holds one up until it is let go.
|
|
278
350
|
* @param meter Which bar.
|
|
@@ -535,6 +607,20 @@ declare global {
|
|
|
535
607
|
*/
|
|
536
608
|
getFov(): { horizontal: number; vertical: number } | null;
|
|
537
609
|
|
|
610
|
+
/**
|
|
611
|
+
* Sets the field of view the world renders with, as FiveM's SetCamFov and the console's fov do: a zoom for a cutscene, a fish-eye for a drunk effect. It holds through camera changes until set again; the game's own comes back with null or when the session ends. The player's own settings are not touched.
|
|
612
|
+
* @param degrees The horizontal field of view, 10 to 160 degrees; null for the game's own.
|
|
613
|
+
* @returns False before the world is built.
|
|
614
|
+
*/
|
|
615
|
+
setFov(degrees: number | null): boolean;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Takes the camera from the player and puts it where the script says, as FiveM's CreateCam, SetCamCoord, PointCamAtCoord and RenderScriptCams do: a cutscene shot, a security camera, an intro flight. The player's controls move neither the camera nor their body while it is up: their movement, looking, jumping and fighting are held off, and their body keeps its heading. Called again it moves: a script tweens it by calling every tick. It is given back with null, when the resource that set it stops, or when the session ends.
|
|
619
|
+
* @param view Where the camera stands, and where it looks: a rotation in radians (pitch positive down, yaw 0 facing +Y, clockwise) or a point to face. Null gives the player their camera back.
|
|
620
|
+
* @returns False when there is no player in a cell, or the console's fly camera holds the camera.
|
|
621
|
+
*/
|
|
622
|
+
setView(view: { position: Vector3; rotation?: { pitch: number; yaw: number }; lookAt?: Vector3 } | null): boolean;
|
|
623
|
+
|
|
538
624
|
/**
|
|
539
625
|
* Whether the player's camera is in its first-person state.
|
|
540
626
|
* @returns False in third person and in every other state: the fly camera, furniture, a scripted camera.
|
|
@@ -577,6 +663,20 @@ declare global {
|
|
|
577
663
|
* @param z World units.
|
|
578
664
|
*/
|
|
579
665
|
worldToScreen(x: number, y: number, z: number): { x: number; y: number; onScreen: boolean } | null;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* What lies under the crosshair, as the game picks it for the activation prompt, the activate button and VATS: the reference, the network ID of the player or NPC it stands for when it is one, and how far it is from the player in game units.
|
|
669
|
+
* @returns Null with nothing under the crosshair. It is the activation pick: an actor is under it only when the game offers to activate it, so another player's body never is; Camera.raycast strikes it.
|
|
670
|
+
*/
|
|
671
|
+
getCrosshairTarget(): { ref: number; entity: number | null; distance: number } | null;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* What the player is aiming at: World.raycast from the camera through the middle of the screen, where the crosshair sits, in first or third person. Unlike getCrosshairTarget it strikes anything solid, other players' bodies included.
|
|
675
|
+
* @param distance How far to look, in game units; 10000 when left out.
|
|
676
|
+
* @param options As World.raycast's: the actor whose body the ray passes over, the local player by default.
|
|
677
|
+
* @returns As World.raycast's; null before the world is built or the player is in a cell.
|
|
678
|
+
*/
|
|
679
|
+
raycast(distance?: number, options?: { ignore?: number | string | null }): { hit: boolean; position: Vector3; normal: Vector3; fraction: number; ref: number | null; entity: number | null } | null;
|
|
580
680
|
};
|
|
581
681
|
|
|
582
682
|
/**
|
|
@@ -687,9 +787,59 @@ declare global {
|
|
|
687
787
|
};
|
|
688
788
|
|
|
689
789
|
/**
|
|
690
|
-
*
|
|
790
|
+
* Effects only the local player sees and feels: screen and controller effects, and explosions, shaders, visual effects and impacts in this game alone. Fades are on Hud.fade; the server's `Explosion` and `Effect` play for everyone.
|
|
691
791
|
*/
|
|
692
792
|
const Effects: {
|
|
793
|
+
/**
|
|
794
|
+
* Sets off an explosion in this game alone. Its blast hurts what this game simulates.
|
|
795
|
+
* @param explosion A BGSExplosion (EXPL) form ID.
|
|
796
|
+
* @param position Where it goes off, in the player's space.
|
|
797
|
+
* @param options `scale` of its radii, `damage` a multiplier of its damage (0 for a harmless one); 1 by default.
|
|
798
|
+
* @returns False when there is no such explosion, or the spot is not loaded here.
|
|
799
|
+
*/
|
|
800
|
+
explode(explosion: number | string, position: Vector3, options?: { scale?: number; damage?: number }): boolean;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* Plays an effect shader on a reference in this game alone, as EffectShader.Play does.
|
|
804
|
+
* @param ref A reference or actor of this game by form ID: 0x14 for the player, `References.getEntityBody` for another player or an NPC.
|
|
805
|
+
* @param shader A TESEffectShader (EFSH) form ID.
|
|
806
|
+
* @param seconds How long; until stopShader when left out.
|
|
807
|
+
* @returns False when the reference is not loaded here or the form is no shader.
|
|
808
|
+
*/
|
|
809
|
+
playShader(ref: number | string, shader: number | string, seconds?: number): boolean;
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* Stops an effect shader on a reference.
|
|
813
|
+
* @param ref A reference or actor of this game by form ID: 0x14 for the player, `References.getEntityBody` for another player or an NPC.
|
|
814
|
+
* @param shader The shader played.
|
|
815
|
+
*/
|
|
816
|
+
stopShader(ref: number | string, shader: number | string): void;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Attaches a visual effect to a reference in this game alone, as VisualEffect.Play does.
|
|
820
|
+
* @param ref A reference or actor of this game by form ID: 0x14 for the player, `References.getEntityBody` for another player or an NPC.
|
|
821
|
+
* @param effect A BGSReferenceEffect (RFCT) form ID.
|
|
822
|
+
* @param seconds How long; until stopVisual when left out.
|
|
823
|
+
* @returns False when the reference is not loaded here or the form is no visual effect.
|
|
824
|
+
*/
|
|
825
|
+
playVisual(ref: number | string, effect: number | string, seconds?: number): boolean;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Takes a visual effect off a reference.
|
|
829
|
+
* @param ref A reference or actor of this game by form ID: 0x14 for the player, `References.getEntityBody` for another player or an NPC.
|
|
830
|
+
* @param effect The visual effect played.
|
|
831
|
+
*/
|
|
832
|
+
stopVisual(ref: number | string, effect: number | string): void;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Plays an impact where a ray from the reference lands, in this game alone, as ObjectReference.PlayImpactEffect does.
|
|
836
|
+
* @param ref A reference or actor of this game by form ID: 0x14 for the player, `References.getEntityBody` for another player or an NPC.
|
|
837
|
+
* @param impactSet A BGSImpactDataSet (IPDS) form ID.
|
|
838
|
+
* @param options The ray: from the named node (the root when left out), along the direction (straight down by default), for the length in game units (512).
|
|
839
|
+
* @returns False when the reference is not loaded here or the ray hit nothing.
|
|
840
|
+
*/
|
|
841
|
+
playImpact(ref: number | string, impactSet: number | string, options?: { node?: string; direction?: Vector3; length?: number }): boolean;
|
|
842
|
+
|
|
693
843
|
/**
|
|
694
844
|
* Applies an image space modifier, as ImageSpaceModifier.Apply does; it runs its own length, and is removed once this resource stops. False when there is no such modifier or no world to run it in.
|
|
695
845
|
* @param modifier An image space modifier (IMAD): its editor ID, or its form ID (a number, or a string starting 0x).
|
|
@@ -931,6 +1081,37 @@ declare global {
|
|
|
931
1081
|
*/
|
|
932
1082
|
setPipboyLight(on: boolean): boolean;
|
|
933
1083
|
|
|
1084
|
+
/**
|
|
1085
|
+
* Holds the player's weapon out or away, as FiveM's SetCurrentPedWeapon forces a ped's: drawn or holstered at once, then kept so against the ready-weapon key and the game. With no weapon in hand, out raises the fists. `Controls.setEnabled("fighting", false)` stops attacks too.
|
|
1086
|
+
* @param drawn True to hold the weapon out, false to keep it away, null to hand it back to the player.
|
|
1087
|
+
*/
|
|
1088
|
+
setWeaponDrawn(drawn: boolean | null): void;
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Loads rounds into the weapon in the player's hands, as FiveM's SetAmmoInClip does a ped's. The rounds come from those the player carries, as a reload takes them: never more than they have; the server's `player.giveItem` gives more.
|
|
1092
|
+
* @param rounds The rounds to load, 0 to 100000; more than the weapon's clip loads a full clip.
|
|
1093
|
+
* @returns False without a weapon that loads ammo in hand.
|
|
1094
|
+
*/
|
|
1095
|
+
setClipAmmo(rounds: number): boolean;
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Takes the player's collision away or gives it back, as FiveM's SetEntityCollision does a ped and the console's tcl the player: without it they move along where they look, through walls and floors, without gravity. An admin's noclip on foot. It comes back when the session ends.
|
|
1099
|
+
* @param enabled False to take the player's collision away, true to give it back.
|
|
1100
|
+
*/
|
|
1101
|
+
setCollision(enabled: boolean): void;
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* Rebuilds the player on another race, as the console's setrace and Actor.SetRace do: a ghoul. Every other player sees their puppet rebuilt the same way; their head parts stay their own. Only human and ghoul are supported; any other race is refused. The race they had comes back with null, and when the session ends.
|
|
1105
|
+
* @param race 0x13746 (HumanRace) or 0xEAFB6 (GhoulRace); null for the race the player had.
|
|
1106
|
+
* @returns False when the player is not standing in the world.
|
|
1107
|
+
*/
|
|
1108
|
+
setRace(race: number | string | null): boolean;
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Whether the player has their collision: false after setCollision(false) or the console's tcl.
|
|
1112
|
+
*/
|
|
1113
|
+
isCollisionEnabled(): boolean;
|
|
1114
|
+
|
|
934
1115
|
/**
|
|
935
1116
|
* Puts the player into a piece of furniture at once, wherever they stand, as Actor.SnapIntoInteraction does: a chair seats them, a bed lays them down, once its animations are loaded. A seated player stands up by moving; one lying in a bed is there until leaveFurniture.
|
|
936
1117
|
* @param furniture The furniture reference: a chair, a bed, a workbench.
|
|
@@ -964,6 +1145,18 @@ declare global {
|
|
|
964
1145
|
*/
|
|
965
1146
|
knockDown(force?: number, from?: { x: number; y: number; z: number }): boolean;
|
|
966
1147
|
|
|
1148
|
+
/**
|
|
1149
|
+
* Where the game places the points of the player's body, in world units: the height of the eyes above the feet in the current pose and the standing height the game keeps for the player, the point others look at, and the four points the game keeps on the body, from the eyes down.
|
|
1150
|
+
* @returns Null while the player is not in the world.
|
|
1151
|
+
*/
|
|
1152
|
+
getBodyPoints(): { eyeLevel: number; standingEyeHeight: number; lookAt: Vector3; parts: Vector3[] } | null;
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* The player's critical meter as the game holds it: the charge towards the next stored critical, how many are stored and how many can be.
|
|
1156
|
+
* @returns Null before the player exists.
|
|
1157
|
+
*/
|
|
1158
|
+
getCritMeter(): { charge: number; stored: number; max: number } | null;
|
|
1159
|
+
|
|
967
1160
|
/**
|
|
968
1161
|
* Whether the player is knocked down: in their ragdoll or getting up from it, by a script or by the game, a blast for one.
|
|
969
1162
|
*/
|
|
@@ -1179,33 +1372,77 @@ declare global {
|
|
|
1179
1372
|
};
|
|
1180
1373
|
|
|
1181
1374
|
/**
|
|
1182
|
-
* The server's clock and sky, as this client holds them. Read-only: the server's `World`
|
|
1375
|
+
* The server's clock, calendar and sky, as this client holds them, and what the sky is doing right now. Read-only: the server's `World`, `Player.setWeather` and `Player.setHour` set them.
|
|
1183
1376
|
*/
|
|
1184
1377
|
const World: {
|
|
1185
1378
|
/**
|
|
1186
|
-
* The game hour the server keeps, 0 to 24.
|
|
1379
|
+
* The game hour the server keeps, 0 to 24; the player's own while a script holds their clock.
|
|
1187
1380
|
* @returns Null before the server's world streams in.
|
|
1188
1381
|
*/
|
|
1189
1382
|
getHour(): number | null;
|
|
1190
1383
|
|
|
1191
1384
|
/**
|
|
1192
|
-
* Game minutes per real minute; 0 holds the clock.
|
|
1385
|
+
* Game minutes per real minute; 0 holds the clock, as it is while a script holds the player's own hour.
|
|
1193
1386
|
* @returns Null before the server's world streams in.
|
|
1194
1387
|
*/
|
|
1195
1388
|
getTimeScale(): number | null;
|
|
1196
1389
|
|
|
1197
1390
|
/**
|
|
1198
|
-
* The
|
|
1391
|
+
* The calendar date the server keeps: the full year, the month 1 to 12, the day of the month.
|
|
1392
|
+
* @returns Null before the server's world streams in.
|
|
1393
|
+
*/
|
|
1394
|
+
getDate(): { year: number; month: number; day: number } | null;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* Whole days the server's clock has run, the game's GameDaysPassed.
|
|
1398
|
+
* @returns Null before the server's world streams in.
|
|
1399
|
+
*/
|
|
1400
|
+
getDaysPassed(): number | null;
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* The TESWeather form ID the server holds the sky to: the player's own while a script gave them one, else the World's.
|
|
1199
1404
|
* @returns Null while the region decides the weather, and before the server's world streams in.
|
|
1200
1405
|
*/
|
|
1201
1406
|
getWeather(): number | null;
|
|
1202
1407
|
|
|
1408
|
+
/**
|
|
1409
|
+
* What the game's sky and clock show right now: the weather it is in or fading to, the one it fades from (null once the fade is done), the override it is held to, how far the fade is from 0 to 1, the game's own hour and day count, whether the whole sky is drawn (outdoors; indoors there is none to fade), and the region whose weathers the sky would roll where the player stands.
|
|
1410
|
+
* @returns Null before the game's data files are loaded.
|
|
1411
|
+
*/
|
|
1412
|
+
getSky(): { weather: number | null; outgoing: number | null; override: number | null; transition: number; hour: number; daysPassed: number; full: boolean; region: number | null } | null;
|
|
1413
|
+
|
|
1414
|
+
/**
|
|
1415
|
+
* The wind the sky is blowing right now: its speed from 0 to 1, the weather's direction in degrees and how many degrees it may swing either side, and the direction the sky drew within that swing, in degrees: the same on every player's sky in a session.
|
|
1416
|
+
* @returns Null before the sky exists.
|
|
1417
|
+
*/
|
|
1418
|
+
getWind(): { speed: number; angle: number; angleRange: number; direction: number } | null;
|
|
1419
|
+
|
|
1203
1420
|
/**
|
|
1204
1421
|
* What a weather is, from this game's data: its kind, its wind from 0 to 1, where its fog starts and ends by day and by night in game units, and the precipitation and screen effect it comes with.
|
|
1205
1422
|
* @param weather A weather (WTHR) by form ID; the one the sky is in or moving to when left out.
|
|
1206
1423
|
* @returns Null when the form is not a weather, or the sky has none yet.
|
|
1207
1424
|
*/
|
|
1208
1425
|
getWeatherInfo(weather?: number | string): { weather: number; kind: "none" | "pleasant" | "cloudy" | "rain" | "snow"; windSpeed: number; fog: { dayNear: number; dayFar: number; nightNear: number; nightFar: number; dayPower: number; nightPower: number; dayMax: number; nightMax: number }; precipitation: number | null; visualEffect: number | null } | null;
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Casts a ray through the physics world the player stands in and tells what it struck first, testing what a bullet's impact would: the ground, buildings, props, clutter and the bodies of actors, passing over the player's own unless the options say otherwise.
|
|
1429
|
+
* @param from Where the ray starts, in game units.
|
|
1430
|
+
* @param to Where it ends.
|
|
1431
|
+
* @param options `ignore`: an actor (form ID in this game, as `References.getEntityBody` gives one) whose own body the ray passes over; the local player when left out, nobody for null.
|
|
1432
|
+
* @returns Whether it struck something before `to`; where; the surface's unit normal there; how far along the ray, 0 to 1; the reference hit (null for the landscape); and, when that is another player's body or an NPC, its network ID as the server knows it (`player.id`, `npc.id`). Without a hit the position is `to`, the fraction 1 and the normal zero. Null before the player is in a cell.
|
|
1433
|
+
*/
|
|
1434
|
+
raycast(from: Vector3, to: Vector3, options?: { ignore?: number | string | null }): { hit: boolean; position: Vector3; normal: Vector3; fraction: number; ref: number | null; entity: number | null } | null;
|
|
1435
|
+
};
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* What the player's own game holds of their quests. Read-only: the server's `Quests` gives quests and sets their objectives.
|
|
1439
|
+
*/
|
|
1440
|
+
const Quests: {
|
|
1441
|
+
/**
|
|
1442
|
+
* Every objective the player's game holds that is not hidden, as its quest log has it.
|
|
1443
|
+
* @returns One entry per objective: the quest's form ID, the objective's index in it and its state. Empty before the player is in the world.
|
|
1444
|
+
*/
|
|
1445
|
+
getObjectives(): { quest: number; index: number; state: "displayed" | "completed" | "failed" }[];
|
|
1209
1446
|
};
|
|
1210
1447
|
|
|
1211
1448
|
/**
|
|
@@ -1249,7 +1486,7 @@ declare global {
|
|
|
1249
1486
|
const References: {
|
|
1250
1487
|
/**
|
|
1251
1488
|
* Has the local player activate the reference, wherever they stand, as ObjectReference.Activate does: a door opens, an item is picked up, a container shows its menu. Raises `activate` like any other.
|
|
1252
|
-
* @param ref The reference's form ID.
|
|
1489
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1253
1490
|
* @param defaultProcessingOnly Skip what the reference's own scripts would do about it (default false).
|
|
1254
1491
|
* @returns False when the reference is not loaded here or the game activated nothing.
|
|
1255
1492
|
*/
|
|
@@ -1257,7 +1494,7 @@ declare global {
|
|
|
1257
1494
|
|
|
1258
1495
|
/**
|
|
1259
1496
|
* What a reference is and where it stands: the form ID of the base object it is placed from, its position in world units and its rotation in radians about the X, Y and Z axes.
|
|
1260
|
-
* @param ref The reference's form ID.
|
|
1497
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1261
1498
|
* @returns Null when the reference is not here.
|
|
1262
1499
|
*/
|
|
1263
1500
|
getInfo(ref: number | string): { base: number; position: { x: number; y: number; z: number }; rotation: { x: number; y: number; z: number } } | null;
|
|
@@ -1273,7 +1510,7 @@ declare global {
|
|
|
1273
1510
|
|
|
1274
1511
|
/**
|
|
1275
1512
|
* Sends an animation event to the reference's behavior graph, as ObjectReference.PlayAnimation does: a machine starts, a prop moves, without the activation and what it would trigger. Seen in this game alone. Only objects animated by a behavior graph take one; `getAnimationGraph` tells which are.
|
|
1276
|
-
* @param ref The reference's form ID.
|
|
1513
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1277
1514
|
* @param event The animation event's name, as the object's behavior graph knows it.
|
|
1278
1515
|
* @returns False when the reference is not loaded here or no graph of its took the event.
|
|
1279
1516
|
*/
|
|
@@ -1281,22 +1518,22 @@ declare global {
|
|
|
1281
1518
|
|
|
1282
1519
|
/**
|
|
1283
1520
|
* The name of the behavior graph that animates the reference, the one `playAnimation` sends its events to.
|
|
1284
|
-
* @param ref The reference's form ID.
|
|
1521
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1285
1522
|
* @returns Null when the reference is not loaded here or no behavior graph animates it.
|
|
1286
1523
|
*/
|
|
1287
1524
|
getAnimationGraph(ref: number | string): string | null;
|
|
1288
1525
|
|
|
1289
1526
|
/**
|
|
1290
1527
|
* Says whether the physics moves an object, as ObjectReference.SetMotionType does: freeze a crate in mid-air, or let a fixed prop fall. In this game alone.
|
|
1291
|
-
* @param ref The reference's form ID.
|
|
1528
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1292
1529
|
* @param type Dynamic: the physics moves it, so it falls and can be pushed. Keyframed: it stays where it is put, whatever hits it.
|
|
1293
|
-
* @returns False when the reference is not loaded here
|
|
1530
|
+
* @returns False when the reference is not loaded here, its model has no physics, or it is an actor.
|
|
1294
1531
|
*/
|
|
1295
1532
|
setMotionType(ref: number | string, type: "dynamic" | "keyframed"): boolean;
|
|
1296
1533
|
|
|
1297
1534
|
/**
|
|
1298
1535
|
* Pushes an object the physics moves, as ObjectReference.ApplyHavokImpulse does: a can flies, a crate slides. In this game alone, as its physics are.
|
|
1299
|
-
* @param ref The reference's form ID.
|
|
1536
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1300
1537
|
* @param direction Which way to push, in world axes; its length does not matter.
|
|
1301
1538
|
* @param magnitude How hard, as ObjectReference.ApplyHavokImpulse takes it; the game scales it by the object's mass.
|
|
1302
1539
|
* @returns False when the reference is not loaded here or nothing of it is a physics body. A body the physics holds fixed takes the push and stays where it is.
|
|
@@ -1328,28 +1565,28 @@ declare global {
|
|
|
1328
1565
|
|
|
1329
1566
|
/**
|
|
1330
1567
|
* Opens the game's container menu on a container, wherever the player stands, as activating it does but without its lock or its opening animation. In a session the server's `containerOpen` runs first and the menu opens once it lets the player in, holding what a server script filled the container with there: a stash or a shop of the player's own.
|
|
1331
|
-
* @param ref The reference's form ID.
|
|
1568
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1332
1569
|
* @returns False when the reference is not loaded here or is no container, when another player has it open, or while this player has a container open.
|
|
1333
1570
|
*/
|
|
1334
1571
|
openContainer(ref: number | string): boolean;
|
|
1335
1572
|
|
|
1336
1573
|
/**
|
|
1337
1574
|
* Opens the give-and-take screen on an actor, the one the game shows for a companion, as Actor.OpenInventory does when forced.
|
|
1338
|
-
* @param ref The reference's form ID.
|
|
1575
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1339
1576
|
* @returns False when the reference is no actor loaded here.
|
|
1340
1577
|
*/
|
|
1341
1578
|
openTrade(ref: number | string): boolean;
|
|
1342
1579
|
|
|
1343
1580
|
/**
|
|
1344
1581
|
* Opens the game's barter screen on an actor, as Actor.ShowBarterMenu does: it sells what the game works out as that actor's vendor stock.
|
|
1345
|
-
* @param ref The reference's form ID.
|
|
1582
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1346
1583
|
* @returns False when the reference is no actor loaded here.
|
|
1347
1584
|
*/
|
|
1348
1585
|
showBarterMenu(ref: number | string): boolean;
|
|
1349
1586
|
|
|
1350
1587
|
/**
|
|
1351
1588
|
* An actor value on the reference, as ObjectReference.GetValue reads it. A workbench keeps its settlement's figures this way: its build budget, its population, its power.
|
|
1352
|
-
* @param ref The reference's form ID.
|
|
1589
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1353
1590
|
* @param value An ActorValueInfo form ID.
|
|
1354
1591
|
* @returns Null when the reference is not here or the form ID is no actor value.
|
|
1355
1592
|
*/
|
|
@@ -1357,7 +1594,7 @@ declare global {
|
|
|
1357
1594
|
|
|
1358
1595
|
/**
|
|
1359
1596
|
* Sets an actor value on the reference, as ObjectReference.SetValue does.
|
|
1360
|
-
* @param ref The reference's form ID.
|
|
1597
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1361
1598
|
* @param value An ActorValueInfo form ID.
|
|
1362
1599
|
* @param amount The new value.
|
|
1363
1600
|
* @returns False when the reference is not here or the form ID is no actor value.
|
|
@@ -1366,28 +1603,28 @@ declare global {
|
|
|
1366
1603
|
|
|
1367
1604
|
/**
|
|
1368
1605
|
* A map marker's state on this player's map: whether it shows, whether it is a fast travel destination, and its icon type. The server changes it with `Player.discoverLocations` and `forgetLocations`.
|
|
1369
|
-
* @param ref The reference's form ID.
|
|
1606
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1370
1607
|
* @returns Null when the reference is not here or is no map marker.
|
|
1371
1608
|
*/
|
|
1372
1609
|
getMapMarker(ref: number | string): { visible: boolean; canTravel: boolean; type: number } | null;
|
|
1373
1610
|
|
|
1374
1611
|
/**
|
|
1375
1612
|
* Whether the reference is in this game with its 3D loaded.
|
|
1376
|
-
* @param ref The reference's form ID.
|
|
1613
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1377
1614
|
* @returns False when it is not here.
|
|
1378
1615
|
*/
|
|
1379
1616
|
isLoaded(ref: number | string): boolean;
|
|
1380
1617
|
|
|
1381
1618
|
/**
|
|
1382
1619
|
* The reference's scale, 1 being its normal size.
|
|
1383
|
-
* @param ref The reference's form ID.
|
|
1620
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1384
1621
|
* @returns Null when it is not here.
|
|
1385
1622
|
*/
|
|
1386
1623
|
getScale(ref: number | string): number | null;
|
|
1387
1624
|
|
|
1388
1625
|
/**
|
|
1389
1626
|
* Scales the reference.
|
|
1390
|
-
* @param ref The reference's form ID.
|
|
1627
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1391
1628
|
* @param scale 0.01 to 10.
|
|
1392
1629
|
* @returns False when it is not here.
|
|
1393
1630
|
*/
|
|
@@ -1395,14 +1632,14 @@ declare global {
|
|
|
1395
1632
|
|
|
1396
1633
|
/**
|
|
1397
1634
|
* The level a pick attempt on the reference's lock faces.
|
|
1398
|
-
* @param ref The reference's form ID.
|
|
1635
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1399
1636
|
* @returns Null when it is not here or has no lock.
|
|
1400
1637
|
*/
|
|
1401
1638
|
getLockLevel(ref: number | string): number | null;
|
|
1402
1639
|
|
|
1403
1640
|
/**
|
|
1404
1641
|
* Sets the level of the reference's lock; one with no lock gets an unlocked one.
|
|
1405
|
-
* @param ref The reference's form ID.
|
|
1642
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1406
1643
|
* @param level 0 to 255.
|
|
1407
1644
|
* @returns False when it is not here.
|
|
1408
1645
|
*/
|
|
@@ -1410,14 +1647,14 @@ declare global {
|
|
|
1410
1647
|
|
|
1411
1648
|
/**
|
|
1412
1649
|
* The game's destroyed flag.
|
|
1413
|
-
* @param ref The reference's form ID.
|
|
1650
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1414
1651
|
* @returns False when it is not here.
|
|
1415
1652
|
*/
|
|
1416
1653
|
isDestroyed(ref: number | string): boolean;
|
|
1417
1654
|
|
|
1418
1655
|
/**
|
|
1419
1656
|
* Sets the game's destroyed flag: a destroyed reference cannot be activated.
|
|
1420
|
-
* @param ref The reference's form ID.
|
|
1657
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1421
1658
|
* @param destroyed The flag.
|
|
1422
1659
|
* @returns False when it is not here.
|
|
1423
1660
|
*/
|
|
@@ -1425,14 +1662,14 @@ declare global {
|
|
|
1425
1662
|
|
|
1426
1663
|
/**
|
|
1427
1664
|
* Whether a flora or produce reference is picked.
|
|
1428
|
-
* @param ref The reference's form ID.
|
|
1665
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1429
1666
|
* @returns False when it is not here.
|
|
1430
1667
|
*/
|
|
1431
1668
|
isHarvested(ref: number | string): boolean;
|
|
1432
1669
|
|
|
1433
1670
|
/**
|
|
1434
1671
|
* Shows a flora or produce reference picked, or grown back.
|
|
1435
|
-
* @param ref The reference's form ID.
|
|
1672
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1436
1673
|
* @param harvested The flag.
|
|
1437
1674
|
* @returns False when it is not here or is neither.
|
|
1438
1675
|
*/
|
|
@@ -1440,14 +1677,21 @@ declare global {
|
|
|
1440
1677
|
|
|
1441
1678
|
/**
|
|
1442
1679
|
* Whether activating the reference is refused.
|
|
1443
|
-
* @param ref The reference's form ID.
|
|
1680
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1444
1681
|
* @returns False when it is not here.
|
|
1445
1682
|
*/
|
|
1446
1683
|
isActivationBlocked(ref: number | string): boolean;
|
|
1447
1684
|
|
|
1685
|
+
/**
|
|
1686
|
+
* Whether the reference is in the world: false once ObjectReference.Disable, a quest's enable parent or the server's `Objects.setEnabled` took it out.
|
|
1687
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1688
|
+
* @returns Null when this game holds no such reference now.
|
|
1689
|
+
*/
|
|
1690
|
+
isEnabled(ref: number | string): boolean | null;
|
|
1691
|
+
|
|
1448
1692
|
/**
|
|
1449
1693
|
* Blocks or allows activating the reference.
|
|
1450
|
-
* @param ref The reference's form ID.
|
|
1694
|
+
* @param ref The reference's form ID: a placed object, or an actor's, such as a body getEntityBody, World.raycast or the crosshair gives.
|
|
1451
1695
|
* @param blocked The flag.
|
|
1452
1696
|
* @returns False when it is not here.
|
|
1453
1697
|
*/
|