diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-21 09:20:56 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-21 09:20:56 +0100 |
commit | 2becec34cd86854fe315924a45be6017d7ba6498 (patch) | |
tree | 0ac389468ed8047f1d4886c477d72add26e8d79f /modules/gdscript/gdscript.h | |
parent | 0e125234a3373ed0145d3a624e244f2c2c6f63ac (diff) | |
parent | fb418685a00a235d472c8f80c8e17d6091444fa5 (diff) |
Merge pull request #70331 from anvilfolk/run-weird
Unify GDScriptAnalyzer in-editor and runtime autoload checks
Diffstat (limited to 'modules/gdscript/gdscript.h')
-rw-r--r-- | modules/gdscript/gdscript.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h index 332d18f720..39367e377b 100644 --- a/modules/gdscript/gdscript.h +++ b/modules/gdscript/gdscript.h @@ -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; } |