|
|
|
@ -417,14 +417,12 @@ void BlackboardPlan::populate_blackboard(const Ref<Blackboard> &p_blackboard, bo
|
|
|
|
|
ERR_FAIL_COND(p_blackboard.is_null());
|
|
|
|
|
for (const Pair<StringName, BBVariable> &p : var_list) {
|
|
|
|
|
if (p_blackboard->has_local_var(p.first) && !overwrite) {
|
|
|
|
|
#ifdef DEBUG_ENABLED
|
|
|
|
|
Variant::Type existing_type = p_blackboard->get_var(p.first).get_type();
|
|
|
|
|
Variant::Type planned_type = p.second.get_type();
|
|
|
|
|
if (existing_type != planned_type && existing_type != Variant::NIL && planned_type != Variant::NIL && !(existing_type == Variant::OBJECT && planned_type == Variant::NODE_PATH)) {
|
|
|
|
|
if (existing_type != planned_type && existing_type != Variant::NIL && planned_type != Variant::NIL) {
|
|
|
|
|
WARN_PRINT(vformat("BlackboardPlan: Not overwriting %s as it already exists in the blackboard, but it has a different type than planned (%s vs %s). File: %s",
|
|
|
|
|
LimboUtility::get_singleton()->decorate_var(p.first), Variant::get_type_name(existing_type), Variant::get_type_name(planned_type), get_path()));
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
bool has_mapping = parent_scope_mapping.has(p.first);
|
|
|
|
|