summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-21 09:20:56 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-21 09:20:56 +0100
commit2becec34cd86854fe315924a45be6017d7ba6498 (patch)
tree0ac389468ed8047f1d4886c477d72add26e8d79f /modules/gdscript/gdscript.h
parent0e125234a3373ed0145d3a624e244f2c2c6f63ac (diff)
parentfb418685a00a235d472c8f80c8e17d6091444fa5 (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.h3
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; }