1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Move singleton management from ProjectSettings to Engine

This commit is contained in:
Leon Krause
2017-11-13 21:46:57 +01:00
parent 3732b2318e
commit 9b7b46143d
25 changed files with 130 additions and 109 deletions

View File

@@ -29,6 +29,7 @@
/*************************************************************************/
#include "gd_script.h"
#include "engine.h"
#include "gd_compiler.h"
#include "global_constants.h"
#include "io/file_access_encrypted.h"
@@ -1347,9 +1348,9 @@ void GDScriptLanguage::init() {
//populate singletons
List<ProjectSettings::Singleton> singletons;
ProjectSettings::get_singleton()->get_singletons(&singletons);
for (List<ProjectSettings::Singleton>::Element *E = singletons.front(); E; E = E->next()) {
List<Engine::Singleton> singletons;
Engine::get_singleton()->get_singletons(&singletons);
for (List<Engine::Singleton>::Element *E = singletons.front(); E; E = E->next()) {
_add_global(E->get().name, E->get().ptr);
}