From 6f0e210093dbd3f20bec34a4e60861dcceabd484 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 13 Jan 2023 13:16:49 +0100 Subject: 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. --- platform/web/export/export_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/web/export') 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 &p_html, const Refget("html/head_include"); HashMap 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 &p_preset, const String p_path, const Vector &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"; } -- cgit v1.2.3