aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pouar <pouar@pouar.net>2020-10-09 22:00:29 -0500
committerGravatar Pouar <pouar@pouar.net>2020-10-10 11:24:37 -0500
commitef34d17547916d00a09bc365607141c64ee2407a (patch)
treeb5dd15bd8f4058cc0a53f5586582ca95f02d536d
parentrework modules (diff)
more declares
-rw-r--r--core/libexec/declares.lisp22
-rw-r--r--core/libexec/functions.lisp2
2 files changed, 13 insertions, 11 deletions
diff --git a/core/libexec/declares.lisp b/core/libexec/declares.lisp
index f2dd246..577bfc6 100644
--- a/core/libexec/declares.lisp
+++ b/core/libexec/declares.lisp
@@ -9,19 +9,19 @@
(values (eql t) &optional))
set-status-condition)
(ftype (function ((or symbol list)) (values list &optional)) trigger-event)
- (ftype (function (symbol) list) event-attributes)
- (ftype (function (symbol list) list) get-warp-point get-destination)
+ (ftype (function (symbol) (values list boolean &optional)) event-attributes)
+ (ftype (function (symbol list) (values list &optional)) get-warp-point get-destination)
(ftype (function (list &optional list symbol) (values list &optional string)) get-path-end)
(ftype (function (list symbol) (values boolean &optional)) travelablep)
(ftype (function ((or string coerced-function)) (values string &optional)) get-zone-text)
- (ftype (function (list &optional list symbol) null) print-enter-text)
- (ftype (function () list) get-inventory-list)
- (ftype (function (list type-specifier) list) filter-items)
- (ftype (function (base-character) list) swell-up%)
+ (ftype (function (list &optional list symbol) (values null &optional)) print-enter-text)
+ (ftype (function () (values list &optional)) get-inventory-list)
+ (ftype (function (list type-specifier) (values list &optional)) filter-items)
+ (ftype (function (base-character) (values list &optional)) swell-up%)
(ftype (function (base-character) (values list symbol &optional)) swell-up)
(ftype (function (list clothing) (values real &optional)) fast-thickness)
(ftype (function (base-character &optional cons) (values list symbol &optional)) pop-from-expansion)
- (ftype (function (list &optional (or null unsigned-byte)) list) thickest)
+ (ftype (function (list &optional (or null unsigned-byte)) (values list &optional)) thickest)
(ftype (function (&key (:wet-amount (or boolean real)) (:force-fill-amount (or null real)) (:pants-down t) (:accident t)
(:force-wet-amount (or boolean real)) (:wetter base-character) (:clothes list)) (values list &optional)) wet)
(ftype (function (&key (:mess-amount (or boolean real)) (:force-fill-amount (or null real)) (:pants-down t) (:accident t)
@@ -30,7 +30,7 @@
(ftype (function (symbol list) (values list &optional)) get-items-from-prop)
(ftype (function (symbol list) (values real &optional)) get-bitcoins-from-prop)
(ftype (function (symbol base-character) (values (or move null) &optional)) get-move)
- (ftype (function (base-character) list) calculate-diaper-usage)
+ (ftype (function (base-character) (values list &optional)) calculate-diaper-usage)
(ftype (function (real) (values real real &optional)) calculate-level-to-exp)
(ftype (function (enemy) (values real &optional)) calculate-exp-yield)
(ftype (function (base-character) (values list &optional))
@@ -42,10 +42,10 @@
(ftype (function (base-character) (values cons &optional)) go-to-sleep%)
(ftype (function (list symbol symbol) (values action &optional)) getf-action-from-prop)
(ftype (function (&key (:attack (or symbol boolean)) (:item item) (:reload type-specifier) (:no-team-attack t)
- (:selected-target (or null enemy team-member)))
- t)
+ (:selected-target (or null enemy team-member))))
process-battle)
(ftype (function (ally) (values (eql t) &optional)) ally-join)
(ftype (function (simple-string boolean simple-string) (values (eql t) &optional)) set-player)
(ftype (function (list list) (values (member :super-effective :not-very-effective :no-effect nil) real &optional)) effective-type-effectiveness)
- (ftype (function (t) (values list &optional)) coerce-element-types))
+ (ftype (function (t) (values list &optional)) coerce-element-types)
+ (ftype (function (list &key (:ignore-lock t) (:direction symbol) (:old-position list))) move-to-zone))
diff --git a/core/libexec/functions.lisp b/core/libexec/functions.lisp
index a1b143d..a7f2998 100644
--- a/core/libexec/functions.lisp
+++ b/core/libexec/functions.lisp
@@ -615,6 +615,8 @@
(iter (for i in a)
(finding i maximizing (get-diaper-expansion i)))))
(defun move-to-zone (new-position &key ignore-lock direction old-position)
+ (declare (type list new-position old-position)
+ (type symbol direction))
(when (iter (for i in (cons (player-of *game*) (allies-of *game*)))
(let ((wear (typecase (must-wear-of (get-zone new-position))
(cons (must-wear-of (get-zone new-position)))