History

Script API for subscribing to entity server messages

ksuprynowicz committed 2 years ago

Commit c311d3c1 parent d75efdb7 files · +132 −10Browse files

Showing the changes to libraries/script-engine/src/ScriptManagerScriptingInterface.h (1 of 7 files). Show all

Unified · Split

libraries/script-engine/src/ScriptManagerScriptingInterface.h+7−1
@@ -512,7 +512,7 @@ public: · 511 unmodified lines
512512
513513 /*@jsdoc
514514 * Start collecting object statistics that can later be reported with Script.dumpHeapObjectStatistics().
515− * @function Script.dumpHeapObjectStatistics
515+ * @function Script.startCollectingObjectStatistics
516516 */
517517 Q_INVOKABLE void startCollectingObjectStatistics();
518518
@@ -562,18 +562,24 @@ public: · 43 unmodified lines
562562 * through signals such as errorEntityMessage. This function can be invoked both from client-side entity scripts
563563 * and from interface scripts.
564564 * @function Script.subscribeToServerEntityScriptMessages
565+ * @param {Uuid=} entityID - The ID of the entity that requests entity server script messages. Only needs to be specified
566+ * for entity scripts, and must not be specified for other types of scripts.
565567 */
566568
567569 Q_INVOKABLE void requestServerEntityScriptMessages();
570+ Q_INVOKABLE void requestServerEntityScriptMessages(const QUuid& entityID);
568571
569572 /*@jsdoc
570573 * Calling this function signalizes that current script doesn't require stop receiving server-side entity script messages
571574 * through signals such as errorEntityMessage. This function can be invoked both from client-side entity scripts
572575 * and from interface scripts.
573576 * @function Script.unsubscribeFromServerEntityScriptMessages
577+ * @param {Uuid=} entityID - The ID of the entity that requests entity server script messages. Only needs to be specified
578+ * for entity scripts, and must not be specified for other types of scripts.
574579 */
575580
576581 Q_INVOKABLE void removeServerEntityScriptMessagesRequest();
582+ Q_INVOKABLE void removeServerEntityScriptMessagesRequest(const QUuid& entityID);
577583
578584 signals:
579585