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 "doc_data.h"
#include "engine.h"
#include "global_constants.h"
#include "io/compression.h"
#include "io/marshalls.h"
@ -543,14 +544,14 @@ void DocData::generate(bool p_basic_types) {
c.constants.push_back(cd);
}
List<ProjectSettings::Singleton> singletons;
ProjectSettings::get_singleton()->get_singletons(&singletons);
List<Engine::Singleton> singletons;
Engine::get_singleton()->get_singletons(&singletons);
//servers (this is kind of hackish)
for (List<ProjectSettings::Singleton>::Element *E = singletons.front(); E; E = E->next()) {
for (List<Engine::Singleton>::Element *E = singletons.front(); E; E = E->next()) {
PropertyDoc pd;
ProjectSettings::Singleton &s = E->get();
Engine::Singleton &s = E->get();
pd.name = s.name;
pd.type = s.ptr->get_class();
while (String(ClassDB::get_parent_class(pd.type)) != "Object")