Remove all accessors
authorChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 5 May 2016 03:20:48 +0000 (22:20 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 5 May 2016 03:20:48 +0000 (22:20 -0500)
mudsync/game-master.scm
mudsync/gameobj.scm
mudsync/networking.scm
mudsync/player.scm

index 0d2051ec48bd43df10abfd3e56e1e38203f3c845..aab0b7a856820a1a6a18071b361d421b73518cc6 100644 (file)
                       #:getter gm-reverse-client-dir)
 
   ;; Network manager
-  (network-manager #:accessor gm-network-manager
+  (network-manager #:getter gm-network-manager
                    #:init-value #f)
 
   ;; How we get a new connection acclimated to the system
-  (new-conn-handler #:accessor gm-new-conn-handler
+  (new-conn-handler #:getter gm-new-conn-handler
                     #:init-keyword #:new-conn-handler)
 
   (message-handler
 
 (define (gm-setup-network gm)
   ;; Create a default network manager if none available
-  (set! (gm-network-manager gm)
-        (create-actor* gm <network-manager> "netman"
+  (slot-set! gm 'network-manager
+             (create-actor* gm <network-manager> "netman"
                        #:send-input-to (actor-id gm)))
 
   ;; TODO: Add host and port options
index bb4c8520628ba0a0b4dcb56f9babfb86564b9a64..7be08654a72e0e5bec190d9df03ddcf7ba208313 100644 (file)
 (define-class <gameobj> (<actor>)
   ;; location id
   (loc #:init-value #f
-       #:accessor gameobj-loc)
+       #:getter gameobj-loc)
   
   ;; Uses a hash table like a set (values ignored)
   (occupants #:init-thunk make-hash-table
-             #:accessor gameobj-occupants)
+             #:getter gameobj-occupants)
 
   ;; game master id
   (gm #:init-keyword #:gm
   (format #t "DEBUG: Location set to ~s for ~s\n"
           loc (actor-id-actor actor))
 
-  (set! (gameobj-loc actor) loc)
+  (slot-set! actor 'loc loc)
   ;; Change registation of where we currently are
   (if loc
       (<-wait actor loc 'add-occupant! #:who (actor-id actor)))
index 76758c17dd15a42515b997130591f229a57492ec..fe641cc9a227556ee945a8fc58b18a5f3b052ea3 100644 (file)
@@ -19,9 +19,9 @@
 (define %default-port 8889)
 
 (define-class <network-manager> (<actor>)
-  (server-socket #:accessor nm-server-socket)
+  (server-socket #:getter nm-server-socket)
   ;; mapping of client -> client-id
-  (clients #:accessor nm-clients
+  (clients #:getter nm-clients
            #:init-thunk make-hash-table)
   ;; send input to this actor
   (send-input-to #:getter nm-send-input-to
@@ -87,7 +87,7 @@
     ;;   (sigaction SIGPIPE SIG_IGN)
     ;; Will this break other things that use pipes for us though?
 
-    (set! (nm-server-socket nm) s)
+    (slot-set! nm 'server-socket s)
 
     (format #t "Listening for clients in pid: ~s\n" (getpid))
     (8sync-port s #:read (lambda (s) (nm-new-client nm s)))
index 00b28edde4cbeab67239e2266dd462d06469c9d6..3fb0136d0a59b47db234cbafe5bab7bb65a3105e 100644 (file)
 
 (define-class <player> (<gameobj>)
   (username #:init-keyword #:username
-            #:accessor player-username)
-  ;; Connection id
-  (client #:accessor player-client)
+            #:getter player-username)
 
   (self-commands
    #:init-value '()
-   #:accessor player-self-commands)
+   #:getter player-self-commands)
 
   (message-handler
    #:init-value