You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
GDScript: partially allow some functions on invalid scripts
+ always default initialize static variables + dont invalidate script when dependant scripts don't compile/resolve
This commit is contained in:
@@ -3006,6 +3006,8 @@ Error GDScriptCompiler::_compile_class(GDScript *p_script, const GDScriptParser:
|
||||
has_static_data = has_static_data || inner_class->has_static_data;
|
||||
}
|
||||
|
||||
p_script->_static_default_init();
|
||||
|
||||
p_script->valid = true;
|
||||
return OK;
|
||||
}
|
||||
@@ -3228,11 +3230,7 @@ Error GDScriptCompiler::compile(const GDScriptParser *p_parser, GDScript *p_scri
|
||||
GDScriptCache::add_static_script(p_script);
|
||||
}
|
||||
|
||||
err = GDScriptCache::finish_compiling(main_script->path);
|
||||
if (err) {
|
||||
main_script->valid = false;
|
||||
}
|
||||
return err;
|
||||
return GDScriptCache::finish_compiling(main_script->path);
|
||||
}
|
||||
|
||||
String GDScriptCompiler::get_error() const {
|
||||
|
||||
Reference in New Issue
Block a user