Skip to content

Commit 336383e

Browse files
authored
Merge pull request #361 from endlessm/fix-356
Warn when Block Code overrides parent script
2 parents 3dc22a2 + 87c31b0 commit 336383e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

addons/block_code/block_code_node/block_code.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ func _get_configuration_warnings():
8484
warnings.append("A BlockCode must not be a root node.")
8585
if get_parent() is BlockCode:
8686
warnings.append("The parent must not be a BlockCode.")
87+
if get_parent().script:
88+
warnings.append("This BlockCode will override the existing script in the parent node.")
8789
if get_parent().find_children("*", "BlockCode", false).size() > 1:
8890
warnings.append("The parent should only contain one BlockCode.")
8991
if block_script and _get_custom_or_native_class(get_parent()) != block_script.script_inherits:

0 commit comments

Comments
 (0)