1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

-Renamed GlobalConfig to ProjectSettings, makes more sense.

-Added system for feature overrides, it's pretty cool :)
This commit is contained in:
Juan Linietsky
2017-07-19 17:00:46 -03:00
parent 89588d4334
commit 25678b1876
162 changed files with 1296 additions and 831 deletions

View File

@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "dir_access.h"
#include "global_config.h"
#include "project_settings.h"
#include "os/file_access.h"
#include "os/memory.h"
#include "os/os.h"
@@ -37,7 +37,7 @@ String DirAccess::_get_root_path() const {
switch (_access_type) {
case ACCESS_RESOURCES: return GlobalConfig::get_singleton()->get_resource_path();
case ACCESS_RESOURCES: return ProjectSettings::get_singleton()->get_resource_path();
case ACCESS_USERDATA: return OS::get_singleton()->get_data_dir();
default: return "";
}
@@ -200,10 +200,10 @@ String DirAccess::fix_path(String p_path) const {
case ACCESS_RESOURCES: {
if (GlobalConfig::get_singleton()) {
if (ProjectSettings::get_singleton()) {
if (p_path.begins_with("res://")) {
String resource_path = GlobalConfig::get_singleton()->get_resource_path();
String resource_path = ProjectSettings::get_singleton()->get_resource_path();
if (resource_path != "") {
return p_path.replace_first("res:/", resource_path);