diff --git a/locales/en-us/blocks.json b/locales/en-us/blocks.json index 001b73c2..57be8722 100644 --- a/locales/en-us/blocks.json +++ b/locales/en-us/blocks.json @@ -83,7 +83,11 @@ "while": "Repeat until", "chargerHere": "Is there a charger here?", "trophyHere": "Is there a trophy here?", - "saladBowlHere": "Is there a salad bowl here?" + "saladBowlHere": "Is there a salad bowl here?", + "leftBorder": "Am I on the left edge?", + "rightBorder": "Am I on the right edge?", + "bottomBorder": "Am I on the bottom edge?", + "topBorder": "Am I on the top edge?" }, "procedures": { "definition": "Define", diff --git a/locales/es-ar/blocks.json b/locales/es-ar/blocks.json index 18ad3d3f..75b5b775 100644 --- a/locales/es-ar/blocks.json +++ b/locales/es-ar/blocks.json @@ -82,7 +82,11 @@ "while": "Repetir hasta que", "chargerHere": "¿Hay un cargador acá?", "trophyHere": "¿Hay un trofeo acá?", - "saladBowlHere": "¿Hay una ensaladera acá?" + "saladBowlHere": "¿Hay una ensaladera acá?", + "leftBorder": "¿Estoy en el borde de la izquierda?", + "rightBorder": "¿Estoy en el borde de la derecha?", + "bottomBorder": "¿Estoy en el borde de abajo?", + "topBorder": "¿Estoy en el borde de arriba?" }, "procedures": { "definition": "Definir", diff --git a/locales/pt-br/blocks.json b/locales/pt-br/blocks.json index 8bd56ec1..b4252448 100644 --- a/locales/pt-br/blocks.json +++ b/locales/pt-br/blocks.json @@ -83,7 +83,11 @@ "while": "Repetir até que", "chargerHere": "Há um cargador aqui?", "trophyHere": "Há um troféu aqui?", - "saladBowlHere": "Há uma tigela de salada aqui?" + "saladBowlHere": "Há uma tigela de salada aqui?", + "leftBorder": "Estou na borda esquerda?", + "rightBorder": "Estou na borda direita?", + "bottomBorder": "Estou na borda inferior?", + "topBorder": "Estou na borda superior?" }, "procedures": { "definition": "Definir", diff --git a/package-lock.json b/package-lock.json index 14b12a16..d2ecec78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "jest-watch-typeahead": "^2.2.2", "makensis": "^2.0.8", "mini-css-extract-plugin": "^2.4.5", - "pilas-bloques-exercises": "^1.4.31", + "pilas-bloques-exercises": "^1.4.34", "postcss": "^8.4.4", "postcss-flexbugs-fixes": "^5.0.2", "postcss-loader": "^6.2.1", @@ -20546,9 +20546,9 @@ } }, "node_modules/pilas-bloques-exercises": { - "version": "1.4.31", - "resolved": "https://registry.npmjs.org/pilas-bloques-exercises/-/pilas-bloques-exercises-1.4.31.tgz", - "integrity": "sha512-WH/nanDF5yzJdoUdHOqDN1yay4G18oAvX1DnVKAZnGJzCZqTZraQqg1cqFlx4yqnxSFzjAFjf36Ua2Dt+yTXhg==", + "version": "1.4.34", + "resolved": "https://registry.npmjs.org/pilas-bloques-exercises/-/pilas-bloques-exercises-1.4.34.tgz", + "integrity": "sha512-4OJtyjoc+ZQ6+1k9Hm/iQLcMiDpyhcTKm5CDo9WbPNLIy0bH9wiunAuunaiHF7pN9HU7efin1lewv/21GIzUwg==", "hasInstallScript": true, "dependencies": { "pilasweb": "^0.5.0" @@ -40970,9 +40970,9 @@ "version": "2.3.0" }, "pilas-bloques-exercises": { - "version": "1.4.31", - "resolved": "https://registry.npmjs.org/pilas-bloques-exercises/-/pilas-bloques-exercises-1.4.31.tgz", - "integrity": "sha512-WH/nanDF5yzJdoUdHOqDN1yay4G18oAvX1DnVKAZnGJzCZqTZraQqg1cqFlx4yqnxSFzjAFjf36Ua2Dt+yTXhg==", + "version": "1.4.34", + "resolved": "https://registry.npmjs.org/pilas-bloques-exercises/-/pilas-bloques-exercises-1.4.34.tgz", + "integrity": "sha512-4OJtyjoc+ZQ6+1k9Hm/iQLcMiDpyhcTKm5CDo9WbPNLIy0bH9wiunAuunaiHF7pN9HU7efin1lewv/21GIzUwg==", "requires": { "pilasweb": "^0.5.0" } diff --git a/package.json b/package.json index 55e63401..da99c0cc 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "jest-watch-typeahead": "^2.2.2", "makensis": "^2.0.8", "mini-css-extract-plugin": "^2.4.5", - "pilas-bloques-exercises": "^1.4.31", + "pilas-bloques-exercises": "^1.4.34", "postcss": "^8.4.4", "postcss-flexbugs-fixes": "^5.0.2", "postcss-loader": "^6.2.1", @@ -97,7 +97,7 @@ "scripts": { "postinstall": "sh scripts/copyEmberPB.sh && node ./scripts/change-pilas-versions.js", "test": "jest", - "prestart": "rm node_modules/.vite/deps/* && node scripts/setEmberRoot.js public/emberPB ''", + "prestart": " [ -d node_modules/.vite/deps ] && rm node_modules/.vite/deps/*; node scripts/setEmberRoot.js public/emberPB ''", "start": "vite", "start:host": "vite --host", "start:emberDev": "sh ./scripts/localEmber.sh", diff --git a/public/pilas.html b/public/pilas.html index f82e81ef..c8adedda 100644 --- a/public/pilas.html +++ b/public/pilas.html @@ -22,7 +22,7 @@ - + diff --git a/scripts/copyEmberPB.sh b/scripts/copyEmberPB.sh index 115a7e11..475b260c 100644 --- a/scripts/copyEmberPB.sh +++ b/scripts/copyEmberPB.sh @@ -1,4 +1,4 @@ -PB_APP_VERSION="1.17.6" +PB_APP_VERSION="1.17.9" echo "==> Downloading Pilas Bloques app online..." mkdir -p tmp diff --git a/src/components/blockly/blockly.ts b/src/components/blockly/blockly.ts index 759ab1f1..668db062 100644 --- a/src/components/blockly/blockly.ts +++ b/src/components/blockly/blockly.ts @@ -32,7 +32,7 @@ const directionsColor = '#2ba4e2'; const othersColor = '#cc5b22'; const eventsColor = '#00a65a'; // == boton ejecutar -export const xmlBloqueEmpezarAEjecutar =` +export const xmlBloqueEmpezarAEjecutar = ` ` @@ -925,6 +925,26 @@ const createSensorBlocks = (t: (key: string) => string) => { 'funcionSensor': 'tocando("Trofeo")', }, 'icono.trofeo.png' ); + + createSensorBlock('BordeIzquierdo', t('blocks.leftBorder'), { + 'funcionSensor': 'enBordeIzquierdo()', + }, 'icono.izquierda.png' + ); + + createSensorBlock('BordeDerecho', t('blocks.rightBorder'), { + 'funcionSensor': 'enBordeDerecho()', + }, 'icono.derecha.png' + ); + + createSensorBlock('BordeAbajo', t('blocks.bottomBorder'), { + 'funcionSensor': 'enBordeAbajo()', + }, 'icono.abajo.png' + ); + + createSensorBlock('BordeArriba', t('blocks.topBorder'), { + 'funcionSensor': 'enBordeArriba()', + }, 'icono.arriba.png' + ); } const createValueBlocks = (t: (key: string) => string) => { diff --git a/src/components/blockly/blocks.ts b/src/components/blockly/blocks.ts index dd152092..8785dd00 100644 --- a/src/components/blockly/blocks.ts +++ b/src/components/blockly/blocks.ts @@ -7,7 +7,6 @@ export const categories: string[] = [ 'alternatives', 'values', 'sensors', - 'variables', 'operators' ] @@ -64,18 +63,23 @@ export const commonBlocks: BlockType[] = [ categoryId: 'sensors' }, { - id: 'TocandoDerecha', - intlId: 'canMoveRight', + id: 'BordeArriba', + intlId: 'topBorder', categoryId: 'sensors' }, { - id: 'TocandoAbajo', - intlId: 'canMoveDown', + id: 'BordeAbajo', + intlId: 'bottomBorder', categoryId: 'sensors' }, { - id: 'TocandoMeta', - intlId: 'cameToTheEnd', + id: 'BordeIzquierdo', + intlId: 'leftBorder', + categoryId: 'sensors' + }, + { + id: 'BordeDerecho', + intlId: 'rightBorder', categoryId: 'sensors' }, { @@ -133,16 +137,6 @@ export const commonBlocks: BlockType[] = [ intlId: 'math_arithmetic', categoryId: 'operators' }, - { - id: 'param_get', - intlId: 'variables_get', - categoryId: 'variables' - }, - { - id: 'param_set', - intlId: 'variables_set', - categoryId: 'variables' - }, { id: 'Procedimiento', intlId: 'Procedures',