X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fgameobj.scm;h=779c092d0abf4ead2d3eb0341367c3bd8325728c;hp=f14babe0b62d1c592016c3722391233a14b71869;hb=4eaef5c5c3c2e076d443dcd872850f6b0adf07ef;hpb=9efc11b393ef6d51d6aacc87d58617c1822e6a06 diff --git a/mudsync/gameobj.scm b/mudsync/gameobj.scm index f14babe..779c092 100644 --- a/mudsync/gameobj.scm +++ b/mudsync/gameobj.scm @@ -93,10 +93,10 @@ ("drop" ((direct-command cmd-drop #:obvious? #f))))) ;; Most objects are generally visible by default - (generally-visible #:init-value #t - #:init-keyword #:generally-visible) - ;; @@: Would be preferable to be using generic methods for this... - ;; Hopefully we can port this to Guile 2.2 soon... + (invisible? #:init-value #f + #:init-keyword #:invisible?) + ;; TODO: Fold this into a procedure in invisible? similar + ;; to take-me? and etc (visible-to-player? #:init-value (wrap-apply gameobj-visible-to-player?)) @@ -322,7 +322,7 @@ and whos-asking, and see if we should just return it or run it." (define (gameobj-visible-to-player? gameobj whos-looking) "Check to see whether we're visible to the player or not. By default, this is whether or not the generally-visible flag is set." - (slot-ref gameobj 'generally-visible)) + (not (slot-ref gameobj 'invisible?))) (define* (gameobj-visible-name actor message #:key whos-looking) ;; Are we visible?