From: Christopher Allan Webber Date: Wed, 21 Dec 2016 19:05:43 +0000 (-0600) Subject: Update to use build-actions; fix clerk communication X-Git-Tag: fosdem-2017~126 X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=commitdiff_plain;h=c8c47c9d61abd219f561c020e9147d715717a16f Update to use build-actions; fix clerk communication --- diff --git a/mudsync.scm b/mudsync.scm index a3caaa1..15f4c86 100644 --- a/mudsync.scm +++ b/mudsync.scm @@ -18,7 +18,7 @@ ;;; along with Mudsync. If not, see . (define-module (mudsync) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (8sync agenda) #:use-module (ice-9 format) #:use-module (ice-9 match) diff --git a/mudsync/command.scm b/mudsync/command.scm index 8672d35..765962c 100644 --- a/mudsync/command.scm +++ b/mudsync/command.scm @@ -18,7 +18,7 @@ (define-module (mudsync command) #:use-module (mudsync parser) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (ice-9 control) diff --git a/mudsync/game-master.scm b/mudsync/game-master.scm index b8030d9..b11d21c 100644 --- a/mudsync/game-master.scm +++ b/mudsync/game-master.scm @@ -18,7 +18,7 @@ (define-module (mudsync game-master) #:use-module (mudsync networking) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (8sync agenda) #:use-module (oop goops) #:use-module (ice-9 match) @@ -52,7 +52,7 @@ (actions #:allocation #:each-subclass #:init-value - (mhandlers + (build-actions (init-world gm-init-world) (client-input gm-handle-client-input) (lookup-special gm-lookup-special) diff --git a/mudsync/gameobj.scm b/mudsync/gameobj.scm index 3bb743a..07b3ddb 100644 --- a/mudsync/gameobj.scm +++ b/mudsync/gameobj.scm @@ -21,7 +21,7 @@ (define-module (mudsync gameobj) #:use-module (mudsync command) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (8sync agenda) #:use-module (srfi srfi-1) #:use-module (ice-9 format) @@ -94,7 +94,7 @@ (actions #:allocation #:each-subclass ;;; Actions supported by all gameobj #:init-value - (mhandlers + (build-actions (init gameobj-act-init) ;; Commands for co-occupants (get-commands gameobj-get-commands) diff --git a/mudsync/networking.scm b/mudsync/networking.scm index 4714556..c2c1068 100644 --- a/mudsync/networking.scm +++ b/mudsync/networking.scm @@ -17,7 +17,7 @@ ;;; along with Mudsync. If not, see . (define-module (mudsync networking) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (8sync agenda) #:use-module (ice-9 format) #:use-module (ice-9 match) @@ -49,7 +49,7 @@ (actions #:allocation #:each-subclass #:init-value - (mhandlers + (build-actions (start-listening (lambda* (actor message #:key (server %default-server) diff --git a/mudsync/player.scm b/mudsync/player.scm index 8bf75b2..e3ae2ba 100644 --- a/mudsync/player.scm +++ b/mudsync/player.scm @@ -21,7 +21,7 @@ #:use-module (mudsync gameobj) #:use-module (mudsync game-master) #:use-module (mudsync parser) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (8sync agenda) #:use-module (ice-9 control) #:use-module (ice-9 format) @@ -51,7 +51,7 @@ (actions #:allocation #:each-subclass #:init-value - (mhandlers + (build-actions (init player-init) (handle-input player-handle-input) (tell player-tell) diff --git a/mudsync/room.scm b/mudsync/room.scm index a3ebc65..efb52d8 100644 --- a/mudsync/room.scm +++ b/mudsync/room.scm @@ -19,7 +19,7 @@ (define-module (mudsync room) #:use-module (mudsync command) #:use-module (mudsync gameobj) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (8sync agenda) #:use-module (oop goops) #:use-module (srfi srfi-1) @@ -80,7 +80,7 @@ (actions #:allocation #:each-subclass #:init-value - (mhandlers + (build-actions (cmd-go room-cmd-go) (cmd-go-where room-cmd-go-where) (announce-entrance room-announce-entrance) diff --git a/mudsync/run-game.scm b/mudsync/run-game.scm index 6bacfcd..95fedb0 100644 --- a/mudsync/run-game.scm +++ b/mudsync/run-game.scm @@ -20,8 +20,8 @@ #:use-module (mudsync game-master) #:use-module (8sync agenda) #:use-module (8sync repl) - #:use-module (8sync systems actors) - #:use-module (8sync systems actors debug) + #:use-module (8sync actors) + #:use-module (8sync debug) #:use-module (srfi srfi-1) #:use-module (ice-9 receive) #:use-module (ice-9 q) diff --git a/mudsync/thing.scm b/mudsync/thing.scm index 212ad2e..6963c01 100644 --- a/mudsync/thing.scm +++ b/mudsync/thing.scm @@ -21,7 +21,7 @@ (define-module (mudsync thing) #:use-module (mudsync command) #:use-module (mudsync gameobj) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (8sync agenda) #:use-module (oop goops) #:use-module (ice-9 match) @@ -63,7 +63,7 @@ #:init-value (wrap thing-contained-commands)) (actions #:allocation #:each-subclass #:init-value - (mhandlers + (build-actions (cmd-take thing-cmd-take) (cmd-drop thing-cmd-drop)))) diff --git a/worlds/bricabrac.scm b/worlds/bricabrac.scm index e5392aa..daf6353 100644 --- a/worlds/bricabrac.scm +++ b/worlds/bricabrac.scm @@ -20,7 +20,7 @@ (use-modules (mudsync) (mudsync parser) - (8sync systems actors) + (8sync actors) (8sync agenda) (oop goops) (ice-9 control) @@ -60,7 +60,7 @@ (commands #:init-value readable-commands*) (actions #:allocation #:each-subclass - #:init-value (mhandlers + #:init-value (build-actions (cmd-read readable-cmd-read)))) (define (readable-cmd-read actor message) @@ -108,7 +108,7 @@ or 'skribe'? Now *that's* composition!")) #:init-value chat-commands) (actions #:allocation #:each-subclass #:init-value - (mhandlers + (build-actions (cmd-chat npc-chat-randomly)))) (define random-bricabrac @@ -128,7 +128,7 @@ or 'skribe'? Now *that's* composition!")) (prep-direct-command "sign" 'cmd-sign-form '("as")))) (actions #:allocation #:each-subclass - #:init-value (mhandlers + #:init-value (build-actions (cmd-sign-form sign-cmd-sign-in)))) @@ -173,7 +173,7 @@ character.\n"))) (commands #:init-value summoning-bell-commands*) (actions #:allocation #:each-subclass - #:init-value (mhandlers + #:init-value (build-actions (cmd-ring summoning-bell-cmd-ring)))) (define* (summoning-bell-cmd-ring bell message . _) @@ -385,7 +385,7 @@ if this room is intended for children or child-like adults." (list (direct-command "sit" 'cmd-sit-furniture))) (actions #:allocation #:each-subclass - #:init-value (mhandlers + #:init-value (build-actions (cmd-sit-furniture furniture-cmd-sit)))) (define* (furniture-cmd-sit actor message #:key direct-obj) @@ -484,7 +484,7 @@ seat in the room, though." (commands #:init-value clerk-commands*) (patience #:init-value 0) (actions #:allocation #:each-subclass - #:init-value (mhandlers + #:init-value (build-actions (init clerk-act-init) (cmd-chat clerk-cmd-chat) (cmd-ask-incomplete clerk-cmd-ask-incomplete) @@ -555,7 +555,8 @@ with tuition at where it is...")) (define clerk-doesnt-know-text "The clerk apologizes and says she doesn't know about that topic.\n") -(define (clerk-cmd-ask clerk message indir-obj) +(define* (clerk-cmd-ask clerk message #:key indir-obj + #:allow-other-keys) (match (slot-ref clerk 'state) ('on-duty (match (assoc (pk 'indir indir-obj) clerk-help-topics) diff --git a/worlds/goblin-hq.scm b/worlds/goblin-hq.scm index 0e1de7e..3330a10 100644 --- a/worlds/goblin-hq.scm +++ b/worlds/goblin-hq.scm @@ -17,7 +17,7 @@ ;;; along with Mudsync. If not, see . (use-modules (mudsync) - (8sync systems actors) + (8sync actors) (8sync agenda) (oop goops) (ice-9 format))