diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-19 17:00:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-07-19 17:06:03 -0300 |
commit | 25678b1876816b9ccb14b2c92aef62f3b009f88f (patch) | |
tree | 189f082d788f78e16f620b056d21249118883fc5 /modules/visual_script/visual_script_func_nodes.cpp | |
parent | 89588d43349e496a9e05756d42ae87323d31269e (diff) | |
download | redot-engine-25678b1876816b9ccb14b2c92aef62f3b009f88f.tar.gz |
-Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
Diffstat (limited to 'modules/visual_script/visual_script_func_nodes.cpp')
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 93b2aa2982..c42e784fbc 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "visual_script_func_nodes.h" -#include "global_config.h" +#include "project_settings.h" #include "io/resource_loader.h" #include "os/os.h" #include "scene/main/node.h" @@ -347,7 +347,7 @@ void VisualScriptFunctionCall::set_singleton(const StringName &p_path) { return; singleton = p_path; - Object *obj = GlobalConfig::get_singleton()->get_singleton_object(singleton); + Object *obj = ProjectSettings::get_singleton()->get_singleton_object(singleton); if (obj) { base_type = obj->get_class(); } @@ -383,7 +383,7 @@ void VisualScriptFunctionCall::_update_method_cache() { } else if (call_mode == CALL_MODE_SINGLETON) { - Object *obj = GlobalConfig::get_singleton()->get_singleton_object(singleton); + Object *obj = ProjectSettings::get_singleton()->get_singleton_object(singleton); if (obj) { type = obj->get_class(); script = obj->get_script(); @@ -568,11 +568,11 @@ void VisualScriptFunctionCall::_validate_property(PropertyInfo &property) const if (call_mode != CALL_MODE_SINGLETON) { property.usage = 0; } else { - List<GlobalConfig::Singleton> names; - GlobalConfig::get_singleton()->get_singletons(&names); + List<ProjectSettings::Singleton> names; + ProjectSettings::get_singleton()->get_singletons(&names); property.hint = PROPERTY_HINT_ENUM; String sl; - for (List<GlobalConfig::Singleton>::Element *E = names.front(); E; E = E->next()) { + for (List<ProjectSettings::Singleton>::Element *E = names.front(); E; E = E->next()) { if (sl != String()) sl += ","; sl += E->get().name; @@ -606,7 +606,7 @@ void VisualScriptFunctionCall::_validate_property(PropertyInfo &property) const property.hint_string = itos(get_visual_script()->get_instance_ID()); } else if (call_mode == CALL_MODE_SINGLETON) { - Object *obj = GlobalConfig::get_singleton()->get_singleton_object(singleton); + Object *obj = ProjectSettings::get_singleton()->get_singleton_object(singleton); if (obj) { property.hint = PROPERTY_HINT_METHOD_OF_INSTANCE; property.hint_string = itos(obj->get_instance_ID()); @@ -867,7 +867,7 @@ public: } break; case VisualScriptFunctionCall::CALL_MODE_SINGLETON: { - Object *object = GlobalConfig::get_singleton()->get_singleton_object(singleton); + Object *object = ProjectSettings::get_singleton()->get_singleton_object(singleton); if (!object) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; r_error_str = "Invalid singleton name: '" + String(singleton) + "'"; |