1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Remove underscore hacks

Way less cruft. :)

Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
This commit is contained in:
Max Hilbrunner
2021-08-17 15:06:54 +02:00
parent 81f7d1890b
commit 5161c97c9c
12 changed files with 38 additions and 132 deletions

View File

@@ -1644,16 +1644,11 @@ void GDScriptLanguage::init() {
List<StringName> class_list;
ClassDB::get_class_list(&class_list);
for (const StringName &n : class_list) {
String s = String(n);
if (s.begins_with("_")) {
s = s.substr(1, s.length());
}
if (globals.has(s)) {
if (globals.has(n)) {
continue;
}
Ref<GDScriptNativeClass> nc = memnew(GDScriptNativeClass(n));
_add_global(s, nc);
_add_global(n, nc);
}
//populate singletons