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 @@ -164,6 +164,12 @@ static func get_general_categories() -> Array[BlockCategory]:
164164 b .statement = "str({int} )"
165165 variable_list .append (b )
166166
167+ b = BLOCKS ["parameter_block" ].instantiate ()
168+ b .block_type = Types .BlockType .INT
169+ b .block_format = "Get Int {var: INT} from {object: NODE} "
170+ b .statement = "{object} .VAR_DICT[{var} ]"
171+ variable_list .append (b )
172+
167173 var variable_category : BlockCategory = BlockCategory .new ("Variables" , variable_list , Color ("4f975d" ))
168174
169175 # Objects & Types
@@ -205,6 +211,17 @@ static func get_general_categories() -> Array[BlockCategory]:
205211 b .statement = "bool({value} )"
206212 type_list .append (b )
207213
214+ b = BLOCKS ["parameter_block" ].instantiate ()
215+ b .block_type = Types .BlockType .VARIANT
216+ b .block_format = "Get property {key: STRING} from {object: NODE} "
217+ b .statement = "{object} .get({key} )"
218+ type_list .append (b )
219+
220+ b = BLOCKS ["statement_block" ].instantiate ()
221+ b .block_format = "Set property {key: STRING} in {object: NODE} to {value: VARIANT} "
222+ b .statement = "{object} .set({key} , {value} )"
223+ type_list .append (b )
224+
208225 var type_category : BlockCategory = BlockCategory .new ("Objects & Types" , type_list , Color ("c12f8e" ))
209226
210227 # Math
You can’t perform that action at this time.
0 commit comments