Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add duplication feature #335

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

varshith257
Copy link

@varshith257 varshith257 commented Dec 14, 2024

/claim #201
Closes #201

@manuq
Copy link
Contributor

manuq commented Dec 16, 2024

@varshith257 this doesn't work for me. The scripts have parse errors. See the failed checks above and see how to setup pre-commit checks in the README. Here is the output I get while loading the project from your branch:

Godot Engine v4.3.stable.flathub (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.
--- Debug adapter server started on port 6006 ---
--- GDScript language server started on port 6005 ---
  res://addons/block_code/ui/main_panel.gd:51 - Parse Error: Could not resolve external class member "copy_picked_block_and_drag".
  res://addons/block_code/ui/main_panel.gd:51 - Parse Error: Could not resolve external class member "block_picked".
  res://addons/block_code/ui/main_panel.gd:53 - Parse Error: Could not resolve external class member "connect_block_canvas_signals".
  res://addons/block_code/ui/main_panel.gd:53 - Parse Error: Could not resolve external class member "reconnect_block".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/main_panel.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/entry_block/entry_block.gd:3 - Parse Error: Could not resolve super class inheritance from "StatementBlock".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/entry_block/entry_block.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/utilities/background/background.gd:14 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/background/background.gd:61 - Parse Error: Could not resolve external class member "get_parent_block".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/utilities/background/background.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.gd:29 - Parse Error: Used space character for indentation instead of tab as used before in the file.
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:9 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:9 - Parse Error: Cannot use simple "@export" annotation because the type of the initialized value can't be inferred.
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:23 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:24 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:25 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:44 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:52 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:62 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:62 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:79 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:38 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:88 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd:101 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/utilities/template_editor/template_editor.gd:38 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/template_editor/template_editor.gd:45 - Parse Error: Could not resolve external class member "get_parent_block".
  res://addons/block_code/ui/blocks/utilities/template_editor/template_editor.gd:139 - Parse Error: Could not resolve external class member "block".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/utilities/template_editor/template_editor.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/statement_block/statement_block.gd:3 - Parse Error: Could not resolve super class inheritance from "Block".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/statement_block/statement_block.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/parameter_block/parameter_block.gd:3 - Parse Error: Could not resolve super class inheritance from "Block".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/parameter_block/parameter_block.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/control_block/control_block.gd:3 - Parse Error: Could not resolve super class inheritance from "Block".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/control_block/control_block.gd" with error "Parse error". (User)
  res://addons/block_code/ui/blocks/utilities/background/gutter.gd:8 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/blocks/utilities/background/gutter.gd:21 - Parse Error: Could not resolve external class member "get_parent_block".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/utilities/background/gutter.gd" with error "Parse error". (User)
  res://addons/block_code/serialization/block_script_serialization.gd:56 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:74 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:68 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/block_code_node/block_code.gd:-1 - Compile Error: 
  res://addons/block_code/ui/main_panel.gd:51 - Parse Error: Could not resolve external class member "copy_picked_block_and_drag".
  res://addons/block_code/ui/main_panel.gd:51 - Parse Error: Could not resolve external class member "block_picked".
  res://addons/block_code/ui/main_panel.gd:53 - Parse Error: Could not resolve external class member "connect_block_canvas_signals".
  res://addons/block_code/ui/main_panel.gd:53 - Parse Error: Could not resolve external class member "reconnect_block".
  res://addons/block_code/ui/main_panel.gd:51 - Parse Error: Could not resolve external class member "copy_picked_block_and_drag".
  res://addons/block_code/ui/main_panel.gd:51 - Parse Error: Could not resolve external class member "block_picked".
  res://addons/block_code/ui/main_panel.gd:53 - Parse Error: Could not resolve external class member "connect_block_canvas_signals".
  res://addons/block_code/ui/main_panel.gd:53 - Parse Error: Could not resolve external class member "reconnect_block".
  res://addons/block_code/inspector_plugin/block_script_inspector.gd:-1 - Compile Error: 
  res://addons/block_code/block_code_plugin.gd:-1 - Compile Error: 
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/block_code_plugin.gd" with error "Compilation failed". (User)
  res://addons/block_code/ui/picker/categories/variable_category/variable_category_display.gd:2 - Parse Error: Could not resolve class "res://addons/block_code/ui/picker/categories/block_category_display.gd".
  res://addons/block_code/ui/picker/categories/variable_category/variable_category_display.gd:2 - Parse Error: Could not resolve class "res://addons/block_code/ui/picker/categories/block_category_display.gd".
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/picker/categories/variable_category/variable_category_display.gd" with error "Parse error". (User)
  res://addons/block_code/serialization/block_script_serialization.gd:56 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:74 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:68 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/block_editor_context.gd:-1 - Compile Error: 
  res://addons/block_code/serialization/block_script_serialization.gd:56 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:74 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:68 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/ui/picker/categories/variable_category/create_variable_dialog.gd:-1 - Compile Error: 
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/picker/categories/variable_category/create_variable_dialog.gd" with error "Compilation failed". (User)
  res://addons/block_code/block_code_plugin.gd:47 - Invalid access to property or key 'script_window_requested' on a base object of type 'MarginContainer (main_panel.gd)'.
  res://addons/block_code/block_code_plugin.gd:157 - Invalid call. Nonexistent function 'switch_block_code_node' in base 'MarginContainer (main_panel.gd)'.
  res://addons/block_code/ui/blocks/block/block.gd:163 - Parse Error: Used space character for indentation instead of tab as used before in the file.
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://addons/block_code/ui/blocks/block/block.gd" with error "Parse error". (User)
  res://addons/block_code/block_code_node/block_code.gd:48 - Invalid assignment of property or key 'block_code_node' with value of type 'Node (BlockCode)' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:48 - Invalid assignment of property or key 'block_code_node' with value of type 'Node (BlockCode)' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:48 - Invalid assignment of property or key 'block_code_node' with value of type 'Node (BlockCode)' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:48 - Invalid assignment of property or key 'block_code_node' with value of type 'Node (BlockCode)' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:48 - Invalid assignment of property or key 'block_code_node' with value of type 'Node (BlockCode)' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:48 - Invalid assignment of property or key 'block_code_node' with value of type 'Node (BlockCode)' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:48 - Invalid assignment of property or key 'block_code_node' with value of type 'Node (BlockCode)' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:36 - Invalid assignment of property or key 'script_inherits' with value of type 'String' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:36 - Invalid assignment of property or key 'script_inherits' with value of type 'String' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:36 - Invalid assignment of property or key 'script_inherits' with value of type 'String' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:36 - Invalid assignment of property or key 'script_inherits' with value of type 'String' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:36 - Invalid assignment of property or key 'script_inherits' with value of type 'String' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:36 - Invalid assignment of property or key 'script_inherits' with value of type 'String' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/block_code_node/block_code.gd:36 - Invalid assignment of property or key 'script_inherits' with value of type 'String' on a base object of type 'Resource (BlockScriptSerialization)'.
  res://addons/block_code/serialization/block_script_serialization.gd:56 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:74 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:68 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://tests/test_category_factory.gd:-1 - Compile Error: 
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://tests/test_category_factory.gd" with error "Parse error". (User)
  res://addons/block_code/serialization/block_script_serialization.gd:56 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:74 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:68 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/code_generation/script_generator.gd:-1 - Compile Error: 
  res://addons/block_code/serialization/block_script_serialization.gd:56 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:74 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://addons/block_code/serialization/block_script_serialization.gd:68 - Parse Error: Could not parse global class "Block" from "res://addons/block_code/ui/blocks/block/block.gd".
  res://tests/test_code_generation.gd:-1 - Compile Error: 
  modules/gdscript/gdscript.cpp:2936 - Failed to load script "res://tests/test_code_generation.gd" with error "Parse error". (User)
  res://addons/block_code/block_code_plugin.gd:157 - Invalid call. Nonexistent function 'switch_block_code_node' in base 'MarginContainer (main_panel.gd)'.

Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts have parse errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add duplicate function for easy use ($200 bounty)
2 participants