Add attachment and data calculation to constructing a viewpoint.

This commit is contained in:
Austen McDonald
2016-08-01 21:15:36 +00:00
parent 6c8c12758f
commit 8123e4bab5
+16
View File
@@ -265,5 +265,21 @@ class Game
]; ];
$this->getEventManager()->publish('h/lotgd/core/actions-for/' . $s->getTemplate(), $context); $this->getEventManager()->publish('h/lotgd/core/actions-for/' . $s->getTemplate(), $context);
$v->setActions($context['actions']); $v->setActions($context['actions']);
$context = [
'g' => $this,
'viewpoint' => $v,
'attachments' => []
];
$this->getEventManager()->publish('h/lotgd/core/attachments-for/' . $s->getTemplate(), $context);
$v->setAttachments($context['attachments']);
$context = [
'g' => $this,
'viewpoint' => $v,
'data' => []
];
$this->getEventManager()->publish('h/lotgd/core/data-for/' . $s->getTemplate(), $context);
$v->setData($context['data']);
} }
} }