You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Describe the features you added or the bugs you fixed.
14
+
placeholder: This update adds...
15
+
- type: textarea
16
+
id: how-to
17
+
attributes:
18
+
label: How to use the new features
19
+
description: Describe how your new features can be used.
20
+
placeholder: If you put behavior X on a sprite, you can make a...
21
+
- type: checkboxes
22
+
id: checklist
23
+
attributes:
24
+
label: Checklist
25
+
description: Make sure you have done all of this before submitting!
26
+
options:
27
+
- label: "I've followed all of [the best practices](http://wiki.compilgames.net/doku.php/gdevelop5/extensions/best-practices)."
28
+
required: true
29
+
- label: I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
30
+
required: true
31
+
- label: I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.
32
+
required: true
33
+
- type: textarea
34
+
id: example
35
+
attributes:
36
+
label: Example file
37
+
description: Please drag and drop an example project using your extension, compressed in a ZIP file, into this text field. **DO NOT PUT A LINK TO AN EXTERNAL SERVICE LIKE GOOGLE DRIVE!**
38
+
placeholder: '[MyExample.zip]()'
39
+
validations:
40
+
required: true
41
+
- type: textarea
42
+
id: extension
43
+
attributes:
44
+
label: Extension file
45
+
description: Please drag and drop your extension JSON file, compressed in a ZIP file, into this text field. **DO NOT PUT A LINK TO AN EXTERNAL SERVICE LIKE GOOGLE DRIVE!**
46
+
placeholder: '[MyExtension.json.zip]()'
47
+
validations:
48
+
required: true
49
+
- type: markdown
50
+
attributes:
51
+
value: |
52
+
You also may have to create an account on GitHub before posting.
53
+
Your extension will be added to the list after we have checked that it contains no virus and respects the best practices.
body: `👋 Hey @${{ github.event.issue.user.login }}, thanks for your submission! We are sorry, but the filename of the extension has unrecognized characters. Since filenames with non latin characters ("ASCII") can cause issues, our system won't allow file names with other characters than latin upper- and lowercase characters or numbers. Additionally, the first character must be an uppercase character. Please update your original submission post with a new zip file containing your extension with another file name following those guidelines 🙏`
63
63
})
64
64
65
+
if(error === "nothing-to-update")
66
+
github.rest.issues.createComment({
67
+
issue_number: context.issue.number,
68
+
owner: context.repo.owner,
69
+
repo: context.repo.repo,
70
+
body: `👋 Hey @${{ github.event.issue.user.login }}, thanks for your submission! We are sorry, but the name of the extension you submitted for an update doesn't match any existing extension. If you want to update one of your ingoing extension submission, please follow the instruction on your first submission 🙏`
71
+
})
72
+
65
73
if(error) {
66
74
core.setFailed("Extraction of the extension failed!");
67
75
return;
@@ -90,7 +98,7 @@ jobs:
90
98
issue_number: context.issue.number,
91
99
owner: context.repo.owner,
92
100
repo: context.repo.repo,
93
-
body: `👋 Hey @${{ github.event.issue.user.login }}, thanks for your submission! We are sorry, but it seems we already have a reviewed extension with that name. Extensions cannot be in both the community and reviewed extensions list at once. If you are trying to update that extension, please ask a member of the extension team for help. If the name clash is a coincidence, please update your original submission post with a new zip file containing your extension with a file name that is not already taken 🙏`
101
+
body: `👋 Hey @${{ github.event.issue.user.login }}, thanks for your submission! We are sorry, but it seems we already have a reviewed extension with that name. Extensions cannot be in both the experimental and reviewed extensions list at once. If you are trying to update that extension, please ask a member of the extension team for help. If the name clash is a coincidence, please update your original submission post with a new zip file containing your extension with a file name that is not already taken 🙏`
94
102
})
95
103
96
104
if(code === "invalid-json")
@@ -106,27 +114,36 @@ jobs:
106
114
issue_number: context.issue.number,
107
115
owner: context.repo.owner,
108
116
repo: context.repo.repo,
109
-
body: `👋 Hey ${{ github.event.issue.user.login }}, thanks for your submission! It would seem you confused the extension file with your project file, and thus we cannot find your extension. Make sure you exported the extension itself from the extension editor as a standalone file, zip that standalone extension file, and make sure you did not confuse the "Example" and "Extension" fields while submitting!`
117
+
body: `👋 Hey @${{ github.event.issue.user.login }}, thanks for your submission! It would seem you confused the extension file with your project file, and thus we cannot find your extension. Make sure you exported the extension itself from the extension editor as a standalone file, zip that standalone extension file, and make sure you did not confuse the "Example" and "Extension" fields while submitting!`
110
118
})
111
119
112
120
if(code === "unknown-json-contents")
113
121
github.rest.issues.createComment({
114
122
issue_number: context.issue.number,
115
123
owner: context.repo.owner,
116
124
repo: context.repo.repo,
117
-
body: `👋 Hey ${{ github.event.issue.user.login }}, thanks for your submission! It would seem your JSON file is not a valid GDevelop extension, although it is a JSON file. Please make sure you are exporting with the latest version of GDevelop and that you are not modifying the JSON incorrectly after the export.`
125
+
body: `👋 Hey @${{ github.event.issue.user.login }}, thanks for your submission! It would seem your JSON file is not a valid GDevelop extension, although it is a JSON file. Please make sure you are exporting with the latest version of GDevelop and that you are not modifying the JSON incorrectly after the export.`
118
126
})
119
127
120
128
if(code === "rule-break")
121
129
github.rest.issues.createComment({
122
130
issue_number: context.issue.number,
123
131
owner: context.repo.owner,
124
132
repo: context.repo.repo,
125
-
body: `👋 Hey ${{ github.event.issue.user.login }}, thanks for your submission! Unfortunately, all submitted extensions have to meet some minimal quality standard - the extension best practices - and our system has found that your extension does not fully comply 😔. You can find all of those rules on [the GDevelop wiki](https://wiki.gdevelop.io/gdevelop5/extensions/best-practices). \n\nThe following issues have been found by the system concerning the respect of those best practices by your extension: \n\`\`\`\n${errors.reduce((acc, error) => `${acc}\n ⟶ ❌ ${error}`, '').slice(1)}\n\`\`\`\nPlease update your original submission post with a new zip file containing your extensions updated to follow those guidelines 🙏`
133
+
body: `👋 Hey @${{ github.event.issue.user.login }}, thanks for your submission! Unfortunately, all submitted extensions have to meet some minimal quality standard - the extension best practices - and our system has found that your extension does not fully comply 😔. You can find all of those rules on [the GDevelop wiki](https://wiki.gdevelop.io/gdevelop5/extensions/best-practices). \n\nThe following issues have been found by the system concerning the respect of those best practices by your extension: \n\`\`\`\n${errors.reduce((acc, error) => `${acc}\n ⟶ ❌ ${error}`, '').slice(1)}\n\`\`\`\nPlease update your original submission post with a new zip file containing your extensions updated to follow those guidelines 🙏`
126
134
})
127
135
128
136
if(code !== "success") core.setFailed("Verification of the extension failed!");
gh issue comment ${{ github.event.issue.number }} --body "Hi @${{ github.event.issue.user.login }}! 👋 This submission has passed all required tests, and has been moved to a PR as part of our submission pipeline. [You can see the progress of your submission on this page](${{ steps.cpr.outputs.pull-request-url }}). Community submissions are not reviewed by default, so your extension should be added once we've checked that your submission doesn't contain malicious code without further intervention on your part. If you wish for your extension to be reviewed (and thereby moved to the list of reviewed extensions), please follow the instructions written on the [README](https://github.com/GDevelopApp/GDevelop-extensions#get-your-extension-reviewed-extensions). Thanks again for your contribution to GDevelop!"
195
+
gh issue comment ${{ github.event.issue.number }} --body "Hi @${{ github.event.issue.user.login }}! 👋 This submission has passed all preliminary tests, and has been moved to a PR where the review will be done. [You can see the progress and update your submission on this page](${{ steps.cpr.outputs.pull-request-url }}). Thanks again for your contribution to GDevelop!"
"description": "Prevents the back button from quitting the game and provides a condition to check when it's pressed (to allow customising its behavior).",
"shortDescription": "Adds interactions with the back button.",
11
+
"version": "1.0.0",
12
+
"tags": [
13
+
"back",
14
+
"mobile",
15
+
"button",
16
+
"input"
17
+
],
18
+
"authorIds": [
19
+
"ZgrsWuRTAkXgeuPV9bo0zuEcA2w1"
20
+
],
21
+
"dependencies": [],
22
+
"eventsFunctions": [
23
+
{
24
+
"description": "",
25
+
"fullName": "",
26
+
"functionType": "Action",
27
+
"name": "onFirstSceneLoaded",
28
+
"private": false,
29
+
"sentence": "",
30
+
"events": [
31
+
{
32
+
"disabled": false,
33
+
"folded": false,
34
+
"type": "BuiltinCommonInstructions::JsCode",
35
+
"inlineCode": "gdjs.evtTools.back_button = {\n triggered: false,\n _popStateListener: (event) => {\n gdjs.evtTools.back_button.triggered = true;\n history.pushState(\"\", \"\"); // Push a new fake state as the old one was popped\n }\n};\n\n// Handle back button on the web\nhistory.pushState(\"\", \"\"); // Push a fake state to prevent switching page when clicking on back\nwindow.addEventListener('popstate', gdjs.evtTools.back_button._popStateListener);\n\n// Handle back button on cordova\ndocument.addEventListener(\"backbutton\", e => {\n e.preventDefault();\n gdjs.evtTools.back_button.triggered = true;\n}, false); \n",
36
+
"parameterObjects": "",
37
+
"useStrict": true,
38
+
"eventsSheetExpanded": false
39
+
}
40
+
],
41
+
"parameters": [],
42
+
"objectGroups": []
43
+
},
44
+
{
45
+
"description": "Triggers whenever the player presses the back button.",
"description": "This simulates the normal action of the back button. \nThis action will quit the app when in a mobile app, and go back to the previous page when in a web browser.",
67
+
"fullName": "Trigger back button",
68
+
"functionType": "Action",
69
+
"name": "doDefault",
70
+
"private": false,
71
+
"sentence": "Simulate back button press",
72
+
"events": [
73
+
{
74
+
"disabled": false,
75
+
"folded": false,
76
+
"type": "BuiltinCommonInstructions::JsCode",
77
+
"inlineCode": "// Close the app on cordova, as this is the default behavior\nif (navigator.app) {\n navigator.app.exitApp();\n} else if (navigator.device && navigator.device.exitApp) {\n navigator.device.exitApp();\n} else {\n // Go to previous page as it is the default on browsers\n // Remove the listener so new fake states don't get pushed\n window.removeEventListener('popstate', gdjs.evtTools.back_button._popStateListener);\n history.back(); // Remove the state that prevents going back\n history.back(); // Actually go back\n}\n",
0 commit comments