From 43e92706c40bcd5ef5855be9f9f75a182870be88 Mon Sep 17 00:00:00 2001 From: Mahan-Ashrafi Date: Sat, 23 Mar 2024 09:49:50 +0000 Subject: [PATCH] Automated Extension submission for issue #1092 --- extensions/community/OfflineTimeTracker.json | 273 +++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 extensions/community/OfflineTimeTracker.json diff --git a/extensions/community/OfflineTimeTracker.json b/extensions/community/OfflineTimeTracker.json new file mode 100644 index 000000000..b9dc405c5 --- /dev/null +++ b/extensions/community/OfflineTimeTracker.json @@ -0,0 +1,273 @@ +{ + "author": "", + "category": "Advanced", + "extensionNamespace": "", + "fullName": "OfflineTimeTracker", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXRpbWVyLW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIsMjBBNyw3IDAgMCwxIDUsMTNBNyw3IDAgMCwxIDEyLDZBNyw3IDAgMCwxIDE5LDEzQTcsNyAwIDAsMSAxMiwyME0xOS4wMyw3LjM5TDIwLjQ1LDUuOTdDMjAsNS40NiAxOS41NSw1IDE5LjA0LDQuNTZMMTcuNjIsNkMxNi4wNyw0Ljc0IDE0LjEyLDQgMTIsNEE5LDkgMCAwLDAgMywxM0E5LDkgMCAwLDAgMTIsMjJDMTcsMjIgMjEsMTcuOTcgMjEsMTNDMjEsMTAuODggMjAuMjYsOC45MyAxOS4wMyw3LjM5TTExLDE0SDEzVjhIMTFNMTUsMUg5VjNIMTVWMVoiIC8+PC9zdmc+", + "name": "OfflineTimeTracker", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/632ad4b4fbdffa09f26d1e73058989bd488b2441c4e85b125c6db16c39c1a1c3_timer-outline.svg", + "shortDescription": "For Calculating the time passed (in and out of the game).", + "version": "2.0.0", + "description": [ + "For calculating the time between 2 points in time.", + "No matter the game/app is open or closed , if you have a timestamp saved when the game/app is open it will keep track of the time passed.", + "Good for making Clicker Games and Offline Reward Systems !" + ], + "tags": [ + "time", + "timestamp", + "tracker", + "offline" + ], + "authorIds": [ + "oc974hW1zSYZfAnRbpKoXizqc1D3" + ], + "dependencies": [], + "eventsFunctions": [ + { + "description": "Create a timestamp with a defined name that can later be reffered to.", + "fullName": "Create Timestamp", + "functionType": "Action", + "group": "Actions", + "name": "CreateTimestamp", + "sentence": "Create a timestamp named _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EcrireFichierExp" + }, + "parameters": [ + "\"_OfflineTimeTracker\"", + "Name", + "Time(\"timestamp\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Timestamp name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Delete a saved timestamp.", + "fullName": "Delete a timestamp", + "functionType": "Action", + "group": "Actions", + "name": "DeleteTimestamp", + "sentence": "Delete a timestamp named _PARAM1_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DeleteGroupFichier" + }, + "parameters": [ + "\"_OfflineTimeTracker\"", + "Name" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Timestamp name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Difference between a timestamp and the present time ( in seconds ).", + "fullName": "Timestamp difference", + "functionType": "Expression", + "group": "Functions", + "name": "DifferenceTillPresentTime", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LireFichierExp" + }, + "parameters": [ + "\"_OfflineTimeTracker\"", + "LoadedName", + "Time(\"timestamp\")", + "_OfflineTimeTracker.LoadedName" + ] + }, + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "roundTo((Time(\"timestamp\")-Variable(_OfflineTimeTracker.LoadedName))/1000,0)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Timestamp name", + "name": "LoadedName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Difference between two timestamps ( in seconds ).", + "fullName": "Two Timestamps difference", + "functionType": "Expression", + "group": "Functions", + "name": "DifferenceBetweenTimestamps", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "LireFichierExp" + }, + "parameters": [ + "\"_OfflineTimeTracker\"", + "First", + "Time(\"timestamp\")", + "_OfflineTimeTracker.First" + ] + }, + { + "type": { + "value": "LireFichierExp" + }, + "parameters": [ + "\"_OfflineTimeTracker\"", + "Second", + "Time(\"timestamp\")", + "_OfflineTimeTracker.Second" + ] + }, + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "roundTo(abs(Variable(_OfflineTimeTracker.Second)-Variable(_OfflineTimeTracker.First))/1000,0)" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "First Timestamp's name", + "name": "First", + "type": "string" + }, + { + "description": "Seconds Timestamp's name", + "name": "Second", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if timestamp exists.", + "fullName": "Timestamp Existence", + "functionType": "Condition", + "group": "Conditions", + "name": "ExistenceOfTimestamp", + "sentence": "If timestamp _PARAM1_ Exists", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"_OfflineTimeTracker\"", + "Name" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GroupExists" + }, + "parameters": [ + "\"_OfflineTimeTracker\"", + "Name" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Timestamp name", + "name": "Name", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file