diff options
author | colin <colin@cicadas.surf> | 2023-04-01 15:53:13 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2023-04-01 15:53:13 -0700 |
commit | a73b31c1ca88d0cba7365e648e3da70c4124f27e (patch) | |
tree | c66e46b115a2f3881922a5109d242f913dc23d99 /src/game/quest.lisp | |
parent | cc10599f1531e18998fd8a6d80f8b17846699d63 (diff) |
Reorganizing the adventure page
Diffstat (limited to 'src/game/quest.lisp')
-rw-r--r-- | src/game/quest.lisp | 22 |
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:" () () |