From a73b31c1ca88d0cba7365e648e3da70c4124f27e Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 1 Apr 2023 15:53:13 -0700 Subject: Reorganizing the adventure page --- src/game/quest.lisp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/game/quest.lisp') 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:" () () -- cgit v1.2.3