# HG changeset patch # User Steve Losh # Date 1483884868 0 # Node ID d61f3224d0dca74f10248780edfbee647e5d27b4 # Parent ea80c30bf2178cbbe357dcdfad1448227687b4a2 Moar flavor diff -r ea80c30bf217 -r d61f3224d0dc data/animals.lisp --- a/data/animals.lisp Sun Jan 08 14:00:57 2017 +0000 +++ b/data/animals.lisp Sun Jan 08 14:14:28 2017 +0000 @@ -38,7 +38,6 @@ "an ewe" "a ferret" "a finch" - "a fish" "a fox" "a frog" "a gazelle" diff -r ea80c30bf217 -r d61f3224d0dc data/vegetables.lisp --- a/data/vegetables.lisp Sun Jan 08 14:00:57 2017 +0000 +++ b/data/vegetables.lisp Sun Jan 08 14:14:28 2017 +0000 @@ -36,7 +36,7 @@ "green peppers" "horseradish" "hubbard squash" - "pickled jalapenos" + "jalapenos" "kale" "kidney beans" "kohlrabi" diff -r ea80c30bf217 -r d61f3224d0dc src/entities/food.lisp --- a/src/entities/food.lisp Sun Jan 08 14:00:57 2017 +0000 +++ b/src/entities/food.lisp Sun Jan 08 14:14:28 2017 +0000 @@ -5,6 +5,29 @@ (read-file-into-form "data/vegetables.lisp") (read-file-into-form "data/meat.lisp"))) +(defparameter *containers* + #(("can" "") + ("can" "preserved ") + ("can" "old ") + ("can" "pickled ") + ("tin" "") + ("package" "") + ("shrink-wrapped bag" "") + ("vacuum-sealed bag" "") + ("jar" "") + ("jar" "preserved ") + ("jar" "pickled ") + ("ration" "") + ("box" "dried ") + ("box" "dehydrated ") + ("bag" "dried ") + ("bag" "dehydrated ") + ("carton" "dried ") + ("carton" "dehydrated ") + ("bottle" "slurried ") + ("jug" "slurried ") + )) + (defparameter *tastes* #("a bit rotten" "a bit strange" @@ -42,9 +65,12 @@ (random-range 30.0 80.0)) (defun random-food-description () - (format nil "a ~A of ~A" - (random-elt #("can" "tin" "package")) - (random-elt *foods*))) + (destructuring-bind (container prefix) + (random-elt *containers*) + (format nil "a ~A of ~A~A" + container + prefix + (random-elt *foods*)))) (defun random-food-taste () (format nil "It tastes ~A." diff -r ea80c30bf217 -r d61f3224d0dc src/flavor.lisp --- a/src/flavor.lisp Sun Jan 08 14:00:57 2017 +0000 +++ b/src/flavor.lisp Sun Jan 08 14:14:28 2017 +0000 @@ -16,7 +16,7 @@ (random-elt *animals*) (random-elt #("in the distance" "out of the corner of your eye" - "running north")) + "heading north")) (random-elt #("A fellow traveler." "It eyes you warily." "She seems tired."