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

Make global scope enums accessible as types in GDScript

Add functions to CoreConstant so enums can be properly deduced. Also add
the enums in release builds to make consistent with ClassDB enums and
avoid differences in script compilation between debug and release.
This commit is contained in:
George Marques
2023-02-19 12:57:09 -03:00
parent 28db611f0f
commit 75f16b8167
21 changed files with 355 additions and 87 deletions

View File

@@ -124,6 +124,7 @@ public:
bool is_constant = false;
bool is_read_only = false;
bool is_meta_type = false;
bool is_pseudo_type = false; // For global names that can't be used standalone.
bool is_coroutine = false; // For function calls.
Variant::Type builtin_type = Variant::NIL;
@@ -210,6 +211,7 @@ public:
is_read_only = p_other.is_read_only;
is_constant = p_other.is_constant;
is_meta_type = p_other.is_meta_type;
is_pseudo_type = p_other.is_pseudo_type;
is_coroutine = p_other.is_coroutine;
builtin_type = p_other.builtin_type;
native_type = p_other.native_type;