diff options
author | Juan Linietsky <reduzio@gmail.com> | 2023-01-13 13:16:49 +0100 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2023-01-13 15:13:56 +0100 |
commit | 6f0e210093dbd3f20bec34a4e60861dcceabd484 (patch) | |
tree | 608560e2f51e2b5a26542268a625266b2cdf62de /platform/web/export | |
parent | 3c9bf4bc210a8e6a208f30ca59de4d4d7e18c04d (diff) |
Refactor ProjectSetting overrides
* Overrides no longer happen for set/get.
* They must be checked with a new function: `ProjectSettings::get_setting_with_override()`.
* GLOBAL_DEF/GLOBAL_GET updated to use this
This change solves many problems:
* General confusion about getting the actual or overriden setting.
* Feature tags available after settings are loaded were being ignored, they are now considered.
* Hacks required for the Project Settings editor to work.
Fixes #64100. Fixes #64014. Fixes #61908.
Diffstat (limited to 'platform/web/export')
-rw-r--r-- | platform/web/export/export_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cpp index 3e11db6887..05959c4fd4 100644 --- a/platform/web/export/export_plugin.cpp +++ b/platform/web/export/export_plugin.cpp @@ -153,7 +153,7 @@ void EditorExportPlatformWeb::_fix_html(Vector<uint8_t> &p_html, const Ref<Edito const String custom_head_include = p_preset->get("html/head_include"); HashMap<String, String> replaces; replaces["$GODOT_URL"] = p_name + ".js"; - replaces["$GODOT_PROJECT_NAME"] = ProjectSettings::get_singleton()->get_setting("application/config/name"); + replaces["$GODOT_PROJECT_NAME"] = GLOBAL_GET("application/config/name"); replaces["$GODOT_HEAD_INCLUDE"] = head_include + custom_head_include; replaces["$GODOT_CONFIG"] = str_config; _replace_strings(replaces, p_html); @@ -193,7 +193,7 @@ Error EditorExportPlatformWeb::_add_manifest_icon(const String &p_path, const St } Error EditorExportPlatformWeb::_build_pwa(const Ref<EditorExportPreset> &p_preset, const String p_path, const Vector<SharedObject> &p_shared_objects) { - String proj_name = ProjectSettings::get_singleton()->get_setting("application/config/name"); + String proj_name = GLOBAL_GET("application/config/name"); if (proj_name.is_empty()) { proj_name = "Godot Game"; } |