mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +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:
parent
505da68b26
commit
7f7114c008
5 changed files with 101 additions and 136 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue