1 ;;; Mudsync --- Live hackable MUD
2 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
4 ;;; This file is part of Mudsync.
6 ;;; Mudsync is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or
9 ;;; (at your option) any later version.
11 ;;; Mudsync is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;;; General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with Mudsync. If not, see <http://www.gnu.org/licenses/>.
19 (use-modules (mudsync)
20 (8sync systems actors)
26 ;; .-------------.--.--------.-----------.-----------.
27 ;; | ==== ===== | | | elrond's | |
28 ;; | ==== ===== | | joar's | goblin | |
29 ;; | Dootacenter | + codea | ballroom | | <- here be
30 ;; | ==== ===== + | plex | | | gandaros
31 ;; | ^-- chris's | ;--------'----+--,---' |
32 ;; | emacs ai == |@ | [schendje's] | |
33 ;; | server ==== | | graphic design | TOP SECRET |
34 ;; '-------------' + sweatshop + LABORATORY |
35 ;; .--------+-----. | | |
36 ;; | deb's | '----------------'---------------'
37 ;; | communication| | | | | | | | | | <- stairs
38 ;; | cooridoor + _|_|_|_|_|_|_|_|_|
48 (define-class <fridge> (<gameobj>)
49 (name #:init-value "fridge")
50 (desc #:init-value "The refrigerator is humming. To you? To itself?
51 Only the universe knows."))
57 (define typewriter-commands
59 (direct-command "type" 'cmd-type-gibberish)
60 (indir-command "type" 'cmd-type-something)
61 (direct-greedy-command "type" 'cmd-type-anything)))
63 (define typewriter-actions
65 (cmd-type-gibberish (wrap-apply typewriter-cmd-type-gibberish))
66 (cmd-type-something (wrap-apply typewriter-cmd-type-something))
67 (cmd-type-anything (wrap-apply typewriter-cmd-type-anything))))
69 (define typewriter-dispatch
70 (simple-dispatcher (append typewriter-actions
73 (define-class <typewriter> (<gameobj>)
74 (name #:init-value "fancy typewriter")
75 (goes-by #:init-value '("typewriter"
77 (commands #:init-value typewriter-commands)
80 (wrap-apply typewriter-dispatch)))
82 (define (typewriter-cmd-type-gibberish actor message)
83 (<- actor (message-from message) 'tell
84 #:text "*tikka takka!* *tikka takka!*
85 You type some gibberish on the typewriter.\n"))
87 (define (type-thing actor message type-text)
88 (<- actor (message-from message) 'tell
90 (format #f "You type out a note.\nThe note says: ~s\n"
93 (define (typewriter-cmd-type-something
94 actor message direct-obj indir-obj)
95 (type-thing actor message direct-obj))
97 (define (typewriter-cmd-type-anything
98 actor message direct-obj rest)
99 (type-thing actor message rest))
106 (define wooden-unlocked-door "A wooden door. It appears to be unlocked.")
107 (define metal-stiff-door "A stiff metal door.
108 It looks like with a hard shove, you could step through it.")
111 (define-syntax-rule (lol (list-contents ...) ...)
112 (list (list list-contents ...) ...))
118 #:name "The dootacenter"
120 "You've entered the server room. The isles alternate between hot and
121 cold here. It's not not very comfortable in here, and the combined
122 noise of hundreds, maybe thousands, of fans and various computing
123 mechanisms creates an unpleasant din. Who'd choose to work in such a
125 Still, you have to admit that all the machines look pretty nice."
126 ;; TODO: Allow walking around further in the dootacenter.
130 #:to 'room:north-hallway
131 #:desc wooden-unlocked-door))) ; eventually make this locked so you have
132 ; to kick it down, joeyh style!
135 #:name "North hallway"
137 "You're at the north end of the hallway. An open window gives a nice
138 breeze, and the curtains dance merrily in the wind. Outside appears
139 to be a pleasant looking lawn.
140 The hallway continues to the south. There are some doors to the east
145 #:to 'room:server-room
146 #:desc wooden-unlocked-door)
149 #:to 'room:code-a-plex
150 #:desc metal-stiff-door)
153 ;; #:to 'center-hallway)
158 #:name "Joar's Code-A-Plex"
160 "You've entered Joar's Code-A-Plex. What that means is anyone's guess.
161 Joar apparently hangs out in here sometimes, but you don't see him here right
163 There's a row of computer desks. Most of them have computers already on them,
164 But one looks invitingly empty."
168 #:to 'room:north-hallway
169 #:desc metal-stiff-door)))
172 <typewriter> 'room:code-a-plex)
175 <fridge> 'room:code-a-plex)))
177 ;; (room:hallway-intersection
179 ;; #:name "Hallway intersection"
180 ;; #:desc "You're at the hallway intersection. To the east is a door
181 ;; labeled \"get to work!\". The hallway continues to the west and to the
184 ;; ,(list (make <exit>
189 (define (goblin-demo . args)
190 (run-demo goblin-rooms 'room:north-hallway))