From 5c8b4dfc3ba748aa101234ad9fa52c9d93a60f9a Mon Sep 17 00:00:00 2001 From: Haroldo de Oliveira Pinheiro Date: Thu, 10 Oct 2024 19:29:55 -0300 Subject: [PATCH 1/2] Fix checking collision of some element with itself. If the element is colliding with itself, always return true. --- src/generators/bbasic/collision.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/generators/bbasic/collision.js b/src/generators/bbasic/collision.js index c3b3825..4e4d708 100644 --- a/src/generators/bbasic/collision.js +++ b/src/generators/bbasic/collision.js @@ -6,8 +6,10 @@ export default (Blockly) => { Blockly.VARIABLE_CATEGORY_NAME); const var1 = Blockly.BBasic.nameDB_.getName(block.getFieldValue('VAR1'), Blockly.VARIABLE_CATEGORY_NAME); - // Variable getter. - const code = `collision(${var0}, ${var1})`; + + const code = var0 === var1 ? 'true' : + `collision(${var0}, ${var1})`; + return [code, Blockly.BBasic.ORDER_ATOMIC]; }; }; From 8ed2f1a5e441fb3e01ee970169773f57f6c34959 Mon Sep 17 00:00:00 2001 From: Haroldo de Oliveira Pinheiro Date: Thu, 10 Oct 2024 19:32:29 -0300 Subject: [PATCH 2/2] Bump version to 0.25.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c90811..20ca89c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vcs-game-maker", - "version": "0.25.4", + "version": "0.25.5", "private": true, "scripts": { "serve": "vue-cli-service serve",