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) {
|
||||
// Create the workspace if it doesn't exist
|
||||
if (this->services.count("Workspace") == 0) {
|
||||
this->services["Workspace"] = std::make_shared<Workspace>();
|
||||
AddChild(this->services["Workspace"]);
|
||||
}
|
||||
|
||||
// Create default services
|
||||
GetService<Workspace>();
|
||||
GetService<ServerScriptService>();
|
||||
|
||||
// Init all services
|
||||
|
|
Loading…
Add table
Reference in a new issue