mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
GDScript: Refactor builtin functions
They are now called "utility functions" to avoid confusion with methods of builtin types, and be consistent with the naming in Variant. Core utility functions are now available in GDScript. The ones missing in core are added specifically to GDScript as helpers for convenience. Some functions were remove when there are better ways to do, reducing redundancy and cleaning up the global scope.
This commit is contained in:
parent
613b76cfd5
commit
c7b6a7adcc
17 changed files with 1085 additions and 2116 deletions
|
@ -1889,8 +1889,11 @@ void GDScriptLanguage::get_reserved_words(List<String> *p_words) const {
|
|||
w++;
|
||||
}
|
||||
|
||||
for (int i = 0; i < GDScriptFunctions::FUNC_MAX; i++) {
|
||||
p_words->push_back(GDScriptFunctions::get_func_name(GDScriptFunctions::Function(i)));
|
||||
List<StringName> functions;
|
||||
GDScriptUtilityFunctions::get_function_list(&functions);
|
||||
|
||||
for (const List<StringName>::Element *E = functions.front(); E; E = E->next()) {
|
||||
p_words->push_back(String(E->get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue