From 5c7040d593491d85267a1414e46fd0b9dfeba804 Mon Sep 17 00:00:00 2001 From: Austen McDonald Date: Sat, 30 Jul 2016 10:34:22 +0000 Subject: [PATCH] Add template to SceneBasics --- src/Tools/Model/SceneBasics.php | 30 +++++++++++++++++++++----- tests/datasets/characterViewpoints.yml | 8 +++++-- tests/datasets/scene.yml | 7 +++++- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/src/Tools/Model/SceneBasics.php b/src/Tools/Model/SceneBasics.php index 47e9e37..de7aa9d 100644 --- a/src/Tools/Model/SceneBasics.php +++ b/src/Tools/Model/SceneBasics.php @@ -12,7 +12,9 @@ trait SceneBasics private $title = "{No scene set}"; /** @Column(type="text") */ private $description = "{No scene set}"; - + /** @Column(type="string", length=255) */ + private $template = "{No template set}"; + /** * Sets scene title * @param string $title @@ -21,7 +23,7 @@ trait SceneBasics { $this->title = $title; } - + /** * Returns scene title * @return string @@ -30,7 +32,7 @@ trait SceneBasics { return $this->title; } - + /** * Sets scene description * @param string $description @@ -39,7 +41,7 @@ trait SceneBasics { $this->description = $description; } - + /** * Returns scene description * @return string @@ -48,4 +50,22 @@ trait SceneBasics { return $this->description; } -} \ No newline at end of file + + /** + * Sets scene template + * @param string $template + */ + public function setTemplate(string $template) + { + $this->template = $template; + } + + /** + * Returns scene template + * @return string + */ + public function getTemplate(): string + { + return $this->template; + } +} diff --git a/tests/datasets/characterViewpoints.yml b/tests/datasets/characterViewpoints.yml index ed63f6c..aa68fbd 100644 --- a/tests/datasets/characterViewpoints.yml +++ b/tests/datasets/characterViewpoints.yml @@ -12,22 +12,26 @@ character_viewpoints: owner_id: 2 title: "The Village" description: "This is the village." + template: "lotgd/tests/village" data: "a:0:{}" - attachements: "a:0:{}" + attachments: "a:0:{}" actions: "a:0:{}" scenes: - id: 1 title: "The Village" description: "This is the village." + template: "lotgd/tests/village" parent: - id: 2 title: "The Forest" description: "This is a very dangerous and dark forest" + template: "lotgd/tests/forest" parent: 1 - id: 3 title: "The Weaponry" description: "This is the place where you can buy awesome weapons" - parent: 1 \ No newline at end of file + template: "lotgd/tests/weaponry" + parent: 1 diff --git a/tests/datasets/scene.yml b/tests/datasets/scene.yml index d9ed967..e827415 100644 --- a/tests/datasets/scene.yml +++ b/tests/datasets/scene.yml @@ -3,24 +3,29 @@ scenes: id: 1 title: "The Village" description: "This is the village." + template: "lotgd/tests/village" parent: - id: 2 title: "The Forest" description: "This is a very dangerous and dark forest" + template: "lotgd/tests/forest" parent: 1 - id: 3 title: "The Weaponry" description: "This is the place where you can buy awesome weapons" + template: "lotgd/tests/weaponry" parent: 1 - id: 4 title: "Another Village" description: "This is another village" + template: "lotgd/tests/village" parent: - id: 5 title: "Orphan" description: "This is an orphan scene" - parent: \ No newline at end of file + template: "lotgd/tests/orphan" + parent: