feat: modules moved and engine moved to submodule

This commit is contained in:
Jan van der Weide 2025-04-12 18:40:44 +02:00
parent dfb5e645cd
commit c33d2130cc
5136 changed files with 225275 additions and 64485 deletions

View file

@ -1674,14 +1674,11 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
Dictionary d = p_variant;
_find_resources(d.get_typed_key_script());
_find_resources(d.get_typed_value_script());
List<Variant> keys;
d.get_key_list(&keys);
for (const Variant &E : keys) {
for (const KeyValue<Variant, Variant> &kv : d) {
// Of course keys should also be cached, after all we can't prevent users from using resources as keys, right?
// See also ResourceFormatSaverBinaryInstance::_find_resources (when p_variant is of type Variant::DICTIONARY)
_find_resources(E);
Variant v = d[E];
_find_resources(v);
_find_resources(kv.key);
_find_resources(kv.value);
}
} break;
case Variant::PACKED_BYTE_ARRAY: {
@ -1908,18 +1905,18 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso
List<PropertyInfo> property_list;
res->get_property_list(&property_list);
for (List<PropertyInfo>::Element *PE = property_list.front(); PE; PE = PE->next()) {
if (skip_editor && PE->get().name.begins_with("__editor")) {
for (const PropertyInfo &pi : property_list) {
if (skip_editor && pi.name.begins_with("__editor")) {
continue;
}
if (PE->get().name == META_PROPERTY_MISSING_RESOURCES) {
if (pi.name == META_PROPERTY_MISSING_RESOURCES) {
continue;
}
if (PE->get().usage & PROPERTY_USAGE_STORAGE || missing_resource_properties.has(PE->get().name)) {
String name = PE->get().name;
if (pi.usage & PROPERTY_USAGE_STORAGE || missing_resource_properties.has(pi.name)) {
String name = pi.name;
Variant value;
if (PE->get().usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) {
if (pi.usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) {
NonPersistentKey npk;
npk.base = res;
npk.property = name;
@ -1930,11 +1927,11 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso
value = res->get(name);
}
if (PE->get().type == Variant::OBJECT && missing_resource_properties.has(PE->get().name)) {
if (pi.type == Variant::OBJECT && missing_resource_properties.has(pi.name)) {
// Was this missing resource overridden? If so do not save the old value.
Ref<Resource> ures = value;
if (ures.is_null()) {
value = missing_resource_properties[PE->get().name];
value = missing_resource_properties[pi.name];
}
}
@ -1944,7 +1941,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const Ref<Reso
continue;
}
if (PE->get().type == Variant::OBJECT && value.is_zero() && !(PE->get().usage & PROPERTY_USAGE_STORE_IF_NULL)) {
if (pi.type == Variant::OBJECT && value.is_zero() && !(pi.usage & PROPERTY_USAGE_STORE_IF_NULL)) {
continue;
}