summaryrefslogtreecommitdiff
path: root/src/game/quest.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/quest.lisp')
-rw-r--r--src/game/quest.lisp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/game/quest.lisp b/src/game/quest.lisp
index d36b9f9..ab1b9a7 100644
--- a/src/game/quest.lisp
+++ b/src/game/quest.lisp
@@ -26,22 +26,28 @@
:type (or nil integer)
:documentation "Time at which the quest began."))
(:metaclass db:persistent-class)
- (:documentation "A collection of hazards with a deadline and start date which heroes will attack."))
+ (:documentation
+ "A collection of hazards with a deadline and start date which heroes will attack."))
+;;; HELPERS
+;;; QUERIES
(defun player-quests (player)
"Return all quests in which one of player's heroes is engaged."
(remove nil (mapcar #'quest (player-heroes player))))
-(define-id-plucker quest)
+;;; TRANSACTIONS
+;;; MODEL VIEWS
(defrender :link-to ((quest quest))
(with-html
(:a :href (urlpath quest)
(name quest))))
+;;; PAGES & PAGE CLASSES
+
(defclass quest-page ()
((quest :reader quest :initarg :quest)
(player :reader player :initarg :player)))
@@ -50,18 +56,10 @@
(with-page (:title (unique-name (quest page )))
(:h1 (unique-name (quest page)))))
-;;; HELPERS
-
-;;; QUERIES
-
-;;; TRANSACTIONS
-
-;;; MODEL VIEWS
-
-;;; PAGES & PAGE CLASSES
-
;;; ENDPOINT HELPERS
+(define-id-plucker quest)
+
;;; ENDPOINT DEFINITIONS
(defendpoint* :get "/quest/:quest a-quest-with-id:/:name:" () ()