@@ -202,53 +202,11 @@ static func get_general_blocks() -> Array[Block]:
202
202
b = Util .instantiate_block (block_name )
203
203
block_list .append (b )
204
204
205
- #region Logic
206
-
207
- b = BLOCKS ["control_block" ].instantiate ()
208
- b .block_name = "if"
209
- b .block_formats = ["if {condition: BOOL} " ]
210
- b .statements = ["if {condition} :" ]
211
- b .category = "Logic | Conditionals"
212
- block_list .append (b )
213
-
214
- b = BLOCKS ["control_block" ].instantiate ()
215
- b .block_name = "if_else"
216
- b .block_formats = ["if {condition: BOOL} " , "else" ]
217
- b .statements = ["if {condition} :" , "else:" ]
218
- b .category = "Logic | Conditionals"
219
- block_list .append (b )
220
-
221
- b = BLOCKS ["parameter_block" ].instantiate ()
222
- b .block_name = "compare_int"
223
- b .variant_type = TYPE_BOOL
224
- b .block_format = "{int1: INT} {op: OPTION} {int2: INT} "
225
- b .statement = "({int1} {op} {int2} )"
226
- b .defaults = {
227
- "op" : OptionData .new (["==" , ">" , "<" , ">=" , "<=" , "!=" ]),
228
- "int1" : "1" ,
229
- "int2" : "1" ,
230
- }
231
- b .category = "Logic | Comparison"
232
- block_list .append (b )
233
-
234
- for op in ["and" , "or" ]:
235
- b = BLOCKS ["parameter_block" ].instantiate ()
236
- b .block_name = op
237
- b .variant_type = TYPE_BOOL
238
- b .block_format = "{bool1: BOOL} %s {bool2: BOOL} " % op
239
- b .statement = "({bool1} %s {bool2} )" % op
240
- b .category = "Logic | Boolean"
205
+ # Logic
206
+ for block_name in [& "if" , & "else_if" , & "else" , & "compare" , & "and" , & "or" , & "not" ]:
207
+ b = Util .instantiate_block (block_name )
241
208
block_list .append (b )
242
209
243
- b = BLOCKS ["parameter_block" ].instantiate ()
244
- b .block_name = "not"
245
- b .variant_type = TYPE_BOOL
246
- b .block_format = "Not {bool: BOOL} "
247
- b .statement = "(not {bool} )"
248
- b .category = "Logic | Boolean"
249
- block_list .append (b )
250
-
251
- #endregion
252
210
#region Input
253
211
254
212
block_list .append_array (_get_input_blocks ())
0 commit comments