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

@ -189,7 +189,7 @@ void GDScriptCache::remove_script(const String &p_path) {
if (HashMap<String, Vector<ObjectID>>::Iterator E = singleton->abandoned_parser_map.find(p_path)) {
for (ObjectID parser_ref_id : E->value) {
Ref<GDScriptParserRef> parser_ref{ ObjectDB::get_instance(parser_ref_id) };
Ref<GDScriptParserRef> parser_ref = { ObjectDB::get_instance(parser_ref_id) };
if (parser_ref.is_valid()) {
parser_ref->clear();
}
@ -275,7 +275,7 @@ String GDScriptCache::get_source_code(const String &p_path) {
source_file.write[len] = 0;
String source;
if (source.parse_utf8((const char *)source_file.ptr(), len) != OK) {
if (source.append_utf8((const char *)source_file.ptr(), len) != OK) {
ERR_FAIL_V_MSG("", "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode.");
}
return source;
@ -460,7 +460,7 @@ void GDScriptCache::clear() {
for (const KeyValue<String, Vector<ObjectID>> &KV : singleton->abandoned_parser_map) {
for (ObjectID parser_ref_id : KV.value) {
Ref<GDScriptParserRef> parser_ref{ ObjectDB::get_instance(parser_ref_id) };
Ref<GDScriptParserRef> parser_ref = { ObjectDB::get_instance(parser_ref_id) };
if (parser_ref.is_valid()) {
parser_ref->clear();
}
@ -485,6 +485,7 @@ void GDScriptCache::clear() {
parser_map_refs.clear();
singleton->shallow_gdscript_cache.clear();
singleton->full_gdscript_cache.clear();
singleton->static_gdscript_cache.clear();
}
GDScriptCache::GDScriptCache() {