summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-03-05 19:10:49 -0800
committercolin <colin@cicadas.surf>2023-03-05 19:10:49 -0800
commitc06de3e0ee54c183fc8bb12c1fb5686694876eae (patch)
tree6d99f667a50f5481791bd624dfab83a2792f897d
parenta366144c49a8a69722a422f401622a76d3076b8e (diff)
Fix: many little bugs
-rw-r--r--src/endpoints.lisp4
-rw-r--r--src/names.lisp4
-rw-r--r--src/pages/goddess-shrine.lisp2
-rw-r--r--src/pages/tavern.lisp11
-rw-r--r--src/queries.lisp4
-rw-r--r--src/views/hero.lisp8
6 files changed, 13 insertions, 20 deletions
diff --git a/src/endpoints.lisp b/src/endpoints.lisp
index e33682b..dbfb455 100644
--- a/src/endpoints.lisp
+++ b/src/endpoints.lisp
@@ -120,11 +120,11 @@ functions in url parameters in endpoint definitions."
(render (page-render-mode)
(make-instance 'tavern :player me))))
-(defendpoint* :get "/godess-shrine" () ()
+(defendpoint* :get "/goddess-shrine" () ()
(with-session (player)
(render (page-render-mode) :goddess-shrine)))
-(defendpoint* :post "/godess-shrine" () ()
+(defendpoint* :post "/goddess-shrine" () ()
(with-session (player)
(with-checked-plist ((name :name 'a-short-string)) (lzb:request-body)
(birth-from-the-goddess-loins player name)
diff --git a/src/names.lisp b/src/names.lisp
index 8cc64af..48601b4 100644
--- a/src/names.lisp
+++ b/src/names.lisp
@@ -8,10 +8,10 @@
(:method ((ob t)) nil))
(defmethod unique-name ((campaign campaign))
- (campaign-title campaign))
+ (title campaign))
(defmethod unique-name ((hero hero))
- (hero-name hero))
+ (name hero))
(defgeneric urlpath (object)
(:documentation "Return the path to the object given a particular")
diff --git a/src/pages/goddess-shrine.lisp b/src/pages/goddess-shrine.lisp
index 3b25e5a..33e8011 100644
--- a/src/pages/goddess-shrine.lisp
+++ b/src/pages/goddess-shrine.lisp
@@ -6,7 +6,7 @@
(with-page (:title "A Sacred Shrine")
(:header
(:h1 "Pray and become a hero..."))
- (:form :method "POST" :action "/godess-shrine"
+ (:form :method "POST" :action "/goddess-shrine"
(:label :for "NAME" "Enter the epithet by which the ages shall know thy hero:")
(:input :name "NAME")
(:button :type "submit" "Pray To The Goddess"))))
diff --git a/src/pages/tavern.lisp b/src/pages/tavern.lisp
index fdda9e5..e6250e1 100644
--- a/src/pages/tavern.lisp
+++ b/src/pages/tavern.lisp
@@ -10,11 +10,8 @@
(let ((player (player tavern)))
(render :details player)
(render :list (player-heroes player))
- (:a :href "/spymaster" "Report a Roguish Rumour...")
- ;; (:table
- ;; (:tr (:td (:h4 "Your Heroes"))
- ;; (:td (:h4 "Your Campaigns")))
- ;; (:tr (:td (:h4 "Gossip & Gab"))
- ;; (:td (:h4 "Comrades in Arms"))))
+ (:br)
+ (:a :href "/goddess-shrine" "Pray a new hero rises.")
+ (:br)
+ (:a :href "/spymaster" "Report a Roguish Rumour..."))))
- )))
diff --git a/src/queries.lisp b/src/queries.lisp
index c657979..1816c5c 100644
--- a/src/queries.lisp
+++ b/src/queries.lisp
@@ -13,10 +13,6 @@
"Return a list of campaigns one of the players' heroes is involved in."
(mapcar #'campaign (player-quests player) ))
-(defun campaign-heroes (campaign)
- ""
- )
-
(defun campaign-heros (campaign &key (activep t))
"All the heros actively involved in this CAMPAIGN. If ACTIVEP, then
only the active quest(s) are considered, otherwise all quests are considered."
diff --git a/src/views/hero.lisp b/src/views/hero.lisp
index 7387901..31fa169 100644
--- a/src/views/hero.lisp
+++ b/src/views/hero.lisp
@@ -4,8 +4,8 @@
(defrender :list-item ((hero hero))
(with-html
- (with-slots ((name campaign) hero)
+ (with-slots (name quest) hero
(:p name "the" (hero-class hero) (hero-title hero)
- (when campaign
- (:span "who is off in the campaign")
- (:span (render :inline campaign)))))))
+ (when quest
+ (:span "who is off in on a quest: ")
+ (:span (render :inline quest)))))))