diff --git a/extensions/community/SystemTime.json b/extensions/community/SystemTime.json new file mode 100644 index 00000000..064316bf --- /dev/null +++ b/extensions/community/SystemTime.json @@ -0,0 +1,510 @@ +{ + "author": "", + "category": "General", + "extensionNamespace": "", + "fullName": "System Time", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNsb2NrLXRpbWUtZWlnaHQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMkM2LjUgMiAyIDYuNSAyIDEyQzIgMTcuNSA2LjUgMjIgMTIgMjJDMTcuNSAyMiAyMiAxNy41IDIyIDEyUzE3LjUgMiAxMiAyTTcuNyAxNS41TDcgMTQuMkwxMSAxMS45VjdIMTIuNVYxMi44TDcuNyAxNS41WiIgLz48L3N2Zz4=", + "name": "SystemTime", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/5947dad09dde44ec1867e5dca022c4eb5943562b7db005e128be458e5d9feafb_clock-time-eight.svg", + "shortDescription": "Get Date and Time of the system.", + "version": "1.0.0", + "description": [ + "This extension allws you to access your system time and date. This extension is good for:", + "1. Time-Based Award System", + "2. Time-Based Story", + "", + "", + "" + ], + "tags": [ + "Time", + "System Time" + ], + "authorIds": [ + "xvJffE9fNWgfAsTl83YkT0CY4er1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": " the current date in a month.", + "fullName": "The current date", + "functionType": "ExpressionAndCondition", + "name": "Date", + "sentence": "The current date", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var TempDate = new Date()", + "var Day = TempDate.getDate()", + "eventsFunctionContext.returnValue = Day" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": " the current Month in a Year (Number).", + "fullName": "The Month ", + "functionType": "ExpressionAndCondition", + "name": "Month", + "sentence": "The current month in Number", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var TempMonth = new Date()", + "var Month = TempMonth.getMonth()", + "eventsFunctionContext.returnValue = Month+1" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": "Returns the name of the current month.", + "fullName": "Current Month (Name)", + "functionType": "StringExpression", + "name": "MonthString", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "1", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"January\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "2", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"Febuary\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "3", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"March\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "4", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"April\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "5", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"May\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "6", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"June\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "7", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"July\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "8", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"August\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "9", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"September\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "10", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"October\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "11", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"November\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "SystemTime::Month" + }, + "parameters": [ + "", + "=", + "12", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "\"December\"" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": " the current year.", + "fullName": "The current year", + "functionType": "ExpressionAndCondition", + "name": "Year", + "sentence": "The current year", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var TempYear = new Date()", + "var Year = TempYear.getFullYear()", + "eventsFunctionContext.returnValue = Year" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": " the current system hour.", + "fullName": "The current hour", + "functionType": "ExpressionAndCondition", + "name": "Hour", + "sentence": "The current hour ", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var TempHour = new Date()", + "var Hour = TempHour.getHours()", + "eventsFunctionContext.returnValue = Hour" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": " the current system minute.", + "fullName": "The current minute", + "functionType": "ExpressionAndCondition", + "name": "Minute", + "sentence": "The current minute", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var TempMinute = new Date()", + "var Minute = TempMinute.getMinutes()", + "eventsFunctionContext.returnValue = Minute" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + }, + { + "description": " the current system second.", + "fullName": "The current second", + "functionType": "ExpressionAndCondition", + "name": "Second", + "sentence": "The current second", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "var TempSecond = new Date()", + "var Second = TempSecond.getSeconds()", + "eventsFunctionContext.returnValue = Second" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file