You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Unify usage of GLOBAL/EDITOR_GET
This commit is contained in:
@@ -1022,7 +1022,7 @@ Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restar
|
||||
if (!ProjectSettings::get_singleton()->has_setting(p_var)) {
|
||||
ProjectSettings::get_singleton()->set(p_var, p_default);
|
||||
}
|
||||
ret = ProjectSettings::get_singleton()->get(p_var);
|
||||
ret = GLOBAL_GET(p_var);
|
||||
|
||||
ProjectSettings::get_singleton()->set_initial_value(p_var, p_default);
|
||||
ProjectSettings::get_singleton()->set_builtin_order(p_var);
|
||||
|
||||
@@ -257,7 +257,7 @@ void InputMap::load_from_project_settings() {
|
||||
|
||||
String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length());
|
||||
|
||||
Dictionary action = ProjectSettings::get_singleton()->get(pi.name);
|
||||
Dictionary action = GLOBAL_GET(pi.name);
|
||||
float deadzone = action.has("deadzone") ? (float)action["deadzone"] : 0.5f;
|
||||
Array events = action["events"];
|
||||
|
||||
|
||||
@@ -914,7 +914,7 @@ void ResourceLoader::load_translation_remaps() {
|
||||
return;
|
||||
}
|
||||
|
||||
Dictionary remaps = ProjectSettings::get_singleton()->get("internationalization/locale/translation_remaps");
|
||||
Dictionary remaps = GLOBAL_GET("internationalization/locale/translation_remaps");
|
||||
List<Variant> keys;
|
||||
remaps.get_key_list(&keys);
|
||||
for (const Variant &E : keys) {
|
||||
@@ -941,7 +941,7 @@ void ResourceLoader::load_path_remaps() {
|
||||
return;
|
||||
}
|
||||
|
||||
Vector<String> remaps = ProjectSettings::get_singleton()->get("path_remap/remapped_paths");
|
||||
Vector<String> remaps = GLOBAL_GET("path_remap/remapped_paths");
|
||||
int rc = remaps.size();
|
||||
ERR_FAIL_COND(rc & 1); //must be even
|
||||
const String *r = remaps.ptr();
|
||||
|
||||
@@ -184,10 +184,10 @@ void ScriptServer::unregister_language(const ScriptLanguage *p_language) {
|
||||
}
|
||||
|
||||
void ScriptServer::init_languages() {
|
||||
{ //load global classes
|
||||
{ // Load global classes.
|
||||
global_classes_clear();
|
||||
if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) {
|
||||
Array script_classes = ProjectSettings::get_singleton()->get("_global_script_classes");
|
||||
Array script_classes = GLOBAL_GET("_global_script_classes");
|
||||
|
||||
for (int i = 0; i < script_classes.size(); i++) {
|
||||
Dictionary c = script_classes[i];
|
||||
@@ -305,7 +305,7 @@ void ScriptServer::save_global_classes() {
|
||||
|
||||
Array old;
|
||||
if (ProjectSettings::get_singleton()->has_setting("_global_script_classes")) {
|
||||
old = ProjectSettings::get_singleton()->get("_global_script_classes");
|
||||
old = GLOBAL_GET("_global_script_classes");
|
||||
}
|
||||
if ((!old.is_empty() || gcarr.is_empty()) && gcarr.hash() == old.hash()) {
|
||||
return;
|
||||
|
||||
@@ -628,7 +628,7 @@ TranslationServer *TranslationServer::singleton = nullptr;
|
||||
|
||||
bool TranslationServer::_load_translations(const String &p_from) {
|
||||
if (ProjectSettings::get_singleton()->has_setting(p_from)) {
|
||||
const Vector<String> &translation_names = ProjectSettings::get_singleton()->get(p_from);
|
||||
const Vector<String> &translation_names = GLOBAL_GET(p_from);
|
||||
|
||||
int tcount = translation_names.size();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user