mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #111909 from bruvzg/mods_are_bad_they_make_you_mad
Disable some unsafe CLI arguments in template builds by default.
This commit is contained in:
commit
6678288490
8 changed files with 130 additions and 49 deletions
|
|
@ -650,9 +650,8 @@ void ProjectSettings::_convert_to_last_version(int p_from_version) {
|
|||
* If found, load it or fail.
|
||||
* - Lookup project file in passed `p_path` (--path passed by the user), i.e. we
|
||||
* are running from source code.
|
||||
* If not found and `p_upwards` is true (--upwards passed by the user), look for
|
||||
* project files in parent folders up to the system root (used to run a game
|
||||
* from command line while in a subfolder).
|
||||
* If not found and `p_upwards` is true, look for project files in parent folders
|
||||
* up to the system root (used to run a game from command line while in a subfolder).
|
||||
* If a project file is found, load it or fail.
|
||||
* If nothing was found, error out.
|
||||
*/
|
||||
|
|
@ -749,7 +748,7 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
|
|||
#endif
|
||||
|
||||
// Try to use the filesystem for files, according to OS.
|
||||
// (Only Android -when reading from pck- and iOS use this.)
|
||||
// (Only Android -when reading from PCK-.)
|
||||
|
||||
if (!OS::get_singleton()->get_resource_dir().is_empty()) {
|
||||
Error err = _load_settings_text_or_binary("res://project.godot", "res://project.binary");
|
||||
|
|
@ -822,6 +821,7 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
|
|||
break;
|
||||
}
|
||||
|
||||
#if defined(OVERRIDE_PATH_ENABLED)
|
||||
if (p_upwards) {
|
||||
// Try to load settings ascending through parent directories
|
||||
d->change_dir("..");
|
||||
|
|
@ -830,6 +830,9 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
|
|||
}
|
||||
current_dir = d->get_current_dir();
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -847,12 +850,17 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
|
|||
|
||||
Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bool p_upwards, bool p_ignore_override) {
|
||||
Error err = _setup(p_path, p_main_pack, p_upwards, p_ignore_override);
|
||||
#ifdef OVERRIDE_ENABLED
|
||||
if (err == OK && !p_ignore_override) {
|
||||
String custom_settings = GLOBAL_GET("application/config/project_settings_override");
|
||||
if (!custom_settings.is_empty()) {
|
||||
_load_settings_text(custom_settings);
|
||||
bool disable_override = GLOBAL_GET("application/config/disable_project_settings_override");
|
||||
if (!disable_override) {
|
||||
String custom_settings = GLOBAL_GET("application/config/project_settings_override");
|
||||
if (!custom_settings.is_empty()) {
|
||||
_load_settings_text(custom_settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Updating the default value after the project settings have loaded.
|
||||
bool use_hidden_directory = GLOBAL_GET("application/config/use_hidden_project_data_directory");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue