refactor(datamodel): include worksapce via GetService instead
This commit is contained in:
parent
ff83211b19
commit
0d53d1593f
1 changed files with 2 additions and 6 deletions
|
@ -21,12 +21,8 @@ DataModel::DataModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataModel::Init(bool runMode) {
|
void DataModel::Init(bool runMode) {
|
||||||
// Create the workspace if it doesn't exist
|
// Create default services
|
||||||
if (this->services.count("Workspace") == 0) {
|
GetService<Workspace>();
|
||||||
this->services["Workspace"] = std::make_shared<Workspace>();
|
|
||||||
AddChild(this->services["Workspace"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
GetService<ServerScriptService>();
|
GetService<ServerScriptService>();
|
||||||
|
|
||||||
// Init all services
|
// Init all services
|
||||||
|
|
Loading…
Add table
Reference in a new issue