From 9d354d7e853a31449c30d172e99695da9bf1ac7b Mon Sep 17 00:00:00 2001 From: Mahan-Ashrafi Date: Fri, 17 Nov 2023 19:04:21 +0000 Subject: [PATCH] Automated Extension submission for issue #1092 --- extensions/community/TimestampManager.json | 454 +++++++++++++++++++++ 1 file changed, 454 insertions(+) create mode 100644 extensions/community/TimestampManager.json diff --git a/extensions/community/TimestampManager.json b/extensions/community/TimestampManager.json new file mode 100644 index 000000000..9dde623cd --- /dev/null +++ b/extensions/community/TimestampManager.json @@ -0,0 +1,454 @@ +{ + "author": "", + "category": "General", + "extensionNamespace": "", + "fullName": "TimeStamp-Manager", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPGNpcmNsZSBjbGFzcz0ic3QwIiBjeD0iMTYiIGN5PSIxOCIgcj0iMTMiLz4NCjxjaXJjbGUgY2xhc3M9InN0MCIgY3g9IjE2IiBjeT0iMTgiIHI9IjIiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIxNiIgeTE9IjkiIHgyPSIxNiIgeTI9IjE2Ii8+DQo8bGluZSBjbGFzcz0ic3QwIiB4MT0iMjMiIHkxPSIxOCIgeDI9IjE4IiB5Mj0iMTgiLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyNiIgeTE9IjkiIHgyPSIyOCIgeTI9IjciLz4NCjxsaW5lIGNsYXNzPSJzdDAiIHgxPSIyNiIgeTE9IjUiIHgyPSIzMCIgeTI9IjkiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xNCw1LjJWMmMwLTAuNiwwLjQtMSwxLTFoMmMwLjYsMCwxLDAuNCwxLDF2My4yIi8+DQo8L3N2Zz4NCg==", + "name": "TimestampManager", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Sports and Fitness/58712bdff2252a70c5e15f045e39a8594ec2c1a47f8a5db68b40f60666b95996_Sports and Fitness_stopwatch_time_timer.svg", + "shortDescription": "For Calculating the time passed (in and out of the game).", + "version": "1.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." + ], + "tags": [ + "time", + "timestamp" + ], + "authorIds": [ + "oc974hW1zSYZfAnRbpKoXizqc1D3", + "fhs6FttYc2b2uELdUdUxSeGts2v2" + ], + "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": [ + "\"timestamp\"", + "TimestampName", + "Time(\"timestamp\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name", + "name": "TimestampName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "remove a saved timestamp.", + "fullName": "Remove a timestamp", + "functionType": "Action", + "group": "Actions", + "name": "RemoveTimestamp", + "sentence": "remove a timestamp named _PARAM1_ ", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DeleteGroupFichier" + }, + "parameters": [ + "\"timestamp\"", + "TimestampName" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Name", + "name": "TimestampName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "difference between a timestamp and now ( in seconds ).", + "fullName": "Timestamp difference", + "functionType": "Expression", + "group": "Functions", + "name": "DifferenceTillNow", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"timestamp\"", + "Loadedname" + ] + } + ], + "actions": [ + { + "type": { + "value": "LireFichierExp" + }, + "parameters": [ + "\"timestamp\"", + "Loadedname", + "Time(\"timestamp\")", + "Loadedname" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"Loaded Successfuly!\"", + "\"info\"", + "\"Timestamp Extension\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GroupExists" + }, + "parameters": [ + "\"timestamp\"", + "Loadedname" + ] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"the Timestamp does not exist!\"", + "\"error\"", + "\"Timestamp Extension\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "roundTo((Time(\"timestamp\")-Variable(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": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "First Timestamp import", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"timestamp\"", + "first" + ] + } + ], + "actions": [ + { + "type": { + "value": "LireFichierExp" + }, + "parameters": [ + "\"timestamp\"", + "first", + "Time(\"timestamp\")", + "First" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"First Timestamp Loaded Successfuly!\"", + "\"info\"", + "\"Timestamp Extension\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GroupExists" + }, + "parameters": [ + "\"timestamp\"", + "first" + ] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"first Timestamp does not exist!\"", + "\"error\"", + "\"Timestamp Extension\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "second Timestamp import", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"timestamp\"", + "second" + ] + } + ], + "actions": [ + { + "type": { + "value": "LireFichierExp" + }, + "parameters": [ + "\"timestamp\"", + "second", + "Time(\"timestamp\")", + "Second" + ] + }, + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"second Timestamp Loaded Successfuly!\"", + "\"info\"", + "\"Timestamp Extension\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GroupExists" + }, + "parameters": [ + "\"timestamp\"", + "second" + ] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "\"second Timestamp does not exist!\"", + "\"error\"", + "\"Timestamp Extension\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "roundTo(abs(Variable(second)-Variable(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": [ + "\"timestamp\"", + "name" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GroupExists" + }, + "parameters": [ + "\"timestamp\"", + "name" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "False" + ] + } + ] + } + ], + "parameters": [ + { + "description": "timestamp name", + "name": "name", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file