From 6b11e378e1808ebac4cc1adf701d34473c589759 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Sat, 19 Jun 2021 19:30:38 +0200 Subject: [PATCH] tweaked make-vars library to reduce internal dependencies --- HISTORY.md | 1 + libraries/make-variables.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 0c70df97..0f07ea3b 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -10,6 +10,7 @@ ### 2021-06-19 * extensions: added color extension primitives * byob: fixed search for dynamic extension menus +* tweaked make-vars library to reduce internal dependencies ### 2021-06-18 * extensions: added text extension primitives diff --git a/libraries/make-variables.xml b/libraries/make-variables.xml index e9bbda14..cd49aabe 100644 --- a/libraries/make-variables.xml +++ b/libraries/make-variables.xml @@ -1 +1 @@ -This block creates new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in 'names' list). If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.
pt:cria as variáveis _ _ ca:crea les _ variables _ es:crear las _ variables _ de:erstellen _ var _ globalglobal sprite script
This block deletes all the variables with the names given (inside input list). Each name will make only one variable deletion, and this will be the variable found following the scope order: 'script' -> 'sprite' -> 'global'. If we have a "testing" sprite variable and also a "testing" global one, deleting "testing" will delete only the sprite one (Yes! we can also do "delete var (testing, testing)" to delete both. If one variable does not exists (in any scope) an error happens, stopping block action in that point. You can check it before with the "does var (name) exists?"block.
pt:remove as variáveis _ ca:esborra les variables _ es:borrar variables _ de:löschen var _
This block sets the given value (last input) to the variable named with the name givent (var input). It looks for that variable following the scope order 'script' -> 'sprite' -> 'global' (the first match it finds). If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the "does var (name) exists?" block.
ca:assigna a _ el valor _ es:asignar a _ el valor _ pt:altera _ para _ de:setze var _ auf _ §_getVarNamesDict
This block reports the value of the variable with the name given. It looks for that variable following the scope order 'script' -> 'sprite' -> 'global' (the first match it finds). If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the "does var (name) exists?" block.
pt:o valor de _ §_getVarNamesDict
This block reports "true" if there is a variable with this given name (input slot) in that context. It can be a global, sprite or script variable. Otherwise it reports "false".
pt:a variável _ existe ca:existeix la variable _ ? es:existe la variable _ ? de:existiert var _ ? err_reset
This block turns on (show) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input). It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order 'script' -> 'sprite' -> 'global'. No errors if that variable does not exist.
ca:mostra la variable _ es:mostrar variable _ pt:mostra a variável _ de:zeige var _ §_getVarNamesDict
This block turns off (hide) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input). It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order 'script' -> 'sprite' -> 'global'. No errors if that variable does not exist.
ca:amaga la variable _ es:esconder variable _ pt:esconde a variável _ de:verstecke var _ §_getVarNamesDict
\ No newline at end of file +This block creates new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in 'names' list). If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.
pt:cria as variáveis _ _ ca:crea les _ variables _ es:crear las _ variables _ de:erstellen _ var _ globalglobal sprite script
This block deletes all the variables with the names given (inside input list). Each name will make only one variable deletion, and this will be the variable found following the scope order: 'script' -> 'sprite' -> 'global'. If we have a "testing" sprite variable and also a "testing" global one, deleting "testing" will delete only the sprite one (Yes! we can also do "delete var (testing, testing)" to delete both. If one variable does not exists (in any scope) an error happens, stopping block action in that point. You can check it before with the "does var (name) exists?"block.
pt:remove as variáveis _ ca:esborra les variables _ es:borrar variables _ de:löschen var _
This block sets the given value (last input) to the variable named with the name givent (var input). It looks for that variable following the scope order 'script' -> 'sprite' -> 'global' (the first match it finds). If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the "does var (name) exists?" block.
ca:assigna a _ el valor _ es:asignar a _ el valor _ pt:altera _ para _ de:setze var _ auf _ §_getVarNamesDict
This block reports the value of the variable with the name given. It looks for that variable following the scope order 'script' -> 'sprite' -> 'global' (the first match it finds). If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the "does var (name) exists?" block.
pt:o valor de _ §_getVarNamesDict
This block reports "true" if there is a variable with this given name (input slot) in that context. It can be a global, sprite or script variable. Otherwise it reports "false".
pt:a variável _ existe ca:existeix la variable _ ? es:existe la variable _ ? de:existiert var _ ? err_reset
This block turns on (show) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input). It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order 'script' -> 'sprite' -> 'global'. No errors if that variable does not exist.
ca:mostra la variable _ es:mostrar variable _ pt:mostra a variável _ de:zeige var _ §_getVarNamesDict
This block turns off (hide) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input). It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order 'script' -> 'sprite' -> 'global'. No errors if that variable does not exist.
ca:amaga la variable _ es:esconder variable _ pt:esconde a variável _ de:verstecke var _ §_getVarNamesDict
\ No newline at end of file