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
26#include <ResourceManager.h>26#include <ResourceManager.h>
27#include <ScriptCache.h>27#include <ScriptCache.h>
28#include <ScriptEngines.h>28#include <ScriptEngines.h>
29#include <SoundCache.h>29#include <SoundCacheScriptingInterface.h>
30#include <UUID.h>30#include <UUID.h>
31#include <WebSocketServerClass.h>31#include <WebSocketServerClass.h>
32 32
@@ -438,7 +438,7 @@ void EntityScriptServer::resetEntitiesScriptEngine() { · 405 unmodified lines
438 auto webSocketServerConstructorValue = newEngine->newFunction(WebSocketServerClass::constructor);438 auto webSocketServerConstructorValue = newEngine->newFunction(WebSocketServerClass::constructor);
439 newEngine->globalObject().setProperty("WebSocketServer", webSocketServerConstructorValue);439 newEngine->globalObject().setProperty("WebSocketServer", webSocketServerConstructorValue);
440 440
441 newEngine->registerGlobalObject("SoundCache", DependencyManager::get<SoundCache>().data());441 newEngine->registerGlobalObject("SoundCache", new SoundCacheScriptingInterface(DependencyManager::get<SoundCache>().data()));
442 442
443 // connect this script engines printedMessage signal to the global ScriptEngines these various messages443 // connect this script engines printedMessage signal to the global ScriptEngines these various messages
444 auto scriptEngines = DependencyManager::get<ScriptEngines>().data();444 auto scriptEngines = DependencyManager::get<ScriptEngines>().data();