File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
addons/block_code/ui/picker/categories Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,12 @@ static func get_general_categories() -> Array[BlockCategory]:
173173 b .statement = "str({int} )"
174174 variable_list .append (b )
175175
176+ b = BLOCKS ["parameter_block" ].instantiate ()
177+ b .block_type = Types .BlockType .INT
178+ b .block_format = "Get Int {var: INT} from {object: NODE} "
179+ b .statement = "{object} .VAR_DICT[{var} ]"
180+ variable_list .append (b )
181+
176182 var variable_category : BlockCategory = BlockCategory .new ("Variables" , variable_list , Color ("4f975d" ))
177183
178184 # Objects & Types
@@ -214,6 +220,17 @@ static func get_general_categories() -> Array[BlockCategory]:
214220 b .statement = "bool({value} )"
215221 type_list .append (b )
216222
223+ b = BLOCKS ["parameter_block" ].instantiate ()
224+ b .block_type = Types .BlockType .VARIANT
225+ b .block_format = "Get property {key: STRING} from {object: NODE} "
226+ b .statement = "{object} .get({key} )"
227+ type_list .append (b )
228+
229+ b = BLOCKS ["statement_block" ].instantiate ()
230+ b .block_format = "Set property {key: STRING} in {object: NODE} to {value: VARIANT} "
231+ b .statement = "{object} .set({key} , {value} )"
232+ type_list .append (b )
233+
217234 var type_category : BlockCategory = BlockCategory .new ("Objects & Types" , type_list , Color ("c12f8e" ))
218235
219236 # Math
You can’t perform that action at this time.
0 commit comments