You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
GDScript: Add abstract methods
Co-authored-by: ryanabx <ryanbrue@hotmail.com>
This commit is contained in:
@@ -2254,6 +2254,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
|
||||
codegen.function_node = p_func;
|
||||
|
||||
StringName func_name;
|
||||
bool is_abstract = false;
|
||||
bool is_static = false;
|
||||
Variant rpc_config;
|
||||
GDScriptDataType return_type;
|
||||
@@ -2267,6 +2268,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
|
||||
} else {
|
||||
func_name = "<anonymous lambda>";
|
||||
}
|
||||
is_abstract = p_func->is_abstract;
|
||||
is_static = p_func->is_static;
|
||||
rpc_config = p_func->rpc_config;
|
||||
return_type = _gdtype_from_datatype(p_func->get_datatype(), p_script);
|
||||
@@ -2283,6 +2285,9 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
|
||||
codegen.function_name = func_name;
|
||||
method_info.name = func_name;
|
||||
codegen.is_static = is_static;
|
||||
if (is_abstract) {
|
||||
method_info.flags |= METHOD_FLAG_VIRTUAL_REQUIRED;
|
||||
}
|
||||
if (is_static) {
|
||||
method_info.flags |= METHOD_FLAG_STATIC;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user