* Get crash settings in assignment clients * Allow custom crash reporting URL and token * Fix setting system -- the client's one doesn't belong in the server * Lots more documentation Commit just before moving things around.
Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 23 files). Show all
Unified · Split
| @@ -149,11 +149,14 @@ void EntityScriptServer::handleEntityScriptGetStatusPacket(QSharedPointer<Receiv · 148 unmodified lines | |||
| 149 | 149 | ||
| 150 | void EntityScriptServer::handleSettings() { | 150 | void EntityScriptServer::handleSettings() { |
| 151 | 151 | ||
| 152 | |||
| 152 | auto nodeList = DependencyManager::get<NodeList>(); | 153 | auto nodeList = DependencyManager::get<NodeList>(); |
| 153 | 154 | ||
| 154 | auto& domainHandler = nodeList->getDomainHandler(); | 155 | auto& domainHandler = nodeList->getDomainHandler(); |
| 155 | const QJsonObject& settingsObject = domainHandler.getSettingsObject(); | 156 | const QJsonObject& settingsObject = domainHandler.getSettingsObject(); |
| 156 | 157 | ||
| 158 | commonParseSettingsObject(settingsObject); | ||
| 159 | |||
| 157 | static const QString ENTITY_SCRIPT_SERVER_SETTINGS_KEY = "entity_script_server"; | 160 | static const QString ENTITY_SCRIPT_SERVER_SETTINGS_KEY = "entity_script_server"; |
| 158 | 161 | ||
| 159 | if (!settingsObject.contains(ENTITY_SCRIPT_SERVER_SETTINGS_KEY)) { | 162 | if (!settingsObject.contains(ENTITY_SCRIPT_SERVER_SETTINGS_KEY)) { |
| @@ -292,7 +295,7 @@ void EntityScriptServer::run() { · 132 unmodified lines | |||
| 292 | entityScriptingInterface->init(); | 295 | entityScriptingInterface->init(); |
| 293 | 296 | ||
| 294 | _entityViewer.init(); | 297 | _entityViewer.init(); |
| 295 | 298 | ||
| 296 | // setup the JSON filter that asks for entities with a non-default serverScripts property | 299 | // setup the JSON filter that asks for entities with a non-default serverScripts property |
| 297 | QJsonObject queryJSONParameters; | 300 | QJsonObject queryJSONParameters; |
| 298 | queryJSONParameters[EntityJSONQueryProperties::SERVER_SCRIPTS_PROPERTY] = EntityQueryFilterSymbol::NonDefault; | 301 | queryJSONParameters[EntityJSONQueryProperties::SERVER_SCRIPTS_PROPERTY] = EntityQueryFilterSymbol::NonDefault; |
| @@ -303,7 +306,7 @@ void EntityScriptServer::run() { · 4 unmodified lines | |||
| 303 | queryFlags[EntityJSONQueryProperties::INCLUDE_DESCENDANTS_PROPERTY] = true; | 306 | queryFlags[EntityJSONQueryProperties::INCLUDE_DESCENDANTS_PROPERTY] = true; |
| 304 | 307 | ||
| 305 | queryJSONParameters[EntityJSONQueryProperties::FLAGS_PROPERTY] = queryFlags; | 308 | queryJSONParameters[EntityJSONQueryProperties::FLAGS_PROPERTY] = queryFlags; |
| 306 | 309 | ||
| 307 | // setup the JSON parameters so that OctreeQuery does not use a frustum and uses our JSON filter | 310 | // setup the JSON parameters so that OctreeQuery does not use a frustum and uses our JSON filter |
| 308 | _entityViewer.getOctreeQuery().setJSONParameters(queryJSONParameters); | 311 | _entityViewer.getOctreeQuery().setJSONParameters(queryJSONParameters); |
| 309 | 312 | ||
| @@ -380,7 +383,7 @@ void EntityScriptServer::nodeKilled(SharedNodePointer killedNode) { · 70 unmodified lines | |||
| 380 | if (!hasAnotherEntityServer) { | 383 | if (!hasAnotherEntityServer) { |
| 381 | clear(); | 384 | clear(); |
| 382 | } | 385 | } |
| 383 | 386 | ||
| 384 | break; | 387 | break; |
| 385 | } | 388 | } |
| 386 | case NodeType::Agent: { | 389 | case NodeType::Agent: { |
| @@ -584,7 +587,7 @@ void EntityScriptServer::sendStatsPacket() { · 197 unmodified lines | |||
| 584 | } | 587 | } |
| 585 | scriptEngineStats["number_running_scripts"] = numberRunningScripts; | 588 | scriptEngineStats["number_running_scripts"] = numberRunningScripts; |
| 586 | statsObject["script_engine_stats"] = scriptEngineStats; | 589 | statsObject["script_engine_stats"] = scriptEngineStats; |
| 587 | 590 | ||
| 588 | 591 | ||
| 589 | auto nodeList = DependencyManager::get<NodeList>(); | 592 | auto nodeList = DependencyManager::get<NodeList>(); |
| 590 | QJsonObject nodesObject; | 593 | QJsonObject nodesObject; |