import * as Blockly from 'blockly';
(Blockly as any).Blocks.variables_get_panda = {
init(){
this.jsonInit({
message0: ' %1',
args0: [
{
type: "field_variable",
name: "VAR",
variable: "%{BKY_VARIABLES_DEFAULT_NAME}",
variableTypes: ["Panda"] // Specifies what types to put in the dropdown
}
],
output: "Panda", // Returns a value of "Panda"
tooltip: "",
helpUrl: ""
})
}
},
(Blockly as any).Blocks.variables_set_panda = {
init(){
this.jsonInit({
message0: '%{BKY_VARIABLES_SET}',
args0: [
{
type: "field_variable",
name: "VAR",
variable: "%{BKY_VARIABLES_DEFAULT_NAME}",
variableTypes: ["Panda"] // Specifies what types to put in the dropdown
},
{
type: "input_value",
name: "VALUE",
check: "Panda" // Checks that the input value is of type "Panda"
}
],
previousStatement: null,
nextStatement: null,
tooltip: "",
helpUrl: ""
})
}
};