refactor(datamodel): include worksapce via GetService instead

This commit is contained in:
maelstrom 2025-07-08 10:49:23 +02:00
parent ff83211b19
commit 0d53d1593f

View file

@ -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