summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Shoshin Shangreaux <shoshin@cicadas.surf>2023-04-01 08:58:23 -0500
committerGrant Shoshin Shangreaux <shoshin@cicadas.surf>2023-04-01 08:58:23 -0500
commit20e0bb168032e2e2aa95b08e2dbc9bedced62df3 (patch)
treecd5829ac1c19d3b186cef5fd5947d247e74f159e
parent1e942dd0c26b0709fb8878588c072e50020eec34 (diff)
WIP mini-marathon
-rw-r--r--DEV.org6
-rw-r--r--src/model.lisp3
-rw-r--r--src/pages/adventure-page.lisp8
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))))))))