Skip to content

Commit

Permalink
Editor: Don't allow variables with the same names as Resource props
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Jan 29, 2024
1 parent b4ab521 commit 61ef929
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions blackboard/blackboard_plan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ String BlackboardPlan::get_var_name(const BBVariable &p_var) const {
}

bool BlackboardPlan::is_valid_var_name(const String &p_name) const {
if (p_name.begins_with("resource_")) {
return false;
}
return p_name.is_valid_identifier() && !var_map.has(p_name);
}

Expand Down

0 comments on commit 61ef929

Please sign in to comment.