From 65602269da15867401a949a5cebf3c5b330aaa0e Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 29 Jan 2017 23:36:56 -0600 Subject: [PATCH] fix prop stuff --- mudsync/gameobj.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mudsync/gameobj.scm b/mudsync/gameobj.scm index ee788ea..3957e0a 100644 --- a/mudsync/gameobj.scm +++ b/mudsync/gameobj.scm @@ -241,6 +241,7 @@ Note that this doesn't do any special dyn-ref of the location." (replace-step actor occupants)) replace-steps)))) +(define %nothing (cons '*the* '*nothing*)) (define (gameobj-setup-props gameobj) (define class (class-of gameobj)) (define props (slot-ref gameobj 'props)) @@ -250,7 +251,8 @@ Note that this doesn't do any special dyn-ref of the location." ;; and use that to build up the table (hash-for-each (lambda (key value) - (when (not (hashq-ref props key value)) ; don't override init'ed instance values + (when (eq? (hashq-ref props key %nothing) ; don't override init'ed instance values + %nothing) (hashq-set! props key value))) (rmeta-slot-cache (class-slot-ref class 'initial-props)))) @@ -269,7 +271,7 @@ Note that this doesn't do any special dyn-ref of the location." (hashq-set! (slot-ref gameobj 'props) key val)) (define* (gameobj-act-get-prop actor message key #:optional dflt) - (gameobj-get-prop actor key dflt)) + (<-reply message (gameobj-get-prop actor key dflt))) (define (gameobj-goes-by gameobj) "Find the name we go by. Defaults to #:name if nothing else provided." -- 2.31.1