X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fgameobj.scm;fp=mudsync%2Fgameobj.scm;h=3957e0a4d40303898888af5828632f9e7f0525cb;hp=ee788ea300433aeaf466f52361de63c149b14e61;hb=65602269da15867401a949a5cebf3c5b330aaa0e;hpb=73cf0a846192939d72b1dfce2a86e7d1fe81605b 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."