Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion addons/block_code/block_code_node/block_code.gd
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ func _get_configuration_warnings():
if get_parent() is BlockCode:
warnings.append("The parent must not be a BlockCode.")
if get_parent().script:
warnings.append("This BlockCode will override the existing script in the parent node.")
var parent_script_name: StringName = get_parent().script.get_global_name()
if not (parent_script_name and block_script and parent_script_name == block_script.script_inherits):
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

warnings.append("This BlockCode will override the existing script in the parent node.")
if get_parent().find_children("*", "BlockCode", false).size() > 1:
warnings.append("The parent should only contain one BlockCode.")
if block_script and _get_custom_or_native_class(get_parent()) != block_script.script_inherits:
Expand Down