From a78446dbef6e758d12ec1a69d71edcdb003218c9 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sat, 4 Jul 2020 23:15:10 -0400 Subject: [PATCH 1/2] JS Doc update for enterEntity JS Doc update for enterEntity: Triggered when an avatar enters an entity, but only if the entity has an entity method exposed for this event. Note: At the initial loading of the script, if the avatar is already present inside the entity, it might be too late to catch this event when the script runs, so it won't trigger. The 'preload' signal can be used to handle those cases. To solve issue #398 --- libraries/entities/src/EntityScriptingInterface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index e0f14b47e7..682aa10c3c 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -2399,7 +2399,9 @@ signals: /**jsdoc - * Triggered when an avatar enters an entity, but only if the entity has an entity method exposed for this event. + * Triggered when an avatar enters an entity, but only if the entity has an entity method exposed for this event. + * Note: At the initial loading of the script, if the avatar is already present inside the entity, it might be too late + * to catch this event when the script runs, so it won't trigger. The 'preload' signal can be used to handle those cases. *
See also, {@link Entities|Entity Methods} and {@link Script.addEventHandler}.
* @function Entities.enterEntity * @param {Uuid} entityID - The ID of the entity that the avatar entered. From 6c24f646bb18045035e433c585b887d01f86a01a Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Tue, 7 Jul 2020 23:05:24 -0400 Subject: [PATCH 2/2] Added an hyperlink to preload in enterEntity JSdoc 1- Added an hyperlink to "preload" signal in enterEntity JSdoc. 2- Removed the useless ", but only if the entity has an entity method exposed for this event." from "enterEntity" and "leaveEntity" JSdoc (lines 2402 and 2413) --- libraries/entities/src/EntityScriptingInterface.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h index 682aa10c3c..dae0922f4a 100644 --- a/libraries/entities/src/EntityScriptingInterface.h +++ b/libraries/entities/src/EntityScriptingInterface.h @@ -2399,9 +2399,9 @@ signals: /**jsdoc - * Triggered when an avatar enters an entity, but only if the entity has an entity method exposed for this event. + * Triggered when an avatar enters an entity. * Note: At the initial loading of the script, if the avatar is already present inside the entity, it might be too late - * to catch this event when the script runs, so it won't trigger. The 'preload' signal can be used to handle those cases. + * to catch this event when the script runs, so it won't trigger. The {@link Entities.preload|preload} signal can be used to handle those cases. *See also, {@link Entities|Entity Methods} and {@link Script.addEventHandler}.
* @function Entities.enterEntity * @param {Uuid} entityID - The ID of the entity that the avatar entered. @@ -2410,7 +2410,7 @@ signals: void enterEntity(const EntityItemID& entityItemID); /**jsdoc - * Triggered when an avatar leaves an entity, but only if the entity has an entity method exposed for this event. + * Triggered when an avatar leaves an entity. *See also, {@link Entities|Entity Methods} and {@link Script.addEventHandler}.
* @function Entities.leaveEntity * @param {Uuid} entityID - The ID of the entity that the avatar left.