History

Move scriptable caches into scripting interfaces

Removed non-working getResource() API functions.

David Rowe committed 8 years ago

Commit 16e06de1 parent fe5b13b18 files · +430 −290Browse files

Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 18 files). Show all

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+2−2
@@ -26,7 +26,7 @@ · 25 unmodified lines
2626 #include <ResourceManager.h>
2727 #include <ScriptCache.h>
2828 #include <ScriptEngines.h>
29−#include <SoundCache.h>
29+#include <SoundCacheScriptingInterface.h>
3030 #include <UUID.h>
3131 #include <WebSocketServerClass.h>
3232
@@ -438,7 +438,7 @@ void EntityScriptServer::resetEntitiesScriptEngine() { · 405 unmodified lines
438438 auto webSocketServerConstructorValue = newEngine->newFunction(WebSocketServerClass::constructor);
439439 newEngine->globalObject().setProperty("WebSocketServer", webSocketServerConstructorValue);
440440
441− newEngine->registerGlobalObject("SoundCache", DependencyManager::get<SoundCache>().data());
441+ newEngine->registerGlobalObject("SoundCache", new SoundCacheScriptingInterface(DependencyManager::get<SoundCache>().data()));
442442
443443 // connect this script engines printedMessage signal to the global ScriptEngines these various messages
444444 auto scriptEngines = DependencyManager::get<ScriptEngines>().data();