From fe7e0739f3282380aa5b21ec1f53ad3e1d4764cb Mon Sep 17 00:00:00 2001 From: Tristan Rhodes Date: Sat, 12 Aug 2023 15:27:20 -0600 Subject: [PATCH] [Screen wrap] [Reviewed] Fix physics version that had copy/paste errors from non-physics version (#964) Closes #960. Thanks @MelonDev! --- extensions/reviewed/ScreenWrap.json | 354 +++++++--------------------- 1 file changed, 91 insertions(+), 263 deletions(-) diff --git a/extensions/reviewed/ScreenWrap.json b/extensions/reviewed/ScreenWrap.json index 8d0f2c26d..30762127f 100644 --- a/extensions/reviewed/ScreenWrap.json +++ b/extensions/reviewed/ScreenWrap.json @@ -2,16 +2,15 @@ "author": "Tristan Rhodes (tristan@victrisgames.com), Entropy", "category": "Movement", "extensionNamespace": "", - "fullName": "Screen Wrap", + "fullName": "Screen wrap", "helpPath": "", "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLW1vbml0b3Itc2NyZWVuc2hvdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik05LDZINVYxMEg3VjhIOU0xOSwxMEgxN1YxMkgxNVYxNEgxOU0yMSwxNkgzVjRIMjFNMjEsMkgzQzEuODksMiAxLDIuODkgMSw0VjE2QTIsMiAwIDAsMCAzLDE4SDEwVjIwSDhWMjJIMTZWMjBIMTRWMThIMjFBMiwyIDAgMCwwIDIzLDE2VjRDMjMsMi44OSAyMi4xLDIgMjEsMiIgLz48L3N2Zz4=", "name": "ScreenWrap", "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/monitor-screenshot.svg", "shortDescription": "Teleport object when it moves off the screen and immediately appear on the opposite side while maintaining speed and trajectory.", - "version": "0.2.3", + "version": "0.2.4", "description": [ - "The teleport happens when the center point of the object crosses a border. ", - "Change behavior properties to increase or decrease the margin used to trigger this teleport.", + "The teleport happens when the center point of the object crosses a border (this can be adjusted with an offset).", "By default, the borders of the wrapping area match the screen size, but they can alo be changed.", "", "The Asteroid-like example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://space-asteroid))." @@ -20,15 +19,11 @@ "identifier": "ScreenWrap", "name": "gdevelop-extension-store" }, - "tags": [ - "screen", - "wrap", - "teleport", - "asteroids" - ], + "tags": ["screen", "wrap", "teleport", "asteroids"], "authorIds": [ "q8ubdigLvIRXLxsJDDTaokO41mc2", - "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + "gqDaZjCfevOOxBYkK6zlhtZnXCg1", + "1OgYzWp5UeVPbiWGJwI6vqfgZLC3" ], "dependencies": [], "eventsFunctions": [], @@ -61,12 +56,7 @@ "type": { "value": "ScreenWrap::ScreenWrap::PropertyBorderBottom" }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] + "parameters": ["Object", "Behavior", "=", "0"] } ], "actions": [ @@ -90,12 +80,7 @@ "type": { "value": "ScreenWrap::ScreenWrap::PropertyBorderRight" }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] + "parameters": ["Object", "Behavior", "=", "0"] } ], "actions": [ @@ -164,10 +149,7 @@ "type": { "value": "ScreenWrap::ScreenWrap::PropertyHorizontalWrapping" }, - "parameters": [ - "Object", - "Behavior" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [], @@ -235,10 +217,7 @@ "type": { "value": "ScreenWrap::ScreenWrap::PropertyVerticalWrapping" }, - "parameters": [ - "Object", - "Behavior" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [], @@ -331,11 +310,9 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "ScreenWrap::ScreenWrap::PropertyHorizontalWrapping" }, - "parameters": [ - "\"Horizontal\"" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [ @@ -343,9 +320,7 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": [ - "" - ] + "parameters": [""] } ] }, @@ -354,11 +329,9 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "ScreenWrap::ScreenWrap::PropertyHorizontalWrapping" }, - "parameters": [ - "\"Horizontal\"" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [ @@ -366,9 +339,7 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": [ - "True" - ] + "parameters": ["True"] } ] } @@ -401,11 +372,9 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "ScreenWrap::ScreenWrap::PropertyVerticalWrapping" }, - "parameters": [ - "\"Vertical\"" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [ @@ -413,9 +382,7 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": [ - "" - ] + "parameters": [""] } ] }, @@ -424,11 +391,9 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "ScreenWrap::ScreenWrap::PropertyVerticalWrapping" }, - "parameters": [ - "\"Vertical\"" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [ @@ -436,9 +401,7 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": [ - "True" - ] + "parameters": ["True"] } ] } @@ -473,9 +436,7 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": [ - "\"EnableHorizontalWrapping\"" - ] + "parameters": ["\"EnableHorizontalWrapping\""] } ], "actions": [ @@ -483,11 +444,7 @@ "type": { "value": "ScreenWrap::ScreenWrap::SetPropertyHorizontalWrapping" }, - "parameters": [ - "Object", - "Behavior", - "no" - ] + "parameters": ["Object", "Behavior", "no"] } ] }, @@ -498,9 +455,7 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": [ - "\"EnableHorizontalWrapping\"" - ] + "parameters": ["\"EnableHorizontalWrapping\""] } ], "actions": [ @@ -508,11 +463,7 @@ "type": { "value": "ScreenWrap::ScreenWrap::SetPropertyHorizontalWrapping" }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] + "parameters": ["Object", "Behavior", "yes"] } ] } @@ -552,9 +503,7 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": [ - "\"EnableVerticalWrapping\"" - ] + "parameters": ["\"EnableVerticalWrapping\""] } ], "actions": [ @@ -562,11 +511,7 @@ "type": { "value": "ScreenWrap::ScreenWrap::SetPropertyVerticalWrapping" }, - "parameters": [ - "Object", - "Behavior", - "no" - ] + "parameters": ["Object", "Behavior", "no"] } ] }, @@ -577,9 +522,7 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": [ - "\"EnableVerticalWrapping\"" - ] + "parameters": ["\"EnableVerticalWrapping\""] } ], "actions": [ @@ -587,11 +530,7 @@ "type": { "value": "ScreenWrap::ScreenWrap::SetPropertyVerticalWrapping" }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] + "parameters": ["Object", "Behavior", "yes"] } ] } @@ -631,9 +570,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyBorderTop()" - ] + "parameters": ["Object.Behavior::PropertyBorderTop()"] } ] } @@ -671,9 +608,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyBorderLeft()" - ] + "parameters": ["Object.Behavior::PropertyBorderLeft()"] } ] } @@ -711,9 +646,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyBorderRight()" - ] + "parameters": ["Object.Behavior::PropertyBorderRight()"] } ] } @@ -751,9 +684,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyBorderBottom()" - ] + "parameters": ["Object.Behavior::PropertyBorderBottom()"] } ] } @@ -791,9 +722,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyTriggerOffset()" - ] + "parameters": ["Object.Behavior::PropertyTriggerOffset()"] } ] } @@ -1147,20 +1076,15 @@ "conditions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::PropertyBorderBottom" + "value": "ScreenWrap::ScreenWrapPhysics::PropertyBorderBottom" }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] + "parameters": ["Object", "Behavior", "=", "0"] } ], "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetBottomBorder" + "value": "ScreenWrap::ScreenWrapPhysics::SetBottomBorder" }, "parameters": [ "Object", @@ -1176,20 +1100,15 @@ "conditions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::PropertyBorderRight" + "value": "ScreenWrap::ScreenWrapPhysics::PropertyBorderRight" }, - "parameters": [ - "Object", - "Behavior", - "=", - "0" - ] + "parameters": ["Object", "Behavior", "=", "0"] } ], "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetRightBorder" + "value": "ScreenWrap::ScreenWrapPhysics::SetRightBorder" }, "parameters": [ "Object", @@ -1250,12 +1169,9 @@ "conditions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::PropertyHorizontalWrapping" + "value": "ScreenWrap::ScreenWrapPhysics::IsHorizontalWrapping" }, - "parameters": [ - "Object", - "Behavior" - ] + "parameters": ["Object", "Behavior", ""] } ], "actions": [], @@ -1270,8 +1186,7 @@ "textG": 0, "textR": 0 }, - "comment": "Velocity is saved because Physics2 resets objects velocities when they are moved from the outside of the extension.", - "comment2": "" + "comment": "Velocity is saved because Physics2 resets objects velocities when they are moved from the outside of the extension." }, { "type": "BuiltinCommonInstructions::Standard", @@ -1292,11 +1207,7 @@ "type": { "value": "ScreenWrap::ScreenWrapPhysics::SaveCurrentVelocities" }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "parameters": ["Object", "Behavior", ""] }, { "type": { @@ -1312,11 +1223,7 @@ "type": { "value": "ScreenWrap::ScreenWrapPhysics::ApplySavedVelocities" }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "parameters": ["Object", "Behavior", ""] } ] }, @@ -1339,11 +1246,7 @@ "type": { "value": "ScreenWrap::ScreenWrapPhysics::SaveCurrentVelocities" }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "parameters": ["Object", "Behavior", ""] }, { "type": { @@ -1359,11 +1262,7 @@ "type": { "value": "ScreenWrap::ScreenWrapPhysics::ApplySavedVelocities" }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "parameters": ["Object", "Behavior", ""] } ] } @@ -1374,12 +1273,9 @@ "conditions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::PropertyVerticalWrapping" + "value": "ScreenWrap::ScreenWrapPhysics::IsVerticalWrapping" }, - "parameters": [ - "Object", - "Behavior" - ] + "parameters": ["Object", "Behavior", ""] } ], "actions": [], @@ -1403,11 +1299,7 @@ "type": { "value": "ScreenWrap::ScreenWrapPhysics::SaveCurrentVelocities" }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "parameters": ["Object", "Behavior", ""] }, { "type": { @@ -1423,11 +1315,7 @@ "type": { "value": "ScreenWrap::ScreenWrapPhysics::ApplySavedVelocities" }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "parameters": ["Object", "Behavior", ""] } ] }, @@ -1450,11 +1338,7 @@ "type": { "value": "ScreenWrap::ScreenWrapPhysics::SaveCurrentVelocities" }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "parameters": ["Object", "Behavior", ""] }, { "type": { @@ -1470,11 +1354,7 @@ "type": { "value": "ScreenWrap::ScreenWrapPhysics::ApplySavedVelocities" }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "parameters": ["Object", "Behavior", ""] } ] } @@ -1512,11 +1392,9 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "ScreenWrap::ScreenWrapPhysics::PropertyHorizontalWrapping" }, - "parameters": [ - "\"Horizontal\"" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [ @@ -1524,9 +1402,7 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": [ - "" - ] + "parameters": [""] } ] }, @@ -1535,11 +1411,9 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "ScreenWrap::ScreenWrapPhysics::PropertyHorizontalWrapping" }, - "parameters": [ - "\"Horizontal\"" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [ @@ -1547,9 +1421,7 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": [ - "True" - ] + "parameters": ["True"] } ] } @@ -1582,11 +1454,9 @@ { "type": { "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "ScreenWrap::ScreenWrapPhysics::PropertyVerticalWrapping" }, - "parameters": [ - "\"Vertical\"" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [ @@ -1594,9 +1464,7 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": [ - "" - ] + "parameters": [""] } ] }, @@ -1605,11 +1473,9 @@ "conditions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "ScreenWrap::ScreenWrapPhysics::PropertyVerticalWrapping" }, - "parameters": [ - "\"Vertical\"" - ] + "parameters": ["Object", "Behavior"] } ], "actions": [ @@ -1617,9 +1483,7 @@ "type": { "value": "SetReturnBoolean" }, - "parameters": [ - "True" - ] + "parameters": ["True"] } ] } @@ -1654,21 +1518,15 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": [ - "\"EnableHorizontalWrapping\"" - ] + "parameters": ["\"EnableHorizontalWrapping\""] } ], "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyHorizontalWrapping" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyHorizontalWrapping" }, - "parameters": [ - "Object", - "Behavior", - "no" - ] + "parameters": ["Object", "Behavior", "no"] } ] }, @@ -1679,21 +1537,15 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": [ - "\"EnableHorizontalWrapping\"" - ] + "parameters": ["\"EnableHorizontalWrapping\""] } ], "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyHorizontalWrapping" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyHorizontalWrapping" }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] + "parameters": ["Object", "Behavior", "yes"] } ] } @@ -1733,21 +1585,15 @@ "inverted": true, "value": "GetArgumentAsBoolean" }, - "parameters": [ - "\"EnableVerticalWrapping\"" - ] + "parameters": ["\"EnableVerticalWrapping\""] } ], "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyVerticalWrapping" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyVerticalWrapping" }, - "parameters": [ - "Object", - "Behavior", - "no" - ] + "parameters": ["Object", "Behavior", "no"] } ] }, @@ -1758,21 +1604,15 @@ "type": { "value": "GetArgumentAsBoolean" }, - "parameters": [ - "\"EnableVerticalWrapping\"" - ] + "parameters": ["\"EnableVerticalWrapping\""] } ], "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyVerticalWrapping" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyVerticalWrapping" }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] + "parameters": ["Object", "Behavior", "yes"] } ] } @@ -1812,9 +1652,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyBorderTop()" - ] + "parameters": ["Object.Behavior::PropertyBorderTop()"] } ] } @@ -1852,9 +1690,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyBorderLeft()" - ] + "parameters": ["Object.Behavior::PropertyBorderLeft()"] } ] } @@ -1892,9 +1728,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyBorderRight()" - ] + "parameters": ["Object.Behavior::PropertyBorderRight()"] } ] } @@ -1932,9 +1766,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyBorderBottom()" - ] + "parameters": ["Object.Behavior::PropertyBorderBottom()"] } ] } @@ -1972,9 +1804,7 @@ "type": { "value": "SetReturnNumber" }, - "parameters": [ - "Object.Behavior::PropertyTriggerOffset()" - ] + "parameters": ["Object.Behavior::PropertyTriggerOffset()"] } ] } @@ -2010,7 +1840,7 @@ "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyBorderTop" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyBorderTop" }, "parameters": [ "Object", @@ -2055,7 +1885,7 @@ "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyBorderLeft" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyBorderLeft" }, "parameters": [ "Object", @@ -2100,7 +1930,7 @@ "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyBorderBottom" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyBorderBottom" }, "parameters": [ "Object", @@ -2145,7 +1975,7 @@ "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyBorderRight" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyBorderRight" }, "parameters": [ "Object", @@ -2190,7 +2020,7 @@ "actions": [ { "type": { - "value": "ScreenWrap::ScreenWrap::SetPropertyTriggerOffset" + "value": "ScreenWrap::ScreenWrapPhysics::SetPropertyTriggerOffset" }, "parameters": [ "Object", @@ -2354,9 +2184,7 @@ "label": "Physics Behavior", "description": "", "group": "", - "extraInformation": [ - "Physics2::Physics2Behavior" - ], + "extraInformation": ["Physics2::Physics2Behavior"], "hidden": false, "name": "RequiredPhysicsBehavior" }, @@ -2406,7 +2234,7 @@ "value": "0", "type": "Number", "unit": "Pixel", - "label": "Right border of wrapped area (X).", + "label": "Right border of wrapped area (X)", "description": "If blank, the value will be the scene width.", "group": "", "extraInformation": [], @@ -2470,4 +2298,4 @@ } ], "eventsBasedObjects": [] -} \ No newline at end of file +}