diff options
Diffstat (limited to 'modules/gdscript/gdscript.h')
-rw-r--r-- | modules/gdscript/gdscript.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h index 7911ea47ec..39367e377b 100644 --- a/modules/gdscript/gdscript.h +++ b/modules/gdscript/gdscript.h @@ -187,7 +187,7 @@ public: bool inherits_script(const Ref<Script> &p_script) const override; GDScript *find_class(const String &p_qualified_name); - bool is_subclass(const GDScript *p_script); + bool has_class(const GDScript *p_script); GDScript *get_root_script(); bool is_root_script() const { return _owner == nullptr; } String get_fully_qualified_name() const { return fully_qualified_name; } @@ -455,6 +455,9 @@ public: _FORCE_INLINE_ Variant *get_global_array() { return _global_array; } _FORCE_INLINE_ const HashMap<StringName, int> &get_global_map() const { return globals; } _FORCE_INLINE_ const HashMap<StringName, Variant> &get_named_globals_map() const { return named_globals; } + // These two functions should be used when behavior needs to be consistent between in-editor and running the scene + bool has_any_global_constant(const StringName &p_name) { return named_globals.has(p_name) || globals.has(p_name); } + Variant get_any_global_constant(const StringName &p_name); _FORCE_INLINE_ static GDScriptLanguage *get_singleton() { return singleton; } |