inform6lib 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +125 -0
- data/Rakefile +65 -0
- data/lib/inform/English.h.rb +1279 -0
- data/lib/inform/Grammar.h.inf.rb +350 -0
- data/lib/inform/Parser.h.rb +145 -0
- data/lib/inform/VerbLib.h.rb +77 -0
- data/lib/inform/infix.h.inf.rb +58 -0
- data/lib/inform/infix.h.rb +1064 -0
- data/lib/inform/linklpa.h.rb +139 -0
- data/lib/inform/linklv.h.rb +174 -0
- data/lib/inform/parserm.h.rb +5884 -0
- data/lib/inform/verblibm.h.rb +2481 -0
- metadata +57 -0
|
@@ -0,0 +1,1279 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# frozen_string_literal: false
|
|
3
|
+
|
|
4
|
+
# ==============================================================================
|
|
5
|
+
# English: Language Definition File
|
|
6
|
+
#
|
|
7
|
+
# Supplied for use with Inform 6 -- Release 6/11 -- Serial number 040227
|
|
8
|
+
#
|
|
9
|
+
# Copyright Graham Nelson 1993-2004 but freely usable (see manuals)
|
|
10
|
+
#
|
|
11
|
+
# This file is automatically Included in your game file by "parserm".
|
|
12
|
+
# Strictly, "parserm" includes the file named in the "language__" variable,
|
|
13
|
+
# whose contents can be defined by+language_name=XXX compiler setting (with a
|
|
14
|
+
# default of "english").
|
|
15
|
+
#
|
|
16
|
+
# Define the constant DIALECT_US before including "Parser" to obtain American
|
|
17
|
+
# English.
|
|
18
|
+
# ==============================================================================
|
|
19
|
+
|
|
20
|
+
# Copyright Nels Nelson 2008-2022 but freely usable (see license)
|
|
21
|
+
#
|
|
22
|
+
# You should have received a copy of the Artistic License
|
|
23
|
+
# along with the Inform6 Ruby Port.
|
|
24
|
+
#
|
|
25
|
+
# If not, see <https://www.perlfoundation.org/artistic-license-20.html>.
|
|
26
|
+
|
|
27
|
+
# The Inform module
|
|
28
|
+
module Inform
|
|
29
|
+
# The English module
|
|
30
|
+
module English
|
|
31
|
+
ENGLISH_DIALECT = true
|
|
32
|
+
|
|
33
|
+
NONSENSE = 10
|
|
34
|
+
REPEATED_ORDER = 20
|
|
35
|
+
NOTHING_TO_REPEAT = 21
|
|
36
|
+
UNEXPECTED_COMMA = 22
|
|
37
|
+
CANT_TALK = 24
|
|
38
|
+
SPEECH_THERAPY = 25
|
|
39
|
+
CANNOT_UNDERSTAND = 27
|
|
40
|
+
PARTIALLY_UNDERSTOOD = 28
|
|
41
|
+
NUMBER_UNRECOGNIZED = 29
|
|
42
|
+
CANT_SEE = 30
|
|
43
|
+
TOOLITTLE = 31
|
|
44
|
+
NOT_HELD = 32
|
|
45
|
+
NO_MULTIPLES = 33
|
|
46
|
+
VAGUE = 35
|
|
47
|
+
EXCEPTED_UNECESSARILY = 36
|
|
48
|
+
ANIMATE_EXPECTED = 37
|
|
49
|
+
UNRECOGNIZED = 38
|
|
50
|
+
SCENERY_IS_IRRELEVANT = 39
|
|
51
|
+
TOOFEW = 42
|
|
52
|
+
NOTHING = 44
|
|
53
|
+
AMBIGUOUS = 46
|
|
54
|
+
TOOMANY = 49
|
|
55
|
+
NO_OBJECT = 98
|
|
56
|
+
TREE_ERROR = 99
|
|
57
|
+
|
|
58
|
+
POSSESS_PK = 0x0100
|
|
59
|
+
DEFART_PK = 0x0101
|
|
60
|
+
INDEFART_PK = 0x0102
|
|
61
|
+
|
|
62
|
+
MANUAL_PRONOUNS = true
|
|
63
|
+
|
|
64
|
+
# ------------------------------------------------------------------------------
|
|
65
|
+
# Part I. Preliminaries
|
|
66
|
+
# ------------------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
# The CompassDirection class
|
|
69
|
+
class CompassDirection < Inform::System::Object
|
|
70
|
+
def initialize(name, number = 0, article = "the")
|
|
71
|
+
super(name)
|
|
72
|
+
@number = number
|
|
73
|
+
@article = article
|
|
74
|
+
has :scenery
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
Compass = Inform::System::Object.new "compass"
|
|
79
|
+
Compass.has :concealed
|
|
80
|
+
|
|
81
|
+
Compass > $n_obj = CompassDirection.new("north") {
|
|
82
|
+
name "n"
|
|
83
|
+
door_dir :n_to
|
|
84
|
+
}
|
|
85
|
+
# $n_obj.with { door_dir :n_to; name "n" }
|
|
86
|
+
Compass > $s_obj = CompassDirection.new("south")
|
|
87
|
+
$s_obj.with { door_dir :s_to; name "s" }
|
|
88
|
+
Compass > $e_obj = CompassDirection.new("east")
|
|
89
|
+
$e_obj.with { door_dir :e_to; name "e" }
|
|
90
|
+
Compass > $w_obj = CompassDirection.new("west")
|
|
91
|
+
$w_obj.with { door_dir :w_to; name "w" }
|
|
92
|
+
Compass > $ne_obj = CompassDirection.new("northeast")
|
|
93
|
+
$ne_obj.with { door_dir :ne_to; name "ne" }
|
|
94
|
+
Compass > $nw_obj = CompassDirection.new("northwest")
|
|
95
|
+
$nw_obj.with { door_dir :nw_to; name "nw" }
|
|
96
|
+
Compass > $se_obj = CompassDirection.new("southeast")
|
|
97
|
+
$se_obj.with { door_dir :se_to; name "se" }
|
|
98
|
+
Compass > $sw_obj = CompassDirection.new("southwest")
|
|
99
|
+
$sw_obj.with { door_dir :sw_to; name "sw" }
|
|
100
|
+
|
|
101
|
+
Compass > $u_obj = CompassDirection.new("above")
|
|
102
|
+
$u_obj.with { door_dir :u_to; name ["u", "up", "ceiling", "above", "sky"]; article "up"
|
|
103
|
+
has :distant
|
|
104
|
+
}
|
|
105
|
+
Compass > $d_obj = CompassDirection.new("ground")
|
|
106
|
+
$d_obj.with { door_dir :d_to; name ["d", "down", "floor", "below"] }
|
|
107
|
+
|
|
108
|
+
$in_obj = CompassDirection.new("inside")
|
|
109
|
+
$in_obj.with { door_dir :in_to; name "in" }
|
|
110
|
+
$out_obj = CompassDirection.new("outside")
|
|
111
|
+
$out_obj.with { door_dir :out_to; name "out" }
|
|
112
|
+
|
|
113
|
+
# ------------------------------------------------------------------------------
|
|
114
|
+
# Part II. Vocabulary
|
|
115
|
+
# ------------------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
AGAIN1__WD = 'again'
|
|
118
|
+
AGAIN2__WD = 'g'
|
|
119
|
+
AGAIN3__WD = 'again'
|
|
120
|
+
OOPS1__WD = 'oops'
|
|
121
|
+
OOPS2__WD = 'o'
|
|
122
|
+
OOPS3__WD = 'oops'
|
|
123
|
+
UNDO1__WD = 'undo'
|
|
124
|
+
UNDO2__WD = 'undo'
|
|
125
|
+
UNDO3__WD = 'undo'
|
|
126
|
+
|
|
127
|
+
ALL1__WD = 'all'
|
|
128
|
+
ALL2__WD = 'each'
|
|
129
|
+
ALL3__WD = 'every'
|
|
130
|
+
ALL4__WD = 'everything'
|
|
131
|
+
ALL5__WD = 'both'
|
|
132
|
+
AND1__WD = 'and'
|
|
133
|
+
AND2__WD = 'and'
|
|
134
|
+
AND3__WD = 'and'
|
|
135
|
+
BUT1__WD = 'but'
|
|
136
|
+
BUT2__WD = 'except'
|
|
137
|
+
BUT3__WD = 'but'
|
|
138
|
+
ME1__WD = 'me'
|
|
139
|
+
ME2__WD = 'myself'
|
|
140
|
+
ME3__WD = 'self'
|
|
141
|
+
OF1__WD = 'of'
|
|
142
|
+
OF2__WD = 'of'
|
|
143
|
+
OF3__WD = 'of'
|
|
144
|
+
OF4__WD = 'of'
|
|
145
|
+
OTHER1__WD = 'another'
|
|
146
|
+
OTHER2__WD = 'other'
|
|
147
|
+
OTHER3__WD = 'other'
|
|
148
|
+
THEN1__WD = 'then'
|
|
149
|
+
THEN2__WD = 'then'
|
|
150
|
+
THEN3__WD = 'then'
|
|
151
|
+
|
|
152
|
+
NO1__WD = 'n'
|
|
153
|
+
NO2__WD = 'no'
|
|
154
|
+
NO3__WD = 'no'
|
|
155
|
+
YES1__WD = 'y'
|
|
156
|
+
YES2__WD = 'yes'
|
|
157
|
+
YES3__WD = 'yes'
|
|
158
|
+
|
|
159
|
+
AMUSING__WD = 'amusing'
|
|
160
|
+
FULLSCORE1__WD = 'fullscore'
|
|
161
|
+
FULLSCORE2__WD = 'full'
|
|
162
|
+
QUIT1__WD = 'q'
|
|
163
|
+
QUIT2__WD = 'quit'
|
|
164
|
+
RESTART__WD = 'restart'
|
|
165
|
+
RESTORE__WD = 'restore'
|
|
166
|
+
|
|
167
|
+
LanguagePronouns = defined?(Java) ? java.util.concurrent.ConcurrentHashMap.new : {}
|
|
168
|
+
LanguagePronouns[:default] = {
|
|
169
|
+
# word possible GNAs connected
|
|
170
|
+
# to follow: to:
|
|
171
|
+
# a i
|
|
172
|
+
# s p s p
|
|
173
|
+
# mfnmfnmfnmfn
|
|
174
|
+
|
|
175
|
+
'it' => [0b001000111000, nil],
|
|
176
|
+
'him' => [0b100000000000, nil],
|
|
177
|
+
'her' => [0b010000000000, nil],
|
|
178
|
+
'them' => [0b000111000111, nil]
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
LanguageDescriptors = defined?(Java) ? java.util.concurrent.ConcurrentHashMap.new : {}
|
|
182
|
+
LanguageDescriptors[:default] = {
|
|
183
|
+
# word possible GNAs descriptor connected
|
|
184
|
+
# to follow: type: to:
|
|
185
|
+
# a i
|
|
186
|
+
# s p s p
|
|
187
|
+
# mfnmfnmfnmfn
|
|
188
|
+
|
|
189
|
+
'my' => [0b111111111111, POSSESS_PK, 0],
|
|
190
|
+
'this' => [0b111111111111, POSSESS_PK, 0],
|
|
191
|
+
'these' => [0b000111000111, POSSESS_PK, 0],
|
|
192
|
+
'that' => [0b111111111111, POSSESS_PK, 1],
|
|
193
|
+
'those' => [0b000111000111, POSSESS_PK, 1],
|
|
194
|
+
'his' => [0b111111111111, POSSESS_PK, 'him'],
|
|
195
|
+
'her' => [0b111111111111, POSSESS_PK, 'her'],
|
|
196
|
+
'their' => [0b111111111111, POSSESS_PK, 'them'],
|
|
197
|
+
'its' => [0b111111111111, POSSESS_PK, 'it'],
|
|
198
|
+
'the' => [0b111111111111, DEFART_PK, nil],
|
|
199
|
+
'a' => [0b111000111000, INDEFART_PK, nil],
|
|
200
|
+
'an' => [0b111000111000, INDEFART_PK, nil],
|
|
201
|
+
'some' => [0b000111000111, INDEFART_PK, nil],
|
|
202
|
+
'lit' => [0b111111111111, :light, nil],
|
|
203
|
+
'lighted' => [0b111111111111, :light, nil],
|
|
204
|
+
'unlit' => [0b111111111111, :nolight, nil]
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
LanguageNumbers = {
|
|
208
|
+
'one' => 1, 'two' => 2, 'three' => 3, 'four' => 4, 'five' => 5,
|
|
209
|
+
'six' => 6, 'seven' => 7, 'eight' => 8, 'nine' => 9, 'ten' => 10,
|
|
210
|
+
'eleven' => 11, 'twelve' => 12, 'thirteen' => 13, 'fourteen' => 14, 'fifteen' => 15,
|
|
211
|
+
'sixteen' => 16, 'seventeen' => 17, 'eighteen' => 18, 'nineteen' => 19, 'twenty' => 20
|
|
212
|
+
}
|
|
213
|
+
NumbersLanguage = LanguageNumbers.invert
|
|
214
|
+
|
|
215
|
+
Prepositions = [
|
|
216
|
+
'about', 'after', 'apart', 'around', 'at', 'beneath',
|
|
217
|
+
'beside', 'besides', 'by', 'for', 'from', 'in', 'inside',
|
|
218
|
+
'into', 'nearby', 'of', 'off', 'on', 'onto', 'out', 'over',
|
|
219
|
+
'through', 'to', 'under', 'underneath', 'with', 'within',
|
|
220
|
+
'without'
|
|
221
|
+
]
|
|
222
|
+
|
|
223
|
+
# ------------------------------------------------------------------------------
|
|
224
|
+
# Part III. Translation
|
|
225
|
+
# ------------------------------------------------------------------------------
|
|
226
|
+
|
|
227
|
+
def LanguageToInformese; end
|
|
228
|
+
|
|
229
|
+
# ------------------------------------------------------------------------------
|
|
230
|
+
# Part IV. Printing
|
|
231
|
+
# ------------------------------------------------------------------------------
|
|
232
|
+
|
|
233
|
+
LanguageAnimateGender = :male
|
|
234
|
+
LanguageInanimateGender = :neuter
|
|
235
|
+
|
|
236
|
+
LanguageContractionForms = 2 # English has two:
|
|
237
|
+
# 0 = starting with a consonant
|
|
238
|
+
# 1 = starting with a vowel
|
|
239
|
+
|
|
240
|
+
def LanguageContraction(text)
|
|
241
|
+
return 1 if !text.nil? && %i[a e i o u].include?(text.downcase.to_sym)
|
|
242
|
+
0
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
LanguageArticles = [
|
|
246
|
+
|
|
247
|
+
# Contraction form 0: Contraction form 1:
|
|
248
|
+
# Cdef Def Indef Cdef Def Indef
|
|
249
|
+
|
|
250
|
+
['The', 'the', 'a'], ['The', 'the', 'an'], # Articles 0
|
|
251
|
+
['The', 'the', 'some'], ['The', 'the', 'some'] # Articles 1
|
|
252
|
+
]
|
|
253
|
+
|
|
254
|
+
# a i
|
|
255
|
+
# s p s p
|
|
256
|
+
# m f n m f n m f n m f n
|
|
257
|
+
|
|
258
|
+
LanguageGNAsToArticles = [0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1]
|
|
259
|
+
|
|
260
|
+
def LanguageDirection(d)
|
|
261
|
+
case d.to_sym
|
|
262
|
+
when :n_to then print "north"
|
|
263
|
+
when :s_to then print "south"
|
|
264
|
+
when :e_to then print "east"
|
|
265
|
+
when :w_to then print "west"
|
|
266
|
+
when :ne_to then print "northeast"
|
|
267
|
+
when :nw_to then print "northwest"
|
|
268
|
+
when :se_to then print "southeast"
|
|
269
|
+
when :sw_to then print "southwest"
|
|
270
|
+
when :u_to then print "up"
|
|
271
|
+
when :d_to then print "down"
|
|
272
|
+
when :in_to then print "in"
|
|
273
|
+
when :out_to then print "out"
|
|
274
|
+
else return RunTimeError(9, d)
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
def LanguageNumber(n)
|
|
279
|
+
if n == 0; print "zero"; return false; end
|
|
280
|
+
if n < 0; print "minus "; n = -n; end
|
|
281
|
+
if n >= 1000; print LanguageNumber((n / 1000.to_f).to_i) + " thousand"; n = n % 1000; f = 1; end
|
|
282
|
+
if n >= 100
|
|
283
|
+
print COMMA__TX if f == 1
|
|
284
|
+
print LanguageNumber((n / 100.to_f).to_i) + " hundred"
|
|
285
|
+
n = n % 100
|
|
286
|
+
f = 1
|
|
287
|
+
end
|
|
288
|
+
return false if n == 0
|
|
289
|
+
if defined? DIALECT_US
|
|
290
|
+
print " " if f == 1
|
|
291
|
+
else
|
|
292
|
+
print " and " if f == 1
|
|
293
|
+
end
|
|
294
|
+
case n
|
|
295
|
+
when 1 then print "one"
|
|
296
|
+
when 2 then print "two"
|
|
297
|
+
when 3 then print "three"
|
|
298
|
+
when 4 then print "four"
|
|
299
|
+
when 5 then print "five"
|
|
300
|
+
when 6 then print "six"
|
|
301
|
+
when 7 then print "seven"
|
|
302
|
+
when 8 then print "eight"
|
|
303
|
+
when 9 then print "nine"
|
|
304
|
+
when 10 then print "ten"
|
|
305
|
+
when 11 then print "eleven"
|
|
306
|
+
when 12 then print "twelve"
|
|
307
|
+
when 13 then print "thirteen"
|
|
308
|
+
when 14 then print "fourteen"
|
|
309
|
+
when 15 then print "fifteen"
|
|
310
|
+
when 16 then print "sixteen"
|
|
311
|
+
when 17 then print "seventeen"
|
|
312
|
+
when 18 then print "eighteen"
|
|
313
|
+
when 19 then print "nineteen"
|
|
314
|
+
when 20..99
|
|
315
|
+
case (n / 10).to_i
|
|
316
|
+
when 2 then print "twenty"
|
|
317
|
+
when 3 then print "thirty"
|
|
318
|
+
when 4 then print "forty"
|
|
319
|
+
when 5 then print "fifty"
|
|
320
|
+
when 6 then print "sixty"
|
|
321
|
+
when 7 then print "seventy"
|
|
322
|
+
when 8 then print "eighty"
|
|
323
|
+
when 9 then print "ninety"
|
|
324
|
+
end
|
|
325
|
+
if (n % 10) != 0
|
|
326
|
+
print "-"
|
|
327
|
+
LanguageNumber(n % 10)
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
def LanguageTimeOfDay(hours, mins)
|
|
333
|
+
i = hours % 12
|
|
334
|
+
i = 12 if i == 0
|
|
335
|
+
print " " if i < 10
|
|
336
|
+
print i + ":" + (mins / 10.to_f).to_i + (mins % 10)
|
|
337
|
+
if (hours / 12.to_f).to_i > 0 then print " pm" else print " am" end
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
def LanguageVerb(i)
|
|
341
|
+
case i
|
|
342
|
+
when 'i', 'inv', 'inventory'
|
|
343
|
+
print "take inventory"
|
|
344
|
+
when 'l' then print "look"
|
|
345
|
+
when 'x' then print "examine"
|
|
346
|
+
when 'z' then print "wait"
|
|
347
|
+
else return false
|
|
348
|
+
end
|
|
349
|
+
true
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
# ----------------------------------------------------------------------------
|
|
353
|
+
# LanguageVerbIsDebugging is called by SearchScope. It should return true
|
|
354
|
+
# if word w is a debugging verb which needs all objects to be in scope.
|
|
355
|
+
# ----------------------------------------------------------------------------
|
|
356
|
+
|
|
357
|
+
def LanguageVerbIsDebugging(word)
|
|
358
|
+
return false unless defined? DEBUG
|
|
359
|
+
word.in? 'purloin', 'tree', 'abstract', 'gonear', 'scope', 'showobj', 'showme'
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# ----------------------------------------------------------------------------
|
|
363
|
+
# LanguageVerbLikesAdverb is called by PrintCommand when printing an UPTO_PE
|
|
364
|
+
# error or an inference message. Words which are intransitive verbs, i.e.,
|
|
365
|
+
# which require a direction name as an adverb ('walk west'), not a noun
|
|
366
|
+
# ('I only understood you as far as wanting to touch /the/ ground'), should
|
|
367
|
+
# cause the routine to return true.
|
|
368
|
+
# ----------------------------------------------------------------------------
|
|
369
|
+
|
|
370
|
+
def LanguageVerbLikesAdverb(word)
|
|
371
|
+
return true if word.in? 'look', 'go', 'push', 'walk'
|
|
372
|
+
false
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# ----------------------------------------------------------------------------
|
|
376
|
+
# LanguageVerbMayBeName is called by NounDomain when dealing with the
|
|
377
|
+
# player's reply to a "Which do you mean, the short stick or the long
|
|
378
|
+
# stick?" prompt from the parser. If the reply is another verb (for example,
|
|
379
|
+
# LOOK) then then previous ambiguous command is discarded /unless/
|
|
380
|
+
# it is one of these words which could be both a verb /and/ an
|
|
381
|
+
# adjective in a 'name' property.
|
|
382
|
+
# ----------------------------------------------------------------------------
|
|
383
|
+
|
|
384
|
+
def LanguageVerbMayBeName(word)
|
|
385
|
+
return true if word.in? 'long', 'short', 'normal', 'brief', 'full', 'verbose'
|
|
386
|
+
false
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
NKEY__TX = "N = next subject"
|
|
390
|
+
PKEY__TX = "P = previous"
|
|
391
|
+
QKEY1__TX = " Q = resume game"
|
|
392
|
+
QKEY2__TX = "Q = previous menu"
|
|
393
|
+
RKEY__TX = "RETURN = read subject"
|
|
394
|
+
|
|
395
|
+
NKEY1__KY = 'N'
|
|
396
|
+
NKEY2__KY = 'n'
|
|
397
|
+
PKEY1__KY = 'P'
|
|
398
|
+
PKEY2__KY = 'p'
|
|
399
|
+
QKEY1__KY = 'Q'
|
|
400
|
+
QKEY2__KY = 'q'
|
|
401
|
+
|
|
402
|
+
SCORE__TX = "Score: "
|
|
403
|
+
MOVES__TX = "Moves: "
|
|
404
|
+
TIME__TX = "Time: "
|
|
405
|
+
CANTGO__TX = "You can't go that way."
|
|
406
|
+
FORMER__TX = "your former self"
|
|
407
|
+
YOURSELF__TX = "yourself"
|
|
408
|
+
YOU__TX = "You"
|
|
409
|
+
YOU2__TX = "you"
|
|
410
|
+
YOUR__TX = "Your"
|
|
411
|
+
YOUR2__TX = "your"
|
|
412
|
+
DARKNESS__TX = "Darkness"
|
|
413
|
+
|
|
414
|
+
THOSET__TX = "those things"
|
|
415
|
+
THAT__TX = "that"
|
|
416
|
+
OR__TX = " or "
|
|
417
|
+
NOTHING__TX = "nothing"
|
|
418
|
+
IS__TX = " is"
|
|
419
|
+
ARE__TX = " are"
|
|
420
|
+
IS2__TX = "is "
|
|
421
|
+
ARE2__TX = "are "
|
|
422
|
+
AND__TX = " and "
|
|
423
|
+
LISTAND__TX = ", and "
|
|
424
|
+
LISTAND2__TX = " and "
|
|
425
|
+
WHOM__TX = "whom "
|
|
426
|
+
WHICH__TX = "which "
|
|
427
|
+
COMMA__TX = ", "
|
|
428
|
+
|
|
429
|
+
def ThatorThose(obj) # Used in the accusative
|
|
430
|
+
if obj == player ; return "you"; end
|
|
431
|
+
if obj.has?(:pluralname) ; return "those"; end
|
|
432
|
+
if obj.has?(:animate)
|
|
433
|
+
if obj.has?(:female) ; return "her"
|
|
434
|
+
elsif obj.hasnt?(:neuter) ; return "him"; end
|
|
435
|
+
end
|
|
436
|
+
return "that"
|
|
437
|
+
end
|
|
438
|
+
|
|
439
|
+
def ItorThem(obj)
|
|
440
|
+
if obj == player ; return "yourself"; end
|
|
441
|
+
if obj.has?(:pluralname) ; return "them"; end
|
|
442
|
+
if obj.has?(:animate)
|
|
443
|
+
if obj.has?(:female) ; return "her"
|
|
444
|
+
elsif obj.hasnt?(:neuter) ; return "him"; end
|
|
445
|
+
end
|
|
446
|
+
return "it"
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
def IsorAre(obj)
|
|
450
|
+
return (obj.to_i == 1 ? "is " : "are ") + obj if obj.number?
|
|
451
|
+
if obj.has?(:pluralname) || obj == player then "are" else "is" end
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
def CThatorThose(obj) # Used in the nominative
|
|
455
|
+
if obj == player ; return "You"; end
|
|
456
|
+
if obj.has?(:pluralname) ; return "Those"; end
|
|
457
|
+
if obj.has?(:animate)
|
|
458
|
+
if obj.has?(:female) ; return "She"
|
|
459
|
+
elsif obj.hasnt?(:neuter) ; return "He"; end
|
|
460
|
+
end
|
|
461
|
+
return "That"
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
def CTheyreorThats(obj)
|
|
465
|
+
if obj == player ; return "You're"; end
|
|
466
|
+
if obj.has?(:pluralname) ; return "They're"; end
|
|
467
|
+
if obj.has?(:animate)
|
|
468
|
+
if obj.has?(:female) ; return "She's"
|
|
469
|
+
elsif obj.hasnt?(:neuter) ; return "He's"; end
|
|
470
|
+
end
|
|
471
|
+
return "That's"
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
def language_lm(sw__var, n = 1, x1 = nil)
|
|
475
|
+
# if defined? NI_BUILD_COUNT then @say__p = 1
|
|
476
|
+
# end
|
|
477
|
+
# # defined? NI_BUILD_COUNT
|
|
478
|
+
case sw__var
|
|
479
|
+
when :Answer, :Ask
|
|
480
|
+
"There is no reply."
|
|
481
|
+
# when :Ask then # see Answer
|
|
482
|
+
when :Attack then "Violence isn't the answer to this one."
|
|
483
|
+
when :Blow then "You can't usefully blow " + thatorthose(x1) + "."
|
|
484
|
+
when :Boot then case n
|
|
485
|
+
when 1 then "Boot whom?"
|
|
486
|
+
end
|
|
487
|
+
when :Burn then "This dangerous act would achieve little."
|
|
488
|
+
when :Buy then "Nothing is on sale."
|
|
489
|
+
when :Climb then "I don't think much is to be achieved by that."
|
|
490
|
+
when :Close then case n
|
|
491
|
+
when 1 then println ctheyreorthats(x1) + " not something you can close."
|
|
492
|
+
when 2 then println ctheyreorthats(x1) + " already closed."
|
|
493
|
+
when 3 then "You close " + the(x1) + "."
|
|
494
|
+
end
|
|
495
|
+
when :CommandsOff then case n
|
|
496
|
+
when 1 then "[Command recording off.]"
|
|
497
|
+
# if defined? TARGET_GLULX
|
|
498
|
+
when 2 then "[Command recording already off.]"
|
|
499
|
+
# end
|
|
500
|
+
# # defined? TARGET_GLULX
|
|
501
|
+
end
|
|
502
|
+
when :CommandsOn then case n
|
|
503
|
+
when 1 then "[Command recording on.]"
|
|
504
|
+
# if defined? TARGET_GLULX
|
|
505
|
+
when 2 then "[Commands are currently replaying.]"
|
|
506
|
+
when 3 then "[Command recording already on.]"
|
|
507
|
+
when 4 then "[Command recording failed.]"
|
|
508
|
+
# end
|
|
509
|
+
# # defined? TARGET_GLULX
|
|
510
|
+
end
|
|
511
|
+
when :CommandsRead then case n
|
|
512
|
+
when 1 then "[Replaying commands.]"
|
|
513
|
+
# if defined? TARGET_GLULX
|
|
514
|
+
when 2 then "[Commands are already replaying.]"
|
|
515
|
+
when 3 then "[Command replay failed. Command recording is on.]"
|
|
516
|
+
when 4 then "[Command replay failed.]"
|
|
517
|
+
when 5 then "[Command replay complete.]"
|
|
518
|
+
# end
|
|
519
|
+
# # defined? TARGET_GLULX
|
|
520
|
+
end
|
|
521
|
+
when :Consult then "You discover nothing of interest in " + the(x1) + "."
|
|
522
|
+
when :Cut then "Cutting " + thatorthose(x1) + " up would achieve little."
|
|
523
|
+
when :Dig then "Digging would achieve nothing here."
|
|
524
|
+
when :Disrobe then case n
|
|
525
|
+
when 1 then "You're not wearing " + thatorthose(x1) + "."
|
|
526
|
+
when 2 then "You take off " + the(x1) + "."
|
|
527
|
+
when 3 then A(player) + " takes off " + hisorher(player, x1) + "."
|
|
528
|
+
end
|
|
529
|
+
when :Drink then "There's nothing suitable to drink here."
|
|
530
|
+
when :Drop then case n
|
|
531
|
+
when 1 then if x1.has?(:pluralname); print The(x1) + " are "; else; print The(x1) + " is "; end
|
|
532
|
+
"already here."
|
|
533
|
+
when 2 then "You haven't got " + thatorthose(x1) + "."
|
|
534
|
+
# if defined? NI_BUILD_COUNT
|
|
535
|
+
when 3 then print "(first taking " + the(x1) + " off)\n"; @say__p = 0; return
|
|
536
|
+
# else
|
|
537
|
+
# when 3 then "(first taking " + the(x1) + " off)"
|
|
538
|
+
# end
|
|
539
|
+
# # defined? NI_BUILD_COUNT
|
|
540
|
+
when 4 then "Dropped."
|
|
541
|
+
when 5 then A(player) + " drops " + a(x1) + "."
|
|
542
|
+
when 6 then A(player) + " drops " + a(x1) + " on " + the(second) + "."
|
|
543
|
+
end
|
|
544
|
+
when :Eat then case n
|
|
545
|
+
when 1 then println ctheyreorthats(x1) + " plainly inedible."
|
|
546
|
+
when 2 then "You eat " + the(x1) + ". Not bad."
|
|
547
|
+
when 3 then A(player) + " eats " + a(x1) + "."
|
|
548
|
+
end
|
|
549
|
+
when :EmptyT then case n
|
|
550
|
+
when 1 then println The(x1) + " can't contain things."
|
|
551
|
+
when 2 then println The(x1) + " " + isorare(x1) + " closed."
|
|
552
|
+
when 3 then println The(x1) + " " + isorare(x1) + " empty already."
|
|
553
|
+
when 4 then "That would scarcely empty anything."
|
|
554
|
+
end
|
|
555
|
+
when :Enter then case n
|
|
556
|
+
when 1 then print "But you're already "
|
|
557
|
+
if x1.has? :supporter
|
|
558
|
+
print "on "
|
|
559
|
+
else
|
|
560
|
+
print "in "
|
|
561
|
+
end
|
|
562
|
+
println the(x1) + "."
|
|
563
|
+
when 2 then if x1.has?(:pluralname); print "They're"; else; print "That's"; end
|
|
564
|
+
print " not something you can "
|
|
565
|
+
case @verb_word
|
|
566
|
+
when 'stand' then println "stand on."
|
|
567
|
+
when 'sit' then println "sit down on."
|
|
568
|
+
when 'lie' then println "lie down on."
|
|
569
|
+
else println "enter."
|
|
570
|
+
end
|
|
571
|
+
when 3 then "You can't get into the closed " + x1 + "."
|
|
572
|
+
when 4 then "You can only get into something free-standing."
|
|
573
|
+
when 5 then print "You get "
|
|
574
|
+
if x1.has? :supporter
|
|
575
|
+
print "onto "
|
|
576
|
+
else
|
|
577
|
+
print "into "
|
|
578
|
+
end
|
|
579
|
+
println the(x1) + "."
|
|
580
|
+
# if defined? NI_BUILD_COUNT
|
|
581
|
+
when 6 then print "(getting "
|
|
582
|
+
if x1.has? :supporter
|
|
583
|
+
print "off "
|
|
584
|
+
else
|
|
585
|
+
print "out of "
|
|
586
|
+
end
|
|
587
|
+
print the(x1); print ")\n"; @say__p = 0; return
|
|
588
|
+
when 7 then @say__p = 0
|
|
589
|
+
if x1.has?(:supporter); println "(getting onto " + the(x1) + ")"; end
|
|
590
|
+
if x1.has?(:container); println "(getting into " + the(x1) + ")"; end
|
|
591
|
+
"(entering " + the(x1) + ")\n"
|
|
592
|
+
# else # NI_BUILD_COUNT
|
|
593
|
+
# when 6 then print "(getting "
|
|
594
|
+
# if x1.has? :supporter
|
|
595
|
+
# print "off "
|
|
596
|
+
# else
|
|
597
|
+
# print "out of "
|
|
598
|
+
# end
|
|
599
|
+
# print the(x1;) ")"
|
|
600
|
+
# when 7 then if x1.has?(:supporter); println "(getting onto " + the(x1) + ")"; end
|
|
601
|
+
# if x1.has?(:container); println "(getting into " + the(x1) + ")"; end
|
|
602
|
+
# "(entering " + the(x1) + ")\n"
|
|
603
|
+
# end
|
|
604
|
+
# # defined? NI_BUILD_COUNT
|
|
605
|
+
when 8 then s = The(player) + " gets "
|
|
606
|
+
s << if x1.has? :supporter
|
|
607
|
+
"onto "
|
|
608
|
+
else
|
|
609
|
+
"into "
|
|
610
|
+
end
|
|
611
|
+
s << the(x1) + "."
|
|
612
|
+
end
|
|
613
|
+
when :Examine then case n
|
|
614
|
+
when 1 then "Darkness, noun. An absence of light to see by."
|
|
615
|
+
when 2 then print "You see nothing special about " + the(x1)
|
|
616
|
+
i = parent(x1)
|
|
617
|
+
if !i.nil? && i.has?(:supporter)
|
|
618
|
+
" on " + the(i) + "."
|
|
619
|
+
elsif !i.nil? && i.has?(:container) && i.hasany?(:open, :transparent)
|
|
620
|
+
" in " + the(i) + "."
|
|
621
|
+
else
|
|
622
|
+
"."
|
|
623
|
+
end
|
|
624
|
+
when 3 then print The(x1) + " " + isorare(x1) + " currently switched "
|
|
625
|
+
if x1.has? :on then println "on." else println "off." end
|
|
626
|
+
end
|
|
627
|
+
when :Exit then case n
|
|
628
|
+
when 1 then "But you aren't in anything at the moment."
|
|
629
|
+
when 2 then "You can't get out of the closed " + x1 + "."
|
|
630
|
+
when 3 then print "You get "
|
|
631
|
+
if x1.has? :supporter
|
|
632
|
+
print "off "
|
|
633
|
+
else
|
|
634
|
+
print "out of "
|
|
635
|
+
end
|
|
636
|
+
println the(x1) + "."
|
|
637
|
+
when 4 then print "But you aren't "
|
|
638
|
+
if x1.has? :supporter
|
|
639
|
+
print "on "
|
|
640
|
+
else
|
|
641
|
+
print "in "
|
|
642
|
+
end
|
|
643
|
+
println the(x1) + "."
|
|
644
|
+
when 5 then s = The(player) + " gets "
|
|
645
|
+
s << if x1.has? :supporter
|
|
646
|
+
"off "
|
|
647
|
+
else
|
|
648
|
+
"out of "
|
|
649
|
+
end
|
|
650
|
+
s << the(x1) + "."
|
|
651
|
+
end
|
|
652
|
+
when :Fill then "But there's no water here to carry."
|
|
653
|
+
when :FullScore then case n
|
|
654
|
+
when 1 then if @deadflag
|
|
655
|
+
print "The score was "
|
|
656
|
+
else
|
|
657
|
+
print "The score is "
|
|
658
|
+
end
|
|
659
|
+
"made up as follows:\n"
|
|
660
|
+
when 2 then "finding sundry items"
|
|
661
|
+
when 3 then "visiting various places"
|
|
662
|
+
when 4 then print "total (out of " + MAX_SCORE; ")"
|
|
663
|
+
end
|
|
664
|
+
when :GetOff then "But you aren't on " + the(x1) + " at the moment."
|
|
665
|
+
when :Give then case n
|
|
666
|
+
when 1 then "You aren't holding " + the(x1) + "."
|
|
667
|
+
when 2 then "You juggle " + the(x1) + " for a while, but don't achieve much."
|
|
668
|
+
when 3 then print The(x1)
|
|
669
|
+
if x1.has? :pluralname
|
|
670
|
+
print " don't"
|
|
671
|
+
else
|
|
672
|
+
print " doesn't"
|
|
673
|
+
end
|
|
674
|
+
" seem interested."
|
|
675
|
+
# if defined? NI_BUILD_COUNT
|
|
676
|
+
when 4 then print The(x1)
|
|
677
|
+
if x1.has?(:pluralname); print " aren't"
|
|
678
|
+
else print " isn't"
|
|
679
|
+
end
|
|
680
|
+
" able to receive things."
|
|
681
|
+
# end
|
|
682
|
+
# # defined? NI_BUILD_COUNT
|
|
683
|
+
end
|
|
684
|
+
when :Go then case n
|
|
685
|
+
when 1 then print "You'll have to get "
|
|
686
|
+
if x1.has? :supporter then print "off " else print "out of " end
|
|
687
|
+
println the(x1) + " first."
|
|
688
|
+
when 2 then println CANTGO__TX; # "You can't go that way."
|
|
689
|
+
when 3 then "You are unable to climb " + the(x1) + "."
|
|
690
|
+
when 4 then "You are unable to descend by " + the(x1) + "."
|
|
691
|
+
when 5 then "You can't, since " + the(x1) + " " + isorare(x1) + " in the way."
|
|
692
|
+
when 6 then print "You can't, since " + the(x1)
|
|
693
|
+
if x1.has? :pluralname
|
|
694
|
+
" lead nowhere."
|
|
695
|
+
else
|
|
696
|
+
" leads nowhere."
|
|
697
|
+
end
|
|
698
|
+
when 7 then A(player) + " " + exitsorleaves(player) + " " + (x1 ? upordown('to', x1) : "") + "."
|
|
699
|
+
when 8 then A(player) + " " + entersorarrives(player) + " " + (x1 ? upordown('from', x1) : "") + "."
|
|
700
|
+
when 9 then A(player) + " " + exitsorleaves(player) + (x1 ? " through " + the(x1) : "") + "."
|
|
701
|
+
when 10 then A(player) + " " + entersorarrives(player) + (x1 ? " through " + the(x1) : "") + "."
|
|
702
|
+
when 11,12,13
|
|
703
|
+
print "You cannot do that while "
|
|
704
|
+
case n
|
|
705
|
+
when 11 then "kneeling."
|
|
706
|
+
when 12 then "laying down."
|
|
707
|
+
when 13 then "sitting."
|
|
708
|
+
end
|
|
709
|
+
end
|
|
710
|
+
when :Insert then case n
|
|
711
|
+
when 1 then "You need to be holding " + the(x1) + " before you can put " + itorthem(x1) +
|
|
712
|
+
" into something else."
|
|
713
|
+
when 2 then println Cthatorthose(x1) + " can't contain things."
|
|
714
|
+
when 3 then println The(x1) + " " + isorare(x1) + " closed."
|
|
715
|
+
when 4 then "You'll need to take " + itorthem(x1) + " off first."
|
|
716
|
+
when 5 then "You can't put something inside itself."
|
|
717
|
+
# if defined? NI_BUILD_COUNT
|
|
718
|
+
when 6 then print "(first taking " + itorthem(x1) + " off)\n"; @say__p = 0; return
|
|
719
|
+
# else
|
|
720
|
+
# when 6 then "(first taking " + itorthem(x1) + " off)\n"
|
|
721
|
+
# end
|
|
722
|
+
# # defined? NI_BUILD_COUNT
|
|
723
|
+
when 7 then "There is no more room in " + the(x1) + "."
|
|
724
|
+
when 8 then "Done."
|
|
725
|
+
when 9 then "You put " + the(x1) + " into " + the(second) + "."
|
|
726
|
+
when 10 then A(player) + " puts " + a(x1) + " into " + a(parent(x1)) + "."
|
|
727
|
+
end
|
|
728
|
+
when :Inv then case n
|
|
729
|
+
when 1 then "You are carrying nothing."
|
|
730
|
+
when 2 then print "You are carrying"
|
|
731
|
+
when 3 then print ":\n"
|
|
732
|
+
when 4 then print ".\n"
|
|
733
|
+
end
|
|
734
|
+
when :Jump then case n
|
|
735
|
+
when 1 then "You jump on the spot, fruitlessly."
|
|
736
|
+
when 2 then A(x1) + " leaps into the air and then lands back in place."
|
|
737
|
+
end
|
|
738
|
+
when :JumpOver, :Tie
|
|
739
|
+
"You would achieve nothing by this."
|
|
740
|
+
when :Kiss then "Keep your mind on the game."
|
|
741
|
+
when :Listen then "You hear nothing unexpected."
|
|
742
|
+
when :ListMiscellany then case n
|
|
743
|
+
when 1 then print " (providing light)"
|
|
744
|
+
# if defined? NI_BUILD_COUNT
|
|
745
|
+
# when 2 then print " (closed)"
|
|
746
|
+
# when 4 then print " (empty)"
|
|
747
|
+
# when 6 then print " (closed and empty)"
|
|
748
|
+
# else # NI_BUILD_COUNT
|
|
749
|
+
when 2 then print " (which " + isorare(x1) + " closed)"
|
|
750
|
+
when 4 then print " (which " + isorare(x1) + " empty)"
|
|
751
|
+
# when 6 then print " (which " + isorare(x1) + " closed and empty)"
|
|
752
|
+
# end
|
|
753
|
+
# # defined? NI_BUILD_COUNT
|
|
754
|
+
when 3 then print " (closed and providing light)"
|
|
755
|
+
when 5 then print " (empty and providing light)"
|
|
756
|
+
when 7 then print " (closed, empty and providing light)"
|
|
757
|
+
when 8 then print " (providing light and being worn"
|
|
758
|
+
when 9 then print " (providing light"
|
|
759
|
+
when 10 then print " (being worn"
|
|
760
|
+
# if defined? NI_BUILD_COUNT
|
|
761
|
+
# when 11 then print " ("
|
|
762
|
+
# else
|
|
763
|
+
when 11 then print " (which " + isorare(x1) + " "
|
|
764
|
+
# end
|
|
765
|
+
# # defined? NI_BUILD_COUNT
|
|
766
|
+
when 12 then print "open"
|
|
767
|
+
when 13 then print "open but empty"
|
|
768
|
+
when 14 then print "closed"
|
|
769
|
+
when 15 then print "closed and locked"
|
|
770
|
+
when 16 then print " and empty"
|
|
771
|
+
# if defined? NI_BUILD_COUNT
|
|
772
|
+
# when 17 then print " (empty)"
|
|
773
|
+
# else
|
|
774
|
+
when 17 then print " (which " + isorare(x1) + " empty)"
|
|
775
|
+
# end
|
|
776
|
+
# # defined? NI_BUILD_COUNT
|
|
777
|
+
when 18 then print " containing "
|
|
778
|
+
when 19 then print " (on "
|
|
779
|
+
when 20 then print ", on top of "
|
|
780
|
+
when 21 then print " (in "
|
|
781
|
+
when 22 then print ", inside "
|
|
782
|
+
end
|
|
783
|
+
when :LMode1 then " is now in its normal \"brief\" printing mode, which gives long descriptions " +
|
|
784
|
+
"of places never before visited and short descriptions otherwise."
|
|
785
|
+
when :LMode2 then " is now in its \"verbose\" mode, which always gives long descriptions " +
|
|
786
|
+
"of locations (even if you've been there before)."
|
|
787
|
+
when :LMode3 then " is now in its \"superbrief\" mode, which always gives short descriptions " +
|
|
788
|
+
"of locations (even if you haven't been there before)."
|
|
789
|
+
when :Lock then case n
|
|
790
|
+
when 1 then if x1.has? :pluralname then print "They don't " else print "That doesn't " end
|
|
791
|
+
"seem to be something you can lock."
|
|
792
|
+
when 2 then println ctheyreorthats(x1) + " locked at the moment."
|
|
793
|
+
when 3 then "First you'll have to close " + the(x1) + "."
|
|
794
|
+
when 4 then if x1.has? :pluralname then print "Those don't " else print "That doesn't " end
|
|
795
|
+
"seem to fit the lock."
|
|
796
|
+
when 5 then "You lock " + the(x1) + "."
|
|
797
|
+
when 6 then A(player) + " locks " + the(x1) + " with " + hisorher(player, second) + "."
|
|
798
|
+
end
|
|
799
|
+
when :Look then case n
|
|
800
|
+
when 1 then print " (on " + the(x1) + ")"
|
|
801
|
+
when 2 then print " (in " + the(x1) + ")"
|
|
802
|
+
when 3 then print " (as " + object(x1) + ")"
|
|
803
|
+
when 4 then print "On " + the(x1)
|
|
804
|
+
WriteListFrom(child(x1), ENGLISH_BIT + RECURSE_BIT + PARTINV_BIT + TERSE_BIT + CONCEAL_BIT + ISARE_BIT)
|
|
805
|
+
"."
|
|
806
|
+
when 5,6
|
|
807
|
+
if x1 != @visibility_ceiling
|
|
808
|
+
if x1.has? :supporter then print "On " else print "In " end
|
|
809
|
+
print the(x1) + " you"
|
|
810
|
+
else print "You" end
|
|
811
|
+
print " can "
|
|
812
|
+
print "also " if n == 5
|
|
813
|
+
print "see "
|
|
814
|
+
WriteListFrom(
|
|
815
|
+
child(x1),
|
|
816
|
+
ENGLISH_BIT + RECURSE_BIT + PARTINV_BIT + TERSE_BIT + CONCEAL_BIT + WORKFLAG_BIT
|
|
817
|
+
)
|
|
818
|
+
if x1 != @visibility_ceiling
|
|
819
|
+
"."
|
|
820
|
+
else
|
|
821
|
+
" here."
|
|
822
|
+
end
|
|
823
|
+
when 7 then "You see nothing of interest in that direction."
|
|
824
|
+
when 8 then if x1.has?(:supporter); print " (on "; else; print " (in "; end
|
|
825
|
+
print the(x1) + ")"
|
|
826
|
+
end
|
|
827
|
+
when :LookUnder then case n
|
|
828
|
+
when 1 then "But it's dark."
|
|
829
|
+
when 2 then "You find nothing of interest."
|
|
830
|
+
when 3 then A(player) + " seems to be looking for something underneath " + a(x1) + "."
|
|
831
|
+
end
|
|
832
|
+
when :Mild then "Quite."
|
|
833
|
+
when :Miscellany then case n
|
|
834
|
+
when 1 then "(considering the first sixteen objects only)\n"
|
|
835
|
+
when 2 then "Nothing to do!"
|
|
836
|
+
when 3 then print " You have died "
|
|
837
|
+
when 4 then print " You have won "
|
|
838
|
+
when 5 then print "\nWould you like to RESTART, RESTORE a saved game"
|
|
839
|
+
# if defined? DEATH_MENTION_UNDO
|
|
840
|
+
# print ", UNDO your last move"
|
|
841
|
+
# end
|
|
842
|
+
# # defined? DEATH_MENTION_UNDO
|
|
843
|
+
print ", give the FULL score for that game" if TASKS_PROVIDED == 0
|
|
844
|
+
# if defined? NI_BUILD_COUNT
|
|
845
|
+
# if (@deadflag == 2 && (I7_Amusing_Provided()))
|
|
846
|
+
# print ", see some suggestions for AMUSING things to do"
|
|
847
|
+
# end
|
|
848
|
+
# else
|
|
849
|
+
# if (@deadflag == 2 && AMUSING_PROVIDED == 0)
|
|
850
|
+
# print ", see some suggestions for AMUSING things to do"
|
|
851
|
+
# end
|
|
852
|
+
# end
|
|
853
|
+
# # defined? NI_BUILD_COUNT
|
|
854
|
+
# if defined? I7_SERIAL_COMMA
|
|
855
|
+
# print ","
|
|
856
|
+
# end
|
|
857
|
+
# # defined? I7_SERIAL_COMMA
|
|
858
|
+
" or QUIT?"
|
|
859
|
+
when 6 then "[Your interpreter does not provide \"undo\". Sorry!]"
|
|
860
|
+
when 7 then "\"Undo\" failed. [Not all interpreters provide it.]"
|
|
861
|
+
# when 7 then "[You cannot \"undo\" any further.]"
|
|
862
|
+
when 8 then "Please give one of the answers above."
|
|
863
|
+
when 9 then "It is now pitch dark in here!"
|
|
864
|
+
when 10 then "I beg your pardon?"
|
|
865
|
+
when 11 then "[You can't \"undo\" what hasn't been done!]"
|
|
866
|
+
when 12 then "[Can't \"undo\" twice in succession. Sorry!]"
|
|
867
|
+
when 13 then "[Previous turn undone.]"
|
|
868
|
+
when 14 then "Sorry, that can't be corrected."
|
|
869
|
+
when 15 then "Think nothing of it."
|
|
870
|
+
when 16 then "\"Oops\" can only correct a single word."
|
|
871
|
+
when 17 then "It is pitch dark, and you can't see a thing."
|
|
872
|
+
when 18 then "yourself" # print "yourself"
|
|
873
|
+
when 19 then "As good-looking as ever."
|
|
874
|
+
when 20 then "To repeat a command like \"frog, jump\", just say \"again\", not \"frog, again\"."
|
|
875
|
+
when 21 then "You can hardly repeat that."
|
|
876
|
+
when 22 then "You can't begin with a comma."
|
|
877
|
+
when 23 then "You seem to want to talk to someone, but I can't see whom."
|
|
878
|
+
when 24 then "You can't talk to " + the(x1) + "."
|
|
879
|
+
when 25 then "To talk to someone, try \"someone, hello\" or some such."
|
|
880
|
+
when 26 then "(first taking " + the(@not_holding) + ")"
|
|
881
|
+
when 27 then "I didn't understand that sentence."
|
|
882
|
+
when 28 then print "I only understood you as far as wanting to "
|
|
883
|
+
when 29 then "I didn't understand that number."
|
|
884
|
+
when 30 then "You can't see any such thing."
|
|
885
|
+
when 31 then "You seem to have said too little!"
|
|
886
|
+
when 32 then "You aren't holding that!"
|
|
887
|
+
when 33 then "You can't use multiple objects with that verb."
|
|
888
|
+
when 34 then "You can only use multiple objects once on a line."
|
|
889
|
+
when 35 then "I'm not sure what \"" + @pronoun_word + "\" refers to."
|
|
890
|
+
when 36 then "You excepted something not included anyway!"
|
|
891
|
+
when 37 then "You can only do that to something animate."
|
|
892
|
+
when 38 then if defined? DIALECT_US
|
|
893
|
+
"That's not a verb I recognize."
|
|
894
|
+
else
|
|
895
|
+
"That's not a verb I recognise."
|
|
896
|
+
end
|
|
897
|
+
when 39 then "That's not something you need to refer to in the course of this game."
|
|
898
|
+
when 40 then "You can't see \"" + @pronoun_word + "\" (" + the(@pronoun_obj) +
|
|
899
|
+
") at the moment."
|
|
900
|
+
when 41 then "I didn't understand the way that finished."
|
|
901
|
+
when 42 then if x1 == 0; print "None"; else; print "Only " + number(x1); end
|
|
902
|
+
print " of those "
|
|
903
|
+
if x1 == 1
|
|
904
|
+
print "is"
|
|
905
|
+
else
|
|
906
|
+
print "are"
|
|
907
|
+
end
|
|
908
|
+
" available."
|
|
909
|
+
when 43 then "Nothing to do!"
|
|
910
|
+
when 44 then "There are none at all available!"
|
|
911
|
+
when 45 then print "Who do you mean, "
|
|
912
|
+
when 46 then print "Which do you mean, "
|
|
913
|
+
when 47 then "Sorry, you can only have one item here. Which exactly?"
|
|
914
|
+
when 48 then print "Whom do you want"
|
|
915
|
+
print " " + the(@actor) if @actor != @player
|
|
916
|
+
print " to "; PrintCommand(); print "?\n"
|
|
917
|
+
when 49 then print "What do you want"
|
|
918
|
+
print " " + the(@actor) if @actor != @player
|
|
919
|
+
print " to "; PrintCommand(); print "?\n"
|
|
920
|
+
when 50 then print "Your score has just gone "
|
|
921
|
+
if x1 > 0; print "up"; else x1 = -x1; print "down"; end
|
|
922
|
+
print " by " + number(x1) + " point"
|
|
923
|
+
if x1 > 1; print "s"; end
|
|
924
|
+
when 51 then "(Since something dramatic has happened, your list of commands has been cut short.)"
|
|
925
|
+
when 52 then "\nType a number from 1 to " + x1 + ", 0 to redisplay or press ENTER."
|
|
926
|
+
when 53 then "\n[Please press SPACE.]"
|
|
927
|
+
when 54 then "[Comment recorded.]"
|
|
928
|
+
when 55 then "[Comment NOT recorded.]"
|
|
929
|
+
when 56 then print ".\n"
|
|
930
|
+
when 57 then print "?\n"
|
|
931
|
+
when 98 then "No object with that id."
|
|
932
|
+
when 99 then "That would break the object tree."
|
|
933
|
+
end
|
|
934
|
+
when :No, :Yes then "That was a rhetorical question."
|
|
935
|
+
when :NotifyOff
|
|
936
|
+
"Score notification off."
|
|
937
|
+
when :NotifyOn then "Score notification on."
|
|
938
|
+
when :Objects then case n
|
|
939
|
+
when 1 then "Objects you have handled:\n"
|
|
940
|
+
when 2 then "None."
|
|
941
|
+
when 3 then print " (worn)"
|
|
942
|
+
when 4 then print " (held)"
|
|
943
|
+
when 5 then print " (given away)"
|
|
944
|
+
when 6 then print " (in " + x1 + ")"
|
|
945
|
+
when 7 then print " (in " + the(x1) + ")"
|
|
946
|
+
when 8 then print " (inside " + the(x1) + ")"
|
|
947
|
+
when 9 then print " (on " + the(x1) + ")"
|
|
948
|
+
when 10 then print " (lost)"
|
|
949
|
+
end
|
|
950
|
+
when :Open then case n
|
|
951
|
+
when 1 then println ctheyreorthats(x1) + " not something you can open."
|
|
952
|
+
when 2 then if x1.has?(:pluralname); print "They seem "; else; print "It seems "; end
|
|
953
|
+
"to be locked."
|
|
954
|
+
when 3 then println ctheyreorthats(x1) + " already open."
|
|
955
|
+
when 4 then print "You open " + the(x1) + ", revealing "
|
|
956
|
+
if WriteListFrom(child(x1), ENGLISH_BIT + TERSE_BIT + CONCEAL_BIT) == 0; return "nothing."; end
|
|
957
|
+
"."
|
|
958
|
+
when 5 then "You open " + the(x1) + "."
|
|
959
|
+
end
|
|
960
|
+
when :Order then print The(x1)
|
|
961
|
+
if x1.has? :pluralname then print " have" else print " has" end
|
|
962
|
+
" better things to do."
|
|
963
|
+
when :Places then case n
|
|
964
|
+
when 1 then print "You have visited: "
|
|
965
|
+
when 2 then print ".\n"
|
|
966
|
+
end
|
|
967
|
+
when :Pray then "Nothing practical results from your prayer."
|
|
968
|
+
when :Prompt then print "\n>"
|
|
969
|
+
when :Pronouns then case n
|
|
970
|
+
when 1 then print "At the moment, "
|
|
971
|
+
when 2 then print "means "
|
|
972
|
+
when 3 then print "is unset"
|
|
973
|
+
when 4 then "no pronouns are known to the game."
|
|
974
|
+
when 5 then "."
|
|
975
|
+
end
|
|
976
|
+
when :Pull, :Push, :Turn then case n
|
|
977
|
+
when 1 then if x1.has?(:pluralname); print "Those are "; else; print "It is "; end
|
|
978
|
+
"fixed in place."
|
|
979
|
+
when 2 then "You are unable to."
|
|
980
|
+
when 3 then "Nothing obvious happens."
|
|
981
|
+
when 4 then "That would be less than courteous."
|
|
982
|
+
end
|
|
983
|
+
# when Push then # see Pull
|
|
984
|
+
when :PushDir then case n
|
|
985
|
+
when 1 then "Is that the best you can think of?"
|
|
986
|
+
when 2 then "That's not a direction."
|
|
987
|
+
when 3 then "Not that way you can't."
|
|
988
|
+
end
|
|
989
|
+
when :PutOn then case n
|
|
990
|
+
when 1 then "You need to be holding " + the(x1) + " before you can put " +
|
|
991
|
+
itorthem(x1) + " on top of something else."
|
|
992
|
+
when 2 then "You can't put something on top of itself."
|
|
993
|
+
when 3 then "Putting things on " + the(x1) + " would achieve nothing."
|
|
994
|
+
when 4 then "You lack the dexterity."
|
|
995
|
+
# if defined? NI_BUILD_COUNT
|
|
996
|
+
when 5 then print "(first taking " + itorthem(x1) + " off)\n"; @say__p = 0; return
|
|
997
|
+
# else
|
|
998
|
+
# when 5 then "(first taking " + itorthem(x1) + " off)\n"
|
|
999
|
+
# end
|
|
1000
|
+
# # defined? NI_BUILD_COUNT
|
|
1001
|
+
when 6 then "There is no more room on " + the(x1) + "."
|
|
1002
|
+
when 7 then "Done."
|
|
1003
|
+
when 8 then "You put " + the(x1) + " on " + the(parent(x1)) + "."
|
|
1004
|
+
when 9 then A(player) + " puts " + a(x1) + " on " + a(parent(x1)) + "."
|
|
1005
|
+
end
|
|
1006
|
+
when :Quit then case n
|
|
1007
|
+
when 1 then print "Please answer yes or no."
|
|
1008
|
+
when 2 then print "Are you sure you want to quit? "
|
|
1009
|
+
end
|
|
1010
|
+
when :Remove then case n
|
|
1011
|
+
when 1 then if x1.has?(:pluralname); print "They are"; else; print "It is"; end
|
|
1012
|
+
" unfortunately closed."
|
|
1013
|
+
when 2 then if x1.has?(:pluralname); print "But they aren't"; else; print "But it isn't"; end
|
|
1014
|
+
" there now."
|
|
1015
|
+
when 3 then "Removed."
|
|
1016
|
+
end
|
|
1017
|
+
when :Restart then case n
|
|
1018
|
+
when 1 then print "Are you sure you want to restart? "
|
|
1019
|
+
when 2 then "Failed."
|
|
1020
|
+
end
|
|
1021
|
+
when :Restore then case n
|
|
1022
|
+
when 1 then "Restore failed."
|
|
1023
|
+
when 2 then "Ok."
|
|
1024
|
+
end
|
|
1025
|
+
when :Rub then case n
|
|
1026
|
+
when 1 then "You achieve nothing by this."
|
|
1027
|
+
end
|
|
1028
|
+
when :Save then case n
|
|
1029
|
+
when 1 then "Save failed."
|
|
1030
|
+
when 2 then "Ok."
|
|
1031
|
+
end
|
|
1032
|
+
when :Score then case n
|
|
1033
|
+
when 1 then if @deadflag
|
|
1034
|
+
print "In that game you scored "
|
|
1035
|
+
else
|
|
1036
|
+
print "You have so far scored "
|
|
1037
|
+
end
|
|
1038
|
+
print score + " out of a possible " + MAX_SCORE + ", in " + turns + " turn"
|
|
1039
|
+
print "s" if turns != 1
|
|
1040
|
+
return
|
|
1041
|
+
when 2 then "There is no score in this story."
|
|
1042
|
+
end
|
|
1043
|
+
when :ScriptOff then case n
|
|
1044
|
+
when 1 then "Transcripting is already off."
|
|
1045
|
+
when 2 then "\nEnd of transcript."
|
|
1046
|
+
when 3 then "Attempt to end transcript failed."
|
|
1047
|
+
end
|
|
1048
|
+
when :ScriptOn then case n
|
|
1049
|
+
when 1 then "Transcripting is already on."
|
|
1050
|
+
when 2 then "Start of a transcript of"
|
|
1051
|
+
when 3 then "Attempt to begin transcript failed."
|
|
1052
|
+
end
|
|
1053
|
+
when :Search then case n
|
|
1054
|
+
when 1 then "But it's dark."
|
|
1055
|
+
when 2
|
|
1056
|
+
print "There is nothing "
|
|
1057
|
+
if x1.has? :container
|
|
1058
|
+
print "in "
|
|
1059
|
+
else
|
|
1060
|
+
print "on "
|
|
1061
|
+
end
|
|
1062
|
+
the(x1) + "."
|
|
1063
|
+
when 3 then print "On " + the(x1)
|
|
1064
|
+
WriteListFrom(child(x1), ENGLISH_BIT + TERSE_BIT + CONCEAL_BIT + ISARE_BIT)
|
|
1065
|
+
"."
|
|
1066
|
+
when 4 then "You find nothing of interest."
|
|
1067
|
+
when 5 then "You can't see inside, since " + the(x1) + " " + isorare(x1) + " closed."
|
|
1068
|
+
when 6 then println The(x1) + " " + isorare(x1) + " empty."
|
|
1069
|
+
when 7 then print "In " + the(x1)
|
|
1070
|
+
WriteListFrom(child(x1), ENGLISH_BIT + TERSE_BIT + CONCEAL_BIT + ISARE_BIT)
|
|
1071
|
+
"."
|
|
1072
|
+
when 8 then A(player) + " searches " + a(x1) + "."
|
|
1073
|
+
end
|
|
1074
|
+
when :Set then "No, you can't set " + thatorthose(x1) + "."
|
|
1075
|
+
when :SetTo then "No, you can't set " + thatorthose(x1) + " to anything."
|
|
1076
|
+
when :Show then case n
|
|
1077
|
+
when 1 then "You aren't holding " + the(x1) + "."
|
|
1078
|
+
when 2 then println The(x1) + " " + isorare(x1) + " unimpressed."
|
|
1079
|
+
end
|
|
1080
|
+
when :Sing then case n
|
|
1081
|
+
when 1 then "Your singing is abominable."
|
|
1082
|
+
when 2 then A(player) + " begins to sing a little ditty."
|
|
1083
|
+
end
|
|
1084
|
+
when :Sleep then case n
|
|
1085
|
+
when 1 then "You aren't feeling especially drowsy."
|
|
1086
|
+
when 2 then A(player) + " seems rather tired."
|
|
1087
|
+
end
|
|
1088
|
+
when :Smell then case n
|
|
1089
|
+
when 1 then "You smell nothing unexpected."
|
|
1090
|
+
when 2 then if x1.in? player
|
|
1091
|
+
A(player) + " puts " + hisorher(player, 'nose') + " up to " +
|
|
1092
|
+
hisorher(player, x1) + " and inhales deeply."
|
|
1093
|
+
elsif !x1.nil? && x1.has?(:animate)
|
|
1094
|
+
A(player) + " sniffs in " + the(x1) + "'s direction."
|
|
1095
|
+
elsif !x1.nil?
|
|
1096
|
+
A(player) + " sniffs at " + the(x1) + "."
|
|
1097
|
+
else
|
|
1098
|
+
A(player) + " sniffs the air."
|
|
1099
|
+
end
|
|
1100
|
+
end
|
|
1101
|
+
when :Sorry then case n
|
|
1102
|
+
when 1 then if defined? ENGLISH_DIALECT then "Oh, don't apologize." else "Oh, don't apologise." end
|
|
1103
|
+
when 2 then A(player) + " apologizes profusely."
|
|
1104
|
+
end
|
|
1105
|
+
when :Squeeze then case n
|
|
1106
|
+
when 1 then "Keep your hands to yourself."
|
|
1107
|
+
when 2 then "You achieve nothing by this."
|
|
1108
|
+
end
|
|
1109
|
+
when :Strong then "Real adventurers do not use such language."
|
|
1110
|
+
when :Swim then "There's not enough water to swim in."
|
|
1111
|
+
when :Swing then "There's nothing sensible to swing here."
|
|
1112
|
+
when :SwitchOff then case n
|
|
1113
|
+
when 1 then println ctheyreorthats(x1) + " not something you can switch."
|
|
1114
|
+
when 2 then println ctheyreorthats(x1) + " already off."
|
|
1115
|
+
when 3 then "You switch " + the(x1) + " off."
|
|
1116
|
+
when 4 then A(player) + " switches " + a(x1) + " off."
|
|
1117
|
+
end
|
|
1118
|
+
when :SwitchOn then case n
|
|
1119
|
+
when 1 then println ctheyreorthats(x1) + " not something you can switch."
|
|
1120
|
+
when 2 then println ctheyreorthats(x1) + " already on."
|
|
1121
|
+
when 3 then "You switch " + the(x1) + " on."
|
|
1122
|
+
when 4 then A(player) + " switches " + a(x1) + " on."
|
|
1123
|
+
end
|
|
1124
|
+
when :Take then case n
|
|
1125
|
+
when 1 then "Taken."
|
|
1126
|
+
when 2 then "You are always self-possessed."
|
|
1127
|
+
when 3 then "I don't suppose " + the(x1) + " would care for that."
|
|
1128
|
+
when 4 then print "You'd have to get "
|
|
1129
|
+
if x1.has? :supporter
|
|
1130
|
+
print "off "
|
|
1131
|
+
else
|
|
1132
|
+
print "out of "
|
|
1133
|
+
end
|
|
1134
|
+
println the(x1) + " first."
|
|
1135
|
+
when 5 then println "You already have " + thatorthose(x1) + "."
|
|
1136
|
+
when 6 then if noun.has?(:pluralname); print "Those seem "; else; print "That seems "; end
|
|
1137
|
+
println "to belong to " + the(x1) + "."
|
|
1138
|
+
when 7 then if noun.has?(:pluralname); print "Those seem "; else; print "That seems "; end
|
|
1139
|
+
println "to be a part of " + the(x1) + "."
|
|
1140
|
+
when 8 then println Cthatorthose(x1) + " " + isorare(x1) + "n't available."
|
|
1141
|
+
when 9 then println The(x1) + " " + isorare(x1) + "n't open."
|
|
1142
|
+
when 10 then if x1.has?(:pluralname); print "They're "; else; print "That's "; end
|
|
1143
|
+
"hardly portable."
|
|
1144
|
+
when 11 then if x1.has?(:pluralname); print "They're "; else; print "That's "; end
|
|
1145
|
+
"fixed in place."
|
|
1146
|
+
when 12 then "You're carrying too many things already."
|
|
1147
|
+
# if defined? NI_BUILD_COUNT
|
|
1148
|
+
when 13 then print "(putting " + the(x1) + " into " + the(SACK_OBJECT) +
|
|
1149
|
+
" to make room)\n"; @say__p = 0; return
|
|
1150
|
+
when 14 then "You can't reach into " + the(x1) + "."
|
|
1151
|
+
# else
|
|
1152
|
+
# when 13 then "(putting " + the(x1) + " into " + the(SACK_OBJECT) + " to make room)"
|
|
1153
|
+
# end
|
|
1154
|
+
# # defined? NI_BUILD_COUNT
|
|
1155
|
+
when 15 then x2 = second || parent(x1)
|
|
1156
|
+
if x2.has? :supporter
|
|
1157
|
+
A(player) + " takes " + a(x1) + " from " + a(x2) + "."
|
|
1158
|
+
elsif x2.has? :container
|
|
1159
|
+
A(player) + " takes " + a(x1) + " out of " + a(x2) + "."
|
|
1160
|
+
elsif x2.has?(:cover) && noun.has?(:underneath)
|
|
1161
|
+
A(player) + " takes " + a(x1) + " out from underneath " + a(x2) + "."
|
|
1162
|
+
else
|
|
1163
|
+
A(player) + " picks " + a(x1) + " up from " + the($d_obj) + "."
|
|
1164
|
+
end
|
|
1165
|
+
when 16 then println The(x1) + " " + isorare(x1) + " too far away."
|
|
1166
|
+
end
|
|
1167
|
+
when :Taste then "You taste nothing unexpected."
|
|
1168
|
+
when :Tell then case n
|
|
1169
|
+
when 1 then "You talk to yourself a while."
|
|
1170
|
+
when 2 then "This provokes no reaction."
|
|
1171
|
+
end
|
|
1172
|
+
when :Think then case n
|
|
1173
|
+
when 1 then "What a good idea."
|
|
1174
|
+
when 2 then A(player) + " seems momentarily lost in thought."
|
|
1175
|
+
end
|
|
1176
|
+
when :ThrowAt then case n
|
|
1177
|
+
when 1 then "Futile."
|
|
1178
|
+
when 2 then "You lack the nerve when it comes to the crucial moment."
|
|
1179
|
+
end
|
|
1180
|
+
# when Tie then # see JumpOver.
|
|
1181
|
+
when :Touch then case n
|
|
1182
|
+
when 1 then "Keep your hands to yourself!"
|
|
1183
|
+
when 2 then "You feel nothing unexpected."
|
|
1184
|
+
when 3 then "If you think that'll help."
|
|
1185
|
+
when 4 then A(player) + " touches " + a(x1) + " with " + hisorher(player, 'finger') + "."
|
|
1186
|
+
end
|
|
1187
|
+
# when Turn then # see Pull.
|
|
1188
|
+
when :Unlock then case n
|
|
1189
|
+
when 1 then if x1.has?(:pluralname); print "They don't "; else; print "That doesn't "; end
|
|
1190
|
+
"seem to be something you can unlock."
|
|
1191
|
+
when 2 then println ctheyreorthats(x1) + " unlocked at the moment."
|
|
1192
|
+
when 3 then if x1.has?(:pluralname); print "Those don't "; else; print "That doesn't "; end
|
|
1193
|
+
"seem to fit the lock."
|
|
1194
|
+
when 4 then "You unlock " + the(x1) + "."
|
|
1195
|
+
when 5 then A(player) + " unlocks " + the(x1) + " with " + hisorher(player, second) + "."
|
|
1196
|
+
end
|
|
1197
|
+
when :VagueGo then "You'll have to say which compass direction to go in."
|
|
1198
|
+
when :Verify then case n
|
|
1199
|
+
when 1 then "The game file has verified as intact."
|
|
1200
|
+
when 2 then "The game file did not verify as intact, and may be corrupt."
|
|
1201
|
+
end
|
|
1202
|
+
when :Wait then case n
|
|
1203
|
+
when 1 then "Time passes."
|
|
1204
|
+
when 2 then A(player) + " seems momentarily preoccupied with anticipation."
|
|
1205
|
+
end
|
|
1206
|
+
when :Wake then "The dreadful truth is, this is not a dream."
|
|
1207
|
+
when :WakeOther then "That seems unnecessary."
|
|
1208
|
+
when :Wave then case n
|
|
1209
|
+
when 1 then "But you aren't holding " + thatorthose(x1) + "."
|
|
1210
|
+
when 2 then "You look ridiculous waving " + the(x1) + "."
|
|
1211
|
+
when 3 then A(player) + " waves " + hisorher(player, x1) + " above " + hisorher(player, 'head') + "."
|
|
1212
|
+
end
|
|
1213
|
+
when :WaveHands then case n
|
|
1214
|
+
when 1 then "You wave, feeling foolish."
|
|
1215
|
+
when 2 then A(player) + " waves."
|
|
1216
|
+
when 3 then "You wave to " + the(noun) + "."
|
|
1217
|
+
when 4 then A(player) + " waves to " + a(noun) + "."
|
|
1218
|
+
end
|
|
1219
|
+
when :Wear then case n
|
|
1220
|
+
when 1 then "You can't wear " + thatorthose(x1) + "!"
|
|
1221
|
+
when 2 then "You're not holding " + thatorthose(x1) + "!"
|
|
1222
|
+
when 3 then "You're already wearing " + thatorthose(x1) + "!"
|
|
1223
|
+
when 4 then "You put on " + the(x1) + "."
|
|
1224
|
+
when 5 then A(player) + " puts on " + a(x1) + "."
|
|
1225
|
+
end
|
|
1226
|
+
else
|
|
1227
|
+
raise MissingLanguage, sw__var
|
|
1228
|
+
end
|
|
1229
|
+
end
|
|
1230
|
+
|
|
1231
|
+
def library_messages(sw__var, n = 1, x1 = nil)
|
|
1232
|
+
# TODO: FIXME
|
|
1233
|
+
plugin_library_messages = :"#{sw__var}Messages"
|
|
1234
|
+
if self.respond_to? plugin_library_messages
|
|
1235
|
+
result = send(plugin_library_messages, n, x1)
|
|
1236
|
+
return result if result
|
|
1237
|
+
end
|
|
1238
|
+
result = language_lm(sw__var, n, x1)
|
|
1239
|
+
# TODO: FIXME
|
|
1240
|
+
# modules.each { |m| m.name == 'English' && m.provides? :language_lm }
|
|
1241
|
+
return result
|
|
1242
|
+
end
|
|
1243
|
+
|
|
1244
|
+
alias l___m library_messages
|
|
1245
|
+
alias l__m library_messages
|
|
1246
|
+
alias L__M library_messages
|
|
1247
|
+
end
|
|
1248
|
+
# module English
|
|
1249
|
+
end
|
|
1250
|
+
# module Inform
|
|
1251
|
+
|
|
1252
|
+
if defined? Inform::Parser
|
|
1253
|
+
# The Inform module
|
|
1254
|
+
module Inform
|
|
1255
|
+
# The Parser module
|
|
1256
|
+
module Parser
|
|
1257
|
+
include Inform::English
|
|
1258
|
+
end
|
|
1259
|
+
end
|
|
1260
|
+
end
|
|
1261
|
+
|
|
1262
|
+
if defined? Inform::Object
|
|
1263
|
+
# This hack makes it possible for every Inform::Object to have access to
|
|
1264
|
+
# the library of language messages available to verbs and the parser.
|
|
1265
|
+
module Inform
|
|
1266
|
+
# The Inform::Object class to include the English module
|
|
1267
|
+
class Object
|
|
1268
|
+
include Inform::English
|
|
1269
|
+
end
|
|
1270
|
+
|
|
1271
|
+
# The Inform::System module
|
|
1272
|
+
module System
|
|
1273
|
+
# The Inform::System::Object class to include the English module
|
|
1274
|
+
class Object
|
|
1275
|
+
include Inform::English
|
|
1276
|
+
end
|
|
1277
|
+
end
|
|
1278
|
+
end
|
|
1279
|
+
end
|