From 20e0bb168032e2e2aa95b08e2dbc9bedced62df3 Mon Sep 17 00:00:00 2001 From: Grant Shoshin Shangreaux Date: Sat, 1 Apr 2023 08:58:23 -0500 Subject: WIP mini-marathon --- DEV.org | 6 +++--- src/model.lisp | 3 +++ src/pages/adventure-page.lisp | 8 ++++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/DEV.org b/DEV.org index 5629287..67f59da 100644 --- a/DEV.org +++ b/DEV.org @@ -8,9 +8,9 @@ - [X] handle post (set a cookie/header) - [X] make a tavern page ** TODO Make Adventures - - creator - - seers - - title + - [X] creator + - [ ] seers + - [X] title - rumors As a player, I can "petition the Emperor" to submit a request for a adventure diff --git a/src/model.lisp b/src/model.lisp index e44d3b9..f8d19bc 100644 --- a/src/model.lisp +++ b/src/model.lisp @@ -157,6 +157,9 @@ (:metaclass db:persistent-class) (:documentation "A adventure is a container of quests. Adventures are expected to be engaged with on a particular schedule, and are run by particular people.")) +(defun adventure-seers (adventure) + (cons (creator adventure) (seers adventure))) + (defclass rumor (game-object) ((reporter :reader reporter diff --git a/src/pages/adventure-page.lisp b/src/pages/adventure-page.lisp index 01424a0..795f3db 100644 --- a/src/pages/adventure-page.lisp +++ b/src/pages/adventure-page.lisp @@ -11,5 +11,9 @@ (with-page (:title (title adventure)) (:h1 (title adventure)) (:p (description adventure)) - (:h2 "Seers: " (render :list (cons (creator adventure) - (seers adventure))))))) + (:h2 "Seers: " (render :list (adventure-seers adventure))) + (:form :method "POST" :action "" + (:label :for "SEER" "Add a seer to this adventure:") (:br) + (:select :name "SEER" + (loop :for p :in (db:store-objects-with-class 'player) + :collect (:option :value (nickname p) (nickname p)))))))) -- cgit v1.2.3