mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
-make sure instance placeholder works with duplicate(), fixes #3378
This commit is contained in:
@@ -14,11 +14,24 @@ bool InstancePlaceholder::_set(const StringName& p_name, const Variant& p_value)
|
||||
|
||||
bool InstancePlaceholder::_get(const StringName& p_name,Variant &r_ret) const{
|
||||
|
||||
for (const List<PropSet>::Element *E=stored_values.front();E;E=E->next()) {
|
||||
if (E->get().name==p_name) {
|
||||
r_ret=E->get().value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void InstancePlaceholder::_get_property_list( List<PropertyInfo> *p_list) const{
|
||||
|
||||
for (const List<PropSet>::Element *E=stored_values.front();E;E=E->next()) {
|
||||
PropertyInfo pi;
|
||||
pi.name=E->get().name;
|
||||
pi.type=E->get().value.get_type();
|
||||
pi.usage=PROPERTY_USAGE_STORAGE;
|
||||
|
||||
p_list->push_back(pi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user