# HG changeset patch # User Steve Losh # Date 1471103670 0 # Node ID f1457db0c563048807ffb3a0b85badb6a37a3f17 # Parent 6c6fa332df6f1655425c76e8e5732f28d5522a6a Tiny post-jam cleanup diff -r 6c6fa332df6f -r f1457db0c563 silt.lisp --- a/silt.lisp Fri Aug 12 02:57:58 2016 +0000 +++ b/silt.lisp Sat Aug 13 15:54:30 2016 +0000 @@ -76,9 +76,9 @@ (defmacro with-color (color &body body) (once-only (color) `(unwind-protect - (prog2 + (progn (charms/ll:attron (charms/ll:color-pair ,color)) - (progn ,@body)) + ,@body) (charms/ll:attroff (charms/ll:color-pair ,color))))) @@ -115,6 +115,7 @@ :total (apply #'+ weights))) (defun weightlist-random (weightlist) + "Return a random item from the weightlist, taking the weights into account." (iterate (with n = (random (weightlist-total weightlist))) (for item :in (weightlist-items weightlist)) @@ -665,7 +666,7 @@ (directions :accessor creature-directions :initarg :directions)) (define-entity corpse - (coords visible flavor decomposing)) + (coords visible flavor decomposing)) (defparameter *directions* @@ -1193,11 +1194,7 @@ (run-periodic-tick)) (defun tick-log () - (flet ((decrement (message) - (decf (car message))) - (dead (message) - (zerop (car message)))) - (setf *game-log* (ticklist-tick *game-log*)))) + (setf *game-log* (ticklist-tick *game-log*))) (defun state-title ()