Implemented suggested changes.

Fixes #94
This commit is contained in:
Vassyli
2017-04-10 09:42:09 +02:00
parent a790eab5ee
commit 201a3a032f
8 changed files with 146 additions and 160 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ use Monolog\Logger;
use Monolog\Handler\NullHandler;
use LotGD\Core\{
Action, ActionGroup, Bootstrap, Configuration, ComposerManager, DiceBag, EventHandler, EventManager, Events\NewViewpoint, Game, TimeKeeper, ModuleManager
Action, ActionGroup, Bootstrap, Configuration, ComposerManager, DiceBag, EventHandler, EventManager, Events\NewViewpointData, Game, TimeKeeper, ModuleManager
};
use LotGD\Core\Models\{
Character, Viewpoint, Scene
@@ -29,10 +29,10 @@ class DefaultSceneProvider implements EventHandler
{
switch ($context->getEvent()) {
case 'h/lotgd/core/default-scene':
if (!$context->hasDataType(NewViewpoint::class)) {
if (!$context->hasDataType(NewViewpointData::class)) {
throw new \Exception(sprintf(
"Context was expected to be %s, %s instead.",
NewViewpoint::class,
NewViewpointData::class,
get_class($context->getData())
));
}