@@ -535,6 +535,9 @@ MetadataDeclarationHelper::DeclareExpressionMetadata(
535535 expressionAndCondition.AddCodeOnlyParameter (" currentScene" , " " );
536536 DeclareEventsFunctionParameters (freeEventsFunctions, eventsFunction,
537537 expressionAndCondition, 0 );
538+ if (!eventsFunction.GetHelpUrl ().empty ()) {
539+ expressionAndCondition.SetHelpPath (eventsFunction.GetHelpUrl ());
540+ }
538541 expressionAndConditions.push_back (expressionAndCondition);
539542 return expressionAndConditions.back ();
540543 } else {
@@ -556,6 +559,9 @@ MetadataDeclarationHelper::DeclareExpressionMetadata(
556559 expression.AddCodeOnlyParameter (" currentScene" , " " );
557560 DeclareEventsFunctionParameters (freeEventsFunctions, eventsFunction,
558561 expression, 0 );
562+ if (!eventsFunction.GetHelpUrl ().empty ()) {
563+ expression.SetHelpPath (eventsFunction.GetHelpUrl ());
564+ }
559565 return expression;
560566 }
561567}
@@ -581,6 +587,9 @@ gd::InstructionMetadata &MetadataDeclarationHelper::DeclareInstructionMetadata(
581587 condition.AddCodeOnlyParameter (" currentScene" , " " );
582588 DeclareEventsFunctionParameters (freeEventsFunctions, eventsFunction,
583589 condition, 0 );
590+ if (!eventsFunction.GetHelpUrl ().empty ()) {
591+ condition.SetHelpPath (eventsFunction.GetHelpUrl ());
592+ }
584593 return condition;
585594 } else if (functionType == gd::EventsFunction::ActionWithOperator) {
586595 if (freeEventsFunctions.HasEventsFunctionNamed (
@@ -607,6 +616,9 @@ gd::InstructionMetadata &MetadataDeclarationHelper::DeclareInstructionMetadata(
607616 action.AddCodeOnlyParameter (" currentScene" , " " );
608617 DeclareEventsFunctionParameters (freeEventsFunctions, eventsFunction,
609618 action, 0 );
619+ if (!eventsFunction.GetHelpUrl ().empty ()) {
620+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
621+ }
610622 return action;
611623 } else {
612624
@@ -621,6 +633,9 @@ gd::InstructionMetadata &MetadataDeclarationHelper::DeclareInstructionMetadata(
621633 action.AddCodeOnlyParameter (" currentScene" , " " );
622634 DeclareEventsFunctionParameters (freeEventsFunctions, eventsFunction,
623635 action, 0 );
636+ if (!eventsFunction.GetHelpUrl ().empty ()) {
637+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
638+ }
624639 return action;
625640 }
626641 } else {
@@ -634,6 +649,9 @@ gd::InstructionMetadata &MetadataDeclarationHelper::DeclareInstructionMetadata(
634649 action.AddCodeOnlyParameter (" currentScene" , " " );
635650 DeclareEventsFunctionParameters (freeEventsFunctions, eventsFunction,
636651 action, 0 );
652+ if (!eventsFunction.GetHelpUrl ().empty ()) {
653+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
654+ }
637655 return action;
638656 }
639657}
@@ -726,6 +744,9 @@ MetadataDeclarationHelper::DeclareBehaviorExpressionMetadata(
726744 GetExtensionIconUrl (extension));
727745 DeclareEventsFunctionParameters (eventsBasedBehavior.GetEventsFunctions (),
728746 eventsFunction, expressionAndCondition, 2 );
747+ if (!eventsFunction.GetHelpUrl ().empty ()) {
748+ expressionAndCondition.SetHelpPath (eventsFunction.GetHelpUrl ());
749+ }
729750 expressionAndConditions.push_back (expressionAndCondition);
730751 return expressionAndConditions.back ();
731752 } else {
@@ -751,6 +772,9 @@ MetadataDeclarationHelper::DeclareBehaviorExpressionMetadata(
751772 GetExtensionIconUrl (extension));
752773 DeclareEventsFunctionParameters (eventsBasedBehavior.GetEventsFunctions (),
753774 eventsFunction, expression, 2 );
775+ if (!eventsFunction.GetHelpUrl ().empty ()) {
776+ expression.SetHelpPath (eventsFunction.GetHelpUrl ());
777+ }
754778 return expression;
755779 }
756780}
@@ -779,6 +803,9 @@ MetadataDeclarationHelper::DeclareBehaviorInstructionMetadata(
779803 GetExtensionIconUrl (extension), GetExtensionIconUrl (extension));
780804 DeclareEventsFunctionParameters (eventsBasedBehavior.GetEventsFunctions (),
781805 eventsFunction, condition, 2 );
806+ if (!eventsFunction.GetHelpUrl ().empty ()) {
807+ condition.SetHelpPath (eventsFunction.GetHelpUrl ());
808+ }
782809 return condition;
783810 } else if (functionType == gd::EventsFunction::ActionWithOperator) {
784811 auto &eventsFunctionsContainer = eventsBasedBehavior.GetEventsFunctions ();
@@ -804,6 +831,9 @@ MetadataDeclarationHelper::DeclareBehaviorInstructionMetadata(
804831
805832 DeclareEventsFunctionParameters (eventsBasedBehavior.GetEventsFunctions (),
806833 eventsFunction, action, 2 );
834+ if (!eventsFunction.GetHelpUrl ().empty ()) {
835+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
836+ }
807837 return action;
808838 } else {
809839 auto &action = behaviorMetadata.AddScopedAction (
@@ -817,6 +847,9 @@ MetadataDeclarationHelper::DeclareBehaviorInstructionMetadata(
817847
818848 DeclareEventsFunctionParameters (eventsBasedBehavior.GetEventsFunctions (),
819849 eventsFunction, action, 2 );
850+ if (!eventsFunction.GetHelpUrl ().empty ()) {
851+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
852+ }
820853 return action;
821854 }
822855 } else {
@@ -834,6 +867,9 @@ MetadataDeclarationHelper::DeclareBehaviorInstructionMetadata(
834867
835868 DeclareEventsFunctionParameters (eventsBasedBehavior.GetEventsFunctions (),
836869 eventsFunction, action, 2 );
870+ if (!eventsFunction.GetHelpUrl ().empty ()) {
871+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
872+ }
837873 return action;
838874 }
839875}
@@ -900,6 +936,9 @@ MetadataDeclarationHelper::DeclareObjectExpressionMetadata(
900936
901937 DeclareEventsFunctionParameters (eventsBasedObject.GetEventsFunctions (),
902938 eventsFunction, expressionAndCondition, 1 );
939+ if (!eventsFunction.GetHelpUrl ().empty ()) {
940+ expressionAndCondition.SetHelpPath (eventsFunction.GetHelpUrl ());
941+ }
903942 expressionAndConditions.push_back (expressionAndCondition);
904943 return expressionAndConditions.back ();
905944 } else {
@@ -926,6 +965,9 @@ MetadataDeclarationHelper::DeclareObjectExpressionMetadata(
926965
927966 DeclareEventsFunctionParameters (eventsBasedObject.GetEventsFunctions (),
928967 eventsFunction, expression, 1 );
968+ if (!eventsFunction.GetHelpUrl ().empty ()) {
969+ expression.SetHelpPath (eventsFunction.GetHelpUrl ());
970+ }
929971 return expression;
930972 }
931973}
@@ -955,6 +997,9 @@ MetadataDeclarationHelper::DeclareObjectInstructionMetadata(
955997
956998 DeclareEventsFunctionParameters (eventsBasedObject.GetEventsFunctions (),
957999 eventsFunction, condition, 1 );
1000+ if (!eventsFunction.GetHelpUrl ().empty ()) {
1001+ condition.SetHelpPath (eventsFunction.GetHelpUrl ());
1002+ }
9581003 return condition;
9591004 } else if (functionType == gd::EventsFunction::ActionWithOperator) {
9601005 auto &eventsFunctionsContainer = eventsBasedObject.GetEventsFunctions ();
@@ -979,6 +1024,9 @@ MetadataDeclarationHelper::DeclareObjectInstructionMetadata(
9791024
9801025 DeclareEventsFunctionParameters (eventsBasedObject.GetEventsFunctions (),
9811026 eventsFunction, action, 1 );
1027+ if (!eventsFunction.GetHelpUrl ().empty ()) {
1028+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
1029+ }
9821030 return action;
9831031 } else {
9841032 auto &action = objectMetadata.AddScopedAction (
@@ -991,6 +1039,9 @@ MetadataDeclarationHelper::DeclareObjectInstructionMetadata(
9911039
9921040 DeclareEventsFunctionParameters (eventsBasedObject.GetEventsFunctions (),
9931041 eventsFunction, action, 1 );
1042+ if (!eventsFunction.GetHelpUrl ().empty ()) {
1043+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
1044+ }
9941045 return action;
9951046 }
9961047 } else {
@@ -1008,6 +1059,9 @@ MetadataDeclarationHelper::DeclareObjectInstructionMetadata(
10081059
10091060 DeclareEventsFunctionParameters (eventsBasedObject.GetEventsFunctions (),
10101061 eventsFunction, action, 1 );
1062+ if (!eventsFunction.GetHelpUrl ().empty ()) {
1063+ action.SetHelpPath (eventsFunction.GetHelpUrl ());
1064+ }
10111065 return action;
10121066 }
10131067}
0 commit comments