connected-spaces-platform.web 5.16.0 → 5.17.1

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.
@@ -229,7 +229,7 @@ export declare namespace Multiplayer {
229
229
  * Add means the component is newly added, clients should ensure that this triggers appropriate instantiation of wrapping objects.
230
230
  * All properties for the component should be included.
231
231
  * Delete means the component has been marked for deletion. It is likely that some other clients will not have the component at the point this is
232
- * recieved. Any wrapping data objects should be deleted when this is recieved, and clients should cease updating this component as any call would
232
+ * received. Any wrapping data objects should be deleted when this is received, and clients should cease updating this component as any call would
233
233
  * fail. The CSP representation of the component has been removed at this point.
234
234
  */
235
235
  enum ComponentUpdateType {
@@ -1250,235 +1250,6 @@ export declare namespace Web {
1250
1250
  ResponseNetworkAuthenticationRequired = 511
1251
1251
  }
1252
1252
  }
1253
- export declare namespace Multiplayer {
1254
- /**
1255
- * @description The serialiser is responsible for converting a SpaceEntity instance into a data structure that both SignalR
1256
- * and our servers can understand and use.
1257
- * /// To use the serialiser, Start with BeginEntity(), then use the write(bool, int, etc) functions to write data at the
1258
- * Entity level. Use BeginComponents() to start writing as the Server component data, with each BeginComponent and
1259
- * EndComponent brace dictating information written into a server component. Within a component, use WriteProperty()
1260
- * to write the individual data. Ensure you finish by closing out the relevant sections with the 'End' functions.
1261
- */
1262
- interface IEntitySerialiser {
1263
- /**
1264
- * @description Start the serialisiation.
1265
- */
1266
- beginEntity: () => void;
1267
- /**
1268
- * @description End the serialisiation.
1269
- */
1270
- endEntity: () => void;
1271
- /**
1272
- * @description Write a boolean field of the entity.
1273
- * @param value - The value to write.
1274
- */
1275
- writeBool: (value: boolean) => void;
1276
- /**
1277
- * @description Write a byte field of the entity.
1278
- * @param value - The value to write.
1279
- */
1280
- writeByte: (value: number) => void;
1281
- /**
1282
- * @description Write a double field of the entity.
1283
- * @param value - The value to write.
1284
- */
1285
- writeDouble: (value: number) => void;
1286
- /**
1287
- * @description Write an int64_t field of the entity.
1288
- * @param value - The value to write.
1289
- */
1290
- writeInt64: (value: bigint) => void;
1291
- /**
1292
- * @description Write a uint64_t field of the entity.
1293
- * @param value - The value to write.
1294
- */
1295
- writeUInt64: (value: bigint) => void;
1296
- /**
1297
- * @description Write a string field of the entity.
1298
- * @param value - The value to write.
1299
- */
1300
- writeString: (value: string) => void;
1301
- /**
1302
- * @description Write a null field of the entity.
1303
- */
1304
- writeNull: () => void;
1305
- /**
1306
- * @description Start an array section.
1307
- */
1308
- beginArray: () => void;
1309
- /**
1310
- * @description Finish an array section.
1311
- */
1312
- endArray: () => void;
1313
- /**
1314
- * @description Start the components section.
1315
- */
1316
- beginComponents: () => void;
1317
- /**
1318
- * @description Finish the components section
1319
- */
1320
- endComponents: () => void;
1321
- /**
1322
- * @description Begin writing component with the given ID and type.
1323
- * @param id - The ID of the component.
1324
- */
1325
- beginComponent: (id: number, type: bigint) => void;
1326
- /**
1327
- * @description Finish a component section.
1328
- */
1329
- endComponent: () => void;
1330
- /**
1331
- * @description Write the given component property.
1332
- * @param id - ID of the component property.
1333
- * @param value - The value to be written.
1334
- */
1335
- writeProperty: (id: bigint, value: Multiplayer.ReplicatedValue) => void;
1336
- /**
1337
- * @description Specific handler for writing view components.
1338
- * /// View Components are data that is stored in specific keys on the server, it allows us to discretely update these
1339
- * singular data pieces, rather than replicating larger chunks of data, and also allows us to always know where
1340
- * in a data structure this data will be.
1341
- * /// @param Id uint16_t : The ID of the component
1342
- * @param value - The value of the component data to add
1343
- */
1344
- addViewComponent: (id: number, value: Multiplayer.ReplicatedValue) => void;
1345
- }
1346
- }
1347
- export declare namespace Multiplayer {
1348
- /**
1349
- * @description The deserialiser is used to take recieved signalr message data and turn it into values you can use to populate a SpaceEntity.
1350
- * /// This works similarly to the serialiser and you can refer to the serialiser for more details.
1351
- * It is expected that you will be using the data as you read it to populate either a newly created or currently existing SpaceEntity.
1352
- */
1353
- interface IEntityDeserialiser {
1354
- /**
1355
- * @description Starts the deserialisation.
1356
- */
1357
- enterEntity: () => void;
1358
- /**
1359
- * @description Ends the deserialisation.
1360
- */
1361
- leaveEntity: () => void;
1362
- /**
1363
- * @description Reads a boolean from the deserialiser.
1364
- * @return The deserialised boolean.
1365
- */
1366
- readBool: () => boolean;
1367
- /**
1368
- * @description Reads a byte from the deserialiser.
1369
- * @return The deserialised byte.
1370
- */
1371
- readByte: () => number;
1372
- /**
1373
- * @description Reads a double from the deserialiser.
1374
- * @return The deserialised double.
1375
- */
1376
- readDouble: () => number;
1377
- /**
1378
- * @description Reads an int64_t from the deserialiser.
1379
- * @return The deserialised boolean.
1380
- */
1381
- readInt64: () => bigint;
1382
- /**
1383
- * @description Reads a uint64_t from the deserialiser.
1384
- * @return The deserialised uint64_t.
1385
- */
1386
- readUInt64: () => bigint;
1387
- /**
1388
- * @description Reads a string from the deserialiser.
1389
- * @return The deserialised string.
1390
- */
1391
- readString: () => string;
1392
- /**
1393
- * @description Reads a vector2 from the deserialiser.
1394
- * @return The deserialised vector2.
1395
- */
1396
- readVector2: () => Common.Vector2;
1397
- /**
1398
- * @description Reads a vector3 from the deserialiser.
1399
- * @return The deserialised vector3.
1400
- */
1401
- readVector3: () => Common.Vector3;
1402
- /**
1403
- * @description Reads a vector4 from the deserialiser.
1404
- * @return The deserialised vector4.
1405
- */
1406
- readVector4: () => Common.Vector4;
1407
- /**
1408
- * @description Checks if the next value is null.
1409
- * @return True if the next value is null, false otherwise.
1410
- */
1411
- nextValueIsNull: () => boolean;
1412
- /**
1413
- * @description Checks if the next value is an array.
1414
- * @return True if the next value is null, false otherwise.
1415
- */
1416
- nextValueIsArray: () => boolean;
1417
- /**
1418
- * @description Puts the deserialiser into array processing mode to begin reading from an array.
1419
- * @param outLength - A reference to variable to store the length of the array.
1420
- */
1421
- enterArray: (outLength: NativeRef) => void;
1422
- /**
1423
- * @description Completes reading from and array and leaves the array processing mode.
1424
- */
1425
- leaveArray: () => void;
1426
- /**
1427
- * @description Puts the deserialiser into component processing mode to begin reading from the components section of the serialised entity.
1428
- */
1429
- enterComponents: () => void;
1430
- /**
1431
- * @description Completes reading the components and exits that mode.
1432
- */
1433
- leaveComponents: () => void;
1434
- /**
1435
- * @description Gets the total number of components, including view components.
1436
- * /// If iterating components by this count, subtract number of view components.
1437
- * /// @return The number of components.
1438
- */
1439
- getNumComponents: () => bigint;
1440
- /**
1441
- * @description Gets the number of components that are not view components.
1442
- * @return The number of non-view components.
1443
- */
1444
- getNumRealComponents: () => bigint;
1445
- /**
1446
- * @description Begins the processes of deserialising a single component that is not a view component.
1447
- */
1448
- enterComponent: (outId: NativeRef, outType: NativeRef) => void;
1449
- /**
1450
- * @description Completes the deserialisation of a single component.
1451
- */
1452
- leaveComponent: () => void;
1453
- /**
1454
- * @description Gets the number of properties in the component that is currently being deserialised.
1455
- * @return The number of properties in the component.
1456
- */
1457
- getNumProperties: () => bigint;
1458
- /**
1459
- * @description Reads a property from the deserialiser, returning it as a ReplicatedValue.
1460
- * @param outId - A reference to a variable to store the ID of the property.
1461
- * @return The property value.
1462
- */
1463
- readProperty: (outId: NativeRef) => Multiplayer.ReplicatedValue;
1464
- /**
1465
- * @description Reads a view component from the deserialiser, returning it as a ReplicatedValue.
1466
- * /// Since view components are handled differently in the serialiser, they are similarly deserialised in their own way.
1467
- * /// @return The view component value.
1468
- */
1469
- getViewComponent: (id: number) => Multiplayer.ReplicatedValue;
1470
- /**
1471
- * @description Gets whether there is a view component with the given ID.
1472
- * @param id - The ID of the component.
1473
- * @return True if there is a view component, false otherwise.
1474
- */
1475
- hasViewComponent: (id: number) => boolean;
1476
- /**
1477
- * @description Skips a field when deserialising the SpaceEntity fields.
1478
- */
1479
- skip: () => void;
1480
- }
1481
- }
1482
1253
  export declare namespace Multiplayer {
1483
1254
  /**
1484
1255
  * @description Controls whether a component is enabled or disabled.
@@ -3780,7 +3551,7 @@ export declare namespace Multiplayer {
3780
3551
  @ingroup Multiplayer
3781
3552
  * @description Handling of all network events.
3782
3553
  */
3783
- class EventBus extends NativeClassWrapper {
3554
+ class EventBus extends NativeClassWrapper implements INativeResource {
3784
3555
  /** @internal */
3785
3556
  constructor(pointer: NativePointer);
3786
3557
  /**
@@ -3814,6 +3585,7 @@ export declare namespace Multiplayer {
3814
3585
  * @description Instructs the event bus to start listening to messages
3815
3586
  */
3816
3587
  startEventMessageListening(): void;
3588
+ delete(): void;
3817
3589
  }
3818
3590
  }
3819
3591
  export declare namespace Multiplayer {
@@ -3920,7 +3692,7 @@ export declare namespace Multiplayer {
3920
3692
  @ingroup Multiplayer
3921
3693
  * @description Handling of all multiplayer connection functionality, such as connect, disconnect, entity replication and network events.
3922
3694
  */
3923
- class MultiplayerConnection extends NativeClassWrapper {
3695
+ class MultiplayerConnection extends NativeClassWrapper implements INativeResource {
3924
3696
  /** @internal */
3925
3697
  constructor(pointer: NativePointer);
3926
3698
  /**
@@ -3951,7 +3723,7 @@ export declare namespace Multiplayer {
3951
3723
  getConnectionState(): Multiplayer.ConnectionState;
3952
3724
  /**
3953
3725
  * @description Sets the Self Messaging flag for this client.
3954
- * This allows a client to declare that it wishes to recieve every patch and object message it sends.
3726
+ * This allows a client to declare that it wishes to receive every patch and object message it sends.
3955
3727
  @warning Don't use this function if you aren't sure of the consequences, it's very unlikely that a client would want to use this!
3956
3728
  * @param allowSelfMessaging - True to allow and false to disallow.
3957
3729
  * @param callback - A callback with failure state.
@@ -3962,6 +3734,7 @@ export declare namespace Multiplayer {
3962
3734
  * @return True if self messaging is allowed, false otherwise.
3963
3735
  */
3964
3736
  getAllowSelfMessagingFlag(): boolean;
3737
+ delete(): void;
3965
3738
  }
3966
3739
  }
3967
3740
  export declare namespace Multiplayer {
@@ -4245,8 +4018,8 @@ export declare namespace Multiplayer {
4245
4018
  */
4246
4019
  setScale(value: Common.Vector3): void;
4247
4020
  /**
4248
- * @description Get whether the space is transient or persistant.
4249
- * @return Returns true if the space is transient and false if it is marked as persistant.
4021
+ * @description Get whether the space is transient or persistent.
4022
+ * @return Returns true if the space is transient and false if it is marked as persistent.
4250
4023
  */
4251
4024
  getIsTransient(): boolean;
4252
4025
  /**
@@ -4325,7 +4098,7 @@ export declare namespace Multiplayer {
4325
4098
  * @description Set a callback to be executed when a patch message is received for this Entity. Only one callback can be set.
4326
4099
  * @param callback - Contains the SpaceEntity that updated, a set of flags to tell which parts updated
4327
4100
  * and an array of information to tell which components updated.
4328
- * When this callback is recieved, the flags and arrays should be used to determine which properties have updated data.
4101
+ * When this callback is received, the flags and arrays should be used to determine which properties have updated data.
4329
4102
  */
4330
4103
  setUpdateCallback(callback: (arg1: Multiplayer.SpaceEntity, arg2: Multiplayer.SpaceEntityUpdateFlags, arg3: Common.Array<Multiplayer.ComponentUpdateInfo>) => void): void;
4331
4104
  /**
@@ -4363,27 +4136,6 @@ export declare namespace Multiplayer {
4363
4136
  * /// @param Key uint16_t : The component ID of the component to remove.
4364
4137
  */
4365
4138
  removeComponent(key: number): void;
4366
- /**
4367
- * @description Serialise local changes into patch message format into the given serialiser. Does not send a patch.
4368
- * @param serialiser - The serialiser to use.
4369
- */
4370
- serialisePatch(serialiser: Multiplayer.IEntitySerialiser): void;
4371
- /**
4372
- * @description Serialise the entire SpaceEntity into object message format into the given serialiser. Does not send a message.
4373
- * @param serialiser - The serialiser to use.
4374
- */
4375
- serialise(serialiser: Multiplayer.IEntitySerialiser): void;
4376
- /**
4377
- * @description Serialises a given component into a consistent format for the given serialiser.
4378
- * @param serialiser - The serialiser to use.
4379
- * @param component - The component to be serialised.
4380
- */
4381
- serialiseComponent(serialiser: Multiplayer.IEntitySerialiser, component: Multiplayer.ComponentBase): void;
4382
- /**
4383
- * @description Using the given deserialiser, populate the SpaceEntity with the data in the deserialiser.
4384
- * @param deserialiser - The deserialiser to use.
4385
- */
4386
- deserialise(deserialiser: Multiplayer.IEntityDeserialiser): void;
4387
4139
  /**
4388
4140
  * @description Gets the script associated with the space entity.
4389
4141
  * @return The EntityScript instance set on the entity.
@@ -4449,7 +4201,7 @@ export declare namespace Multiplayer {
4449
4201
  * can be registered for certain events that occur within the entity system so clients can
4450
4202
  * react appropriately.
4451
4203
  */
4452
- class SpaceEntitySystem extends NativeClassWrapper {
4204
+ class SpaceEntitySystem extends NativeClassWrapper implements INativeResource {
4453
4205
  /** @internal */
4454
4206
  constructor(pointer: NativePointer);
4455
4207
  /**
@@ -4658,15 +4410,16 @@ export declare namespace Multiplayer {
4658
4410
  * \rst
4659
4411
  * .. note::
4660
4412
  * If disabling this feature, more requests will be made to Magnopus Connected Services,
4661
- * and consequntly more patch merges may occur on the server as a result.
4413
+ * and consequently more patch merges may occur on the server as a result.
4662
4414
  * \endrst
4663
4415
  */
4664
4416
  setEntityPatchRateLimitEnabled(enabled: boolean): void;
4665
4417
  /**
4666
- * @description Retrieves all entites that exist at the root level (do not have a parent entity).
4418
+ * @description Retrieves all entities that exist at the root level (do not have a parent entity).
4667
4419
  * @return A list of root entities.
4668
4420
  */
4669
4421
  getRootHierarchyEntities(): Common.List<Multiplayer.SpaceEntity>;
4422
+ delete(): void;
4670
4423
  }
4671
4424
  }
4672
4425
  export declare namespace Multiplayer {
@@ -4825,6 +4578,11 @@ export declare namespace Multiplayer {
4825
4578
  * @return True if there was an error, false otherwise.
4826
4579
  */
4827
4580
  hasError(): boolean;
4581
+ /**
4582
+ * @description Checks if the entity has a script component.
4583
+ * @return True if component exist, false otherwise.
4584
+ */
4585
+ hasEntityScriptComponent(): boolean;
4828
4586
  /**
4829
4587
  * @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
4830
4588
  * @return Text of the last error.
@@ -1999,7 +1999,7 @@ export var Multiplayer;
1999
1999
  * Add means the component is newly added, clients should ensure that this triggers appropriate instantiation of wrapping objects.
2000
2000
  * All properties for the component should be included.
2001
2001
  * Delete means the component has been marked for deletion. It is likely that some other clients will not have the component at the point this is
2002
- * recieved. Any wrapping data objects should be deleted when this is recieved, and clients should cease updating this component as any call would
2002
+ * received. Any wrapping data objects should be deleted when this is received, and clients should cease updating this component as any call would
2003
2003
  * fail. The CSP representation of the component has been removed at this point.
2004
2004
  */
2005
2005
  let ComponentUpdateType;
@@ -9547,6 +9547,12 @@ export class CSPFoundation {
9547
9547
  startEventMessageListening() {
9548
9548
  Module.ccall("csp_multiplayer_EventBus_StartEventMessageListening_void", "void", ["number"], [this.pointer]);
9549
9549
  }
9550
+ delete() {
9551
+ if (this.ownsPointer && !this.disposed) {
9552
+ Module.ccall("csp_multiplayer_EventBus_Dtor", "void", ["number"], [this.pointer]);
9553
+ this.disposed = true;
9554
+ }
9555
+ }
9550
9556
  }
9551
9557
  Multiplayer.EventBus = EventBus;
9552
9558
  })(Multiplayer || (Multiplayer = {}));
@@ -9916,7 +9922,7 @@ export class CSPFoundation {
9916
9922
  }
9917
9923
  /**
9918
9924
  * @description Sets the Self Messaging flag for this client.
9919
- * This allows a client to declare that it wishes to recieve every patch and object message it sends.
9925
+ * This allows a client to declare that it wishes to receive every patch and object message it sends.
9920
9926
  @warning Don't use this function if you aren't sure of the consequences, it's very unlikely that a client would want to use this!
9921
9927
  * @param allowSelfMessaging - True to allow and false to disallow.
9922
9928
  * @param callback - A callback with failure state.
@@ -9943,6 +9949,12 @@ export class CSPFoundation {
9943
9949
  let _result = Module.ccall("csp_multiplayer_MultiplayerConnection_GetAllowSelfMessagingFlagC_bool", "boolean", ["number"], [this.pointer]);
9944
9950
  return _result;
9945
9951
  }
9952
+ delete() {
9953
+ if (this.ownsPointer && !this.disposed) {
9954
+ Module.ccall("csp_multiplayer_MultiplayerConnection_Dtor", "void", ["number"], [this.pointer]);
9955
+ this.disposed = true;
9956
+ }
9957
+ }
9946
9958
  }
9947
9959
  Multiplayer.MultiplayerConnection = MultiplayerConnection;
9948
9960
  })(Multiplayer || (Multiplayer = {}));
@@ -10469,8 +10481,8 @@ export class CSPFoundation {
10469
10481
  Module.ccall("csp_multiplayer_SpaceEntity_SetScale_void_Vector3RC", "void", ["number", "number"], [this.pointer, value.pointer]);
10470
10482
  }
10471
10483
  /**
10472
- * @description Get whether the space is transient or persistant.
10473
- * @return Returns true if the space is transient and false if it is marked as persistant.
10484
+ * @description Get whether the space is transient or persistent.
10485
+ * @return Returns true if the space is transient and false if it is marked as persistent.
10474
10486
  */
10475
10487
  getIsTransient() {
10476
10488
  let _result = Module.ccall("csp_multiplayer_SpaceEntity_GetIsTransientC_bool", "boolean", ["number"], [this.pointer]);
@@ -10622,7 +10634,7 @@ export class CSPFoundation {
10622
10634
  * @description Set a callback to be executed when a patch message is received for this Entity. Only one callback can be set.
10623
10635
  * @param callback - Contains the SpaceEntity that updated, a set of flags to tell which parts updated
10624
10636
  * and an array of information to tell which components updated.
10625
- * When this callback is recieved, the flags and arrays should be used to determine which properties have updated data.
10637
+ * When this callback is received, the flags and arrays should be used to determine which properties have updated data.
10626
10638
  */
10627
10639
  setUpdateCallback(callback) {
10628
10640
  var _callback = (_stateObject__, arg1, arg2, arg3) => {
@@ -10706,39 +10718,6 @@ export class CSPFoundation {
10706
10718
  assert(key <= Limits.UINT16_MAX);
10707
10719
  Module.ccall("csp_multiplayer_SpaceEntity_RemoveComponent_void_uint16_t", "void", ["number", "number"], [this.pointer, key]);
10708
10720
  }
10709
- /**
10710
- * @description Serialise local changes into patch message format into the given serialiser. Does not send a patch.
10711
- * @param serialiser - The serialiser to use.
10712
- */
10713
- serialisePatch(serialiser) {
10714
- Module.ccall("csp_multiplayer_SpaceEntity_SerialisePatchC_void_IEntitySerialiserR", "void", ["number", "number"], [this.pointer, serialiser.pointer]);
10715
- }
10716
- /**
10717
- * @description Serialise the entire SpaceEntity into object message format into the given serialiser. Does not send a message.
10718
- * @param serialiser - The serialiser to use.
10719
- */
10720
- serialise(serialiser) {
10721
- Module.ccall("csp_multiplayer_SpaceEntity_SerialiseC_void_IEntitySerialiserR", "void", ["number", "number"], [this.pointer, serialiser.pointer]);
10722
- }
10723
- /**
10724
- * @description Serialises a given component into a consistent format for the given serialiser.
10725
- * @param serialiser - The serialiser to use.
10726
- * @param component - The component to be serialised.
10727
- */
10728
- serialiseComponent(serialiser, component) {
10729
- Module.ccall("csp_multiplayer_SpaceEntity_SerialiseComponentC_void_IEntitySerialiserR_ComponentBaseP", "void", ["number", "number", "number"], [
10730
- this.pointer,
10731
- serialiser.pointer,
10732
- component.pointer,
10733
- ]);
10734
- }
10735
- /**
10736
- * @description Using the given deserialiser, populate the SpaceEntity with the data in the deserialiser.
10737
- * @param deserialiser - The deserialiser to use.
10738
- */
10739
- deserialise(deserialiser) {
10740
- Module.ccall("csp_multiplayer_SpaceEntity_Deserialise_void_IEntityDeserialiserR", "void", ["number", "number"], [this.pointer, deserialiser.pointer]);
10741
- }
10742
10721
  /**
10743
10722
  * @description Gets the script associated with the space entity.
10744
10723
  * @return The EntityScript instance set on the entity.
@@ -11243,14 +11222,14 @@ export class CSPFoundation {
11243
11222
  * \rst
11244
11223
  * .. note::
11245
11224
  * If disabling this feature, more requests will be made to Magnopus Connected Services,
11246
- * and consequntly more patch merges may occur on the server as a result.
11225
+ * and consequently more patch merges may occur on the server as a result.
11247
11226
  * \endrst
11248
11227
  */
11249
11228
  setEntityPatchRateLimitEnabled(enabled) {
11250
11229
  Module.ccall("csp_multiplayer_SpaceEntitySystem_SetEntityPatchRateLimitEnabled_void_bool", "void", ["number", "boolean"], [this.pointer, enabled]);
11251
11230
  }
11252
11231
  /**
11253
- * @description Retrieves all entites that exist at the root level (do not have a parent entity).
11232
+ * @description Retrieves all entities that exist at the root level (do not have a parent entity).
11254
11233
  * @return A list of root entities.
11255
11234
  */
11256
11235
  getRootHierarchyEntities() {
@@ -11260,6 +11239,12 @@ export class CSPFoundation {
11260
11239
  Module._free(_ret);
11261
11240
  return _nPtr;
11262
11241
  }
11242
+ delete() {
11243
+ if (this.ownsPointer && !this.disposed) {
11244
+ Module.ccall("csp_multiplayer_SpaceEntitySystem_Dtor", "void", ["number"], [this.pointer]);
11245
+ this.disposed = true;
11246
+ }
11247
+ }
11263
11248
  }
11264
11249
  Multiplayer.SpaceEntitySystem = SpaceEntitySystem;
11265
11250
  })(Multiplayer || (Multiplayer = {}));
@@ -11645,6 +11630,14 @@ export class CSPFoundation {
11645
11630
  let _result = Module.ccall("csp_multiplayer_EntityScript_HasError_bool", "boolean", ["number"], [this.pointer]);
11646
11631
  return _result;
11647
11632
  }
11633
+ /**
11634
+ * @description Checks if the entity has a script component.
11635
+ * @return True if component exist, false otherwise.
11636
+ */
11637
+ hasEntityScriptComponent() {
11638
+ let _result = Module.ccall("csp_multiplayer_EntityScript_HasEntityScriptComponent_bool", "boolean", ["number"], [this.pointer]);
11639
+ return _result;
11640
+ }
11648
11641
  /**
11649
11642
  * @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
11650
11643
  * @return Text of the last error.