R3EXS 1.1.0 → 1.1.1
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 +4 -4
- data/.yardopts +2 -2
- data/CHANGELOG.md +5 -0
- data/ext/R3EXS/R3EXS.c +601 -0
- data/ext/R3EXS/extconf.rb +3 -0
- data/lib/R3EXS/RGSS3.rb +71 -49
- data/lib/R3EXS/RGSS3_R3EXS.rb +483 -267
- data/lib/R3EXS/ast.rb +33 -24
- data/lib/R3EXS/error.rb +95 -59
- data/lib/R3EXS/extract_strings.rb +0 -1
- data/lib/R3EXS/inject_strings.rb +0 -1
- data/lib/R3EXS/json_rvdata2.rb +0 -1
- data/lib/R3EXS/rvdata2_json.rb +2 -1
- data/lib/R3EXS/utils.rb +5 -2
- data/lib/R3EXS/version.rb +1 -1
- data/lib/R3EXS.rb +2 -1
- metadata +10 -11
- data/ext/rgss3a_rvdata2/extconf.rb +0 -3
- data/ext/rgss3a_rvdata2/rgss3a_rvdata2.c +0 -616
data/lib/R3EXS/RGSS3_R3EXS.rb
CHANGED
@@ -1,17 +1,36 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative 'RGSS3'
|
4
|
-
|
5
3
|
module R3EXS
|
6
4
|
|
7
5
|
# 基础物品类
|
8
6
|
class BaseItem
|
9
7
|
|
8
|
+
# 在原始数组中的索引
|
9
|
+
#
|
10
|
+
# @return [Integer]
|
11
|
+
attr_reader :index
|
12
|
+
|
13
|
+
# 物品名称
|
14
|
+
#
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# 物品描述
|
19
|
+
#
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :description
|
22
|
+
|
23
|
+
# 物品注释
|
24
|
+
#
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :note
|
27
|
+
|
10
28
|
# 用 RPG::BaseItem 初始化
|
11
29
|
#
|
12
30
|
# @param baseitem [RPG::BaseItem] 待处理的 RPG::BaseItem 对象
|
13
31
|
# @param index [Integer] 在原始数组中的索引
|
14
32
|
# @param with_note [Boolean] 是否处理 note 字段
|
33
|
+
#
|
15
34
|
# @return [R3EXS::BaseItem]
|
16
35
|
def initialize(baseitem, index, with_note)
|
17
36
|
@index = index
|
@@ -24,6 +43,7 @@ module R3EXS
|
|
24
43
|
# 注入到 RPG::BaseItem 对象
|
25
44
|
#
|
26
45
|
# @param baseitem [RPG::BaseItem] 待注入的 RPG::BaseItem 对象
|
46
|
+
#
|
27
47
|
# @return [void]
|
28
48
|
def inject_to(baseitem)
|
29
49
|
baseitem.name = @name
|
@@ -45,6 +65,7 @@ module R3EXS
|
|
45
65
|
# 将所有的字符串替换为指定的字符串
|
46
66
|
#
|
47
67
|
# @param hash [Hash<String, String>] 字符串翻译表
|
68
|
+
#
|
48
69
|
# @return [void]
|
49
70
|
def in_strings(hash)
|
50
71
|
@name = hash[@name] || @name
|
@@ -58,36 +79,22 @@ module R3EXS
|
|
58
79
|
def empty?
|
59
80
|
@name.to_s.empty? && @description.to_s.empty? && @note.to_s.empty?
|
60
81
|
end
|
61
|
-
|
62
|
-
# 在原始数组中的索引
|
63
|
-
#
|
64
|
-
# @return [Integer]
|
65
|
-
attr_reader :index
|
66
|
-
|
67
|
-
# 物品名称
|
68
|
-
#
|
69
|
-
# @return [String]
|
70
|
-
attr_accessor :name
|
71
|
-
|
72
|
-
# 物品描述
|
73
|
-
#
|
74
|
-
# @return [String]
|
75
|
-
attr_accessor :description
|
76
|
-
|
77
|
-
# 物品注释
|
78
|
-
#
|
79
|
-
# @return [String]
|
80
|
-
attr_accessor :note
|
81
82
|
end
|
82
83
|
|
83
84
|
# 角色类
|
84
85
|
class Actor < BaseItem
|
85
86
|
|
87
|
+
# 昵称
|
88
|
+
#
|
89
|
+
# @return [String]
|
90
|
+
attr_accessor :nickname
|
91
|
+
|
86
92
|
# 用 RPG::Actor 初始化
|
87
93
|
#
|
88
94
|
# @param actor [RPG::Actor] 待处理的 RPG::Actor 对象
|
89
95
|
# @param index [Integer] 在原始数组中的索引
|
90
96
|
# @param with_note [Boolean] 是否处理 note 字段
|
97
|
+
#
|
91
98
|
# @return [R3EXS::Actor]
|
92
99
|
def initialize(actor, index, with_note)
|
93
100
|
super(actor, index, with_note)
|
@@ -97,6 +104,7 @@ module R3EXS
|
|
97
104
|
# 注入到 RPG::Actor 对象
|
98
105
|
#
|
99
106
|
# @param actor [RPG::Actor] 待注入的 RPG::Actor 对象
|
107
|
+
#
|
100
108
|
# @return [void]
|
101
109
|
def inject_to(actor)
|
102
110
|
super(actor)
|
@@ -112,9 +120,20 @@ module R3EXS
|
|
112
120
|
strings
|
113
121
|
end
|
114
122
|
|
123
|
+
# 提取术语表
|
124
|
+
#
|
125
|
+
# @return [Array<GlossaryItem>]
|
126
|
+
def ex_glossary
|
127
|
+
glossary = []
|
128
|
+
glossary << GlossaryItem.new(@name, '角色名称')
|
129
|
+
glossary << GlossaryItem.new(@nickname, '角色昵称')
|
130
|
+
glossary
|
131
|
+
end
|
132
|
+
|
115
133
|
# 将所有的字符串替换为指定的字符串
|
116
134
|
#
|
117
135
|
# @param hash [Hash<String, String>] 字符串翻译表
|
136
|
+
#
|
118
137
|
# @return [void]
|
119
138
|
def in_strings(hash)
|
120
139
|
super(hash)
|
@@ -127,20 +146,26 @@ module R3EXS
|
|
127
146
|
def empty?
|
128
147
|
super && @nickname.to_s.empty?
|
129
148
|
end
|
130
|
-
|
131
|
-
# 昵称
|
132
|
-
#
|
133
|
-
# @return [String]
|
134
|
-
attr_accessor :nickname
|
135
149
|
end
|
136
150
|
|
137
151
|
# 动画类
|
138
152
|
class Animation
|
139
153
|
|
154
|
+
# 在原始数组中的索引
|
155
|
+
#
|
156
|
+
# @return [Integer]
|
157
|
+
attr_reader :index
|
158
|
+
|
159
|
+
# 动画名称
|
160
|
+
#
|
161
|
+
# @return [String]
|
162
|
+
attr_accessor :name
|
163
|
+
|
140
164
|
# 用 RPG::Animation 初始化
|
141
165
|
#
|
142
166
|
# @param animation [RPG::Animation] 待处理的 RPG::Animation 对象
|
143
167
|
# @param index [Integer] 在原始数组中的索引
|
168
|
+
#
|
144
169
|
# @return [R3EXS::Animation]
|
145
170
|
def initialize(animation, index, _unused = nil)
|
146
171
|
@index = index
|
@@ -150,6 +175,7 @@ module R3EXS
|
|
150
175
|
# 注入到 RPG::Animation 对象
|
151
176
|
#
|
152
177
|
# @param animation [RPG::Animation] 待注入的 RPG::Animation 对象
|
178
|
+
#
|
153
179
|
# @return [void]
|
154
180
|
def inject_to(animation)
|
155
181
|
animation.name = @name
|
@@ -165,6 +191,7 @@ module R3EXS
|
|
165
191
|
# 将所有的字符串替换为指定的字符串
|
166
192
|
#
|
167
193
|
# @param hash [Hash<String, String>] 字符串翻译表
|
194
|
+
#
|
168
195
|
# @return [void]
|
169
196
|
def in_strings(hash)
|
170
197
|
@name = hash[@name] || @name
|
@@ -176,16 +203,6 @@ module R3EXS
|
|
176
203
|
def empty?
|
177
204
|
@name.to_s.empty?
|
178
205
|
end
|
179
|
-
|
180
|
-
# 在原始数组中的索引
|
181
|
-
#
|
182
|
-
# @return [Integer]
|
183
|
-
attr_reader :index
|
184
|
-
|
185
|
-
# 动画名称
|
186
|
-
#
|
187
|
-
# @return [String]
|
188
|
-
attr_accessor :name
|
189
206
|
end
|
190
207
|
|
191
208
|
# 可装备物品类
|
@@ -196,6 +213,7 @@ module R3EXS
|
|
196
213
|
# @param equipitem [RPG::EquipItem] 待处理的 RPG::EquipItem 对象
|
197
214
|
# @param index [Integer] 在原始数组中的索引
|
198
215
|
# @param with_note [Boolean] 是否处理 note 字段
|
216
|
+
#
|
199
217
|
# @return [R3EXS::EquipItem]
|
200
218
|
def initialize(equipitem, index, with_note)
|
201
219
|
super(equipitem, index, with_note)
|
@@ -204,6 +222,7 @@ module R3EXS
|
|
204
222
|
# 注入到 RPG::EquipItem 对象
|
205
223
|
#
|
206
224
|
# @param equipitem [RPG::EquipItem] 待注入的 RPG::EquipItem 对象
|
225
|
+
#
|
207
226
|
# @return [void]
|
208
227
|
def inject_to(equipitem)
|
209
228
|
super
|
@@ -219,6 +238,7 @@ module R3EXS
|
|
219
238
|
# 将所有的字符串替换为指定的字符串
|
220
239
|
#
|
221
240
|
# @param hash [Hash<String, String>] 字符串翻译表
|
241
|
+
#
|
222
242
|
# @return [void]
|
223
243
|
def in_strings(hash)
|
224
244
|
super(hash)
|
@@ -230,7 +250,6 @@ module R3EXS
|
|
230
250
|
def empty?
|
231
251
|
super
|
232
252
|
end
|
233
|
-
|
234
253
|
end
|
235
254
|
|
236
255
|
# 护甲类
|
@@ -241,6 +260,7 @@ module R3EXS
|
|
241
260
|
# @param armor [RPG::Armor] 待处理的 RPG::Armor 对象
|
242
261
|
# @param index [Integer] 在原始数组中的索引
|
243
262
|
# @param with_note [Boolean] 是否处理 note 字段
|
263
|
+
#
|
244
264
|
# @return [R3EXS::Armor]
|
245
265
|
def initialize(armor, index, with_note)
|
246
266
|
super(armor, index, with_note)
|
@@ -249,6 +269,7 @@ module R3EXS
|
|
249
269
|
# 注入到 RPG::Armor 对象
|
250
270
|
#
|
251
271
|
# @param armor [RPG::Armor] 待注入的 RPG::Armor 对象
|
272
|
+
#
|
252
273
|
# @return [void]
|
253
274
|
def inject_to(armor)
|
254
275
|
super
|
@@ -261,9 +282,19 @@ module R3EXS
|
|
261
282
|
super
|
262
283
|
end
|
263
284
|
|
285
|
+
# 提取术语表
|
286
|
+
#
|
287
|
+
# @return [Array<GlossaryItem>]
|
288
|
+
def ex_glossary
|
289
|
+
glossary = []
|
290
|
+
glossary << GlossaryItem.new(@name, '护甲名称')
|
291
|
+
glossary
|
292
|
+
end
|
293
|
+
|
264
294
|
# 将所有的字符串替换为指定的字符串
|
265
295
|
#
|
266
296
|
# @param hash [Hash<String, String>] 字符串翻译表
|
297
|
+
#
|
267
298
|
# @return [void]
|
268
299
|
def in_strings(hash)
|
269
300
|
super(hash)
|
@@ -275,19 +306,34 @@ module R3EXS
|
|
275
306
|
def empty?
|
276
307
|
super
|
277
308
|
end
|
278
|
-
|
279
309
|
end
|
280
310
|
|
281
311
|
# 职业类
|
282
312
|
class Class < BaseItem
|
283
313
|
|
314
|
+
# 职业的学习技能列表
|
315
|
+
#
|
316
|
+
# @return [Array<R3EXS::Class::Learning>]
|
317
|
+
attr_accessor :learnings
|
318
|
+
|
284
319
|
# 学习技能类
|
285
320
|
class Learning
|
286
321
|
|
322
|
+
# 在原始数组中的索引
|
323
|
+
#
|
324
|
+
# @return [Integer]
|
325
|
+
attr_reader :index
|
326
|
+
|
327
|
+
# 学习技能注释
|
328
|
+
#
|
329
|
+
# @return [String]
|
330
|
+
attr_accessor :note
|
331
|
+
|
287
332
|
# 用 RPG::Class::Learning 初始化
|
288
333
|
#
|
289
334
|
# @param learning [RPG::Class::Learning] 待处理的 RPG::Class::Learning 对象
|
290
335
|
# @param index [Integer] 在原始数组中的索引
|
336
|
+
#
|
291
337
|
# @return [R3EXS::Class::Learning]
|
292
338
|
def initialize(learning, index)
|
293
339
|
@index = index
|
@@ -297,6 +343,7 @@ module R3EXS
|
|
297
343
|
# 注入到 RPG::Class::Learning 对象
|
298
344
|
#
|
299
345
|
# @param learning [RPG::Class::Learning] 待注入的 RPG::Class::Learning 对象
|
346
|
+
#
|
300
347
|
# @return [void]
|
301
348
|
def inject_to(learning)
|
302
349
|
learning.note = @note
|
@@ -312,6 +359,7 @@ module R3EXS
|
|
312
359
|
# 将所有的字符串替换为指定的字符串
|
313
360
|
#
|
314
361
|
# @param hash [Hash<String, String>] 字符串翻译表
|
362
|
+
#
|
315
363
|
# @return [void]
|
316
364
|
def in_strings(hash)
|
317
365
|
@note = hash[@note] || @note
|
@@ -323,16 +371,6 @@ module R3EXS
|
|
323
371
|
def empty?
|
324
372
|
@note.to_s.empty?
|
325
373
|
end
|
326
|
-
|
327
|
-
# 在原始数组中的索引
|
328
|
-
#
|
329
|
-
# @return [Integer]
|
330
|
-
attr_reader :index
|
331
|
-
|
332
|
-
# 学习技能注释
|
333
|
-
#
|
334
|
-
# @return [String]
|
335
|
-
attr_accessor :note
|
336
374
|
end
|
337
375
|
|
338
376
|
# 用 RPG::Class 初始化
|
@@ -340,6 +378,7 @@ module R3EXS
|
|
340
378
|
# @param klass [RPG::Class] 待处理的 RPG::Class 对象
|
341
379
|
# @param index [Integer] 在原始数组中的索引
|
342
380
|
# @param with_note [Boolean] 是否处理 note 字段
|
381
|
+
#
|
343
382
|
# @return [R3EXS::Class]
|
344
383
|
def initialize(klass, index, with_note)
|
345
384
|
super(klass, index, with_note)
|
@@ -356,6 +395,7 @@ module R3EXS
|
|
356
395
|
# 注入到 RPG::Class 对象
|
357
396
|
#
|
358
397
|
# @param klass [RPG::Class] 待注入的 RPG::Class 对象
|
398
|
+
#
|
359
399
|
# @return [void]
|
360
400
|
def inject_to(klass)
|
361
401
|
super(klass)
|
@@ -379,9 +419,19 @@ module R3EXS
|
|
379
419
|
strings
|
380
420
|
end
|
381
421
|
|
422
|
+
# 提取术语表
|
423
|
+
#
|
424
|
+
# @return [Array<GlossaryItem>]
|
425
|
+
def ex_glossary
|
426
|
+
glossary = []
|
427
|
+
glossary << GlossaryItem.new(@name, '职业名称')
|
428
|
+
glossary
|
429
|
+
end
|
430
|
+
|
382
431
|
# 将所有的字符串替换为指定的字符串
|
383
432
|
#
|
384
433
|
# @param hash [Hash<String, String>] 字符串翻译表
|
434
|
+
#
|
385
435
|
# @return [void]
|
386
436
|
def in_strings(hash)
|
387
437
|
super(hash)
|
@@ -398,17 +448,36 @@ module R3EXS
|
|
398
448
|
def empty?
|
399
449
|
super && @learnings.to_a.empty?
|
400
450
|
end
|
401
|
-
|
402
|
-
attr_accessor :learnings
|
403
451
|
end
|
404
452
|
|
405
453
|
# 移动指令类
|
406
454
|
class MoveCommand
|
407
455
|
|
456
|
+
# 在原始数组中的索引
|
457
|
+
#
|
458
|
+
# @return [Integer]
|
459
|
+
attr_accessor :index
|
460
|
+
|
461
|
+
# 移动指令代码
|
462
|
+
#
|
463
|
+
# @return [Integer]
|
464
|
+
attr_accessor :code
|
465
|
+
|
466
|
+
# 移动指令用途
|
467
|
+
#
|
468
|
+
# @return [String]
|
469
|
+
attr_accessor :usage
|
470
|
+
|
471
|
+
# 移动指令参数
|
472
|
+
#
|
473
|
+
# @return [String]
|
474
|
+
attr_accessor :parameter
|
475
|
+
|
408
476
|
# 用 RPG::MoveCommand 初始化
|
409
477
|
#
|
410
478
|
# @param movecommand [RPG::MoveCommand] 待处理的 RPG::MoveCommand 对象
|
411
479
|
# @param index [Integer] 在原始数组中的索引
|
480
|
+
#
|
412
481
|
# @return [R3EXS::MoveCommand]
|
413
482
|
def initialize(movecommand, index)
|
414
483
|
if movecommand.code == 45
|
@@ -424,6 +493,7 @@ module R3EXS
|
|
424
493
|
# 注入到 RPG::MoveCommand 对象
|
425
494
|
#
|
426
495
|
# @param movecommand [RPG::MoveCommand] 待注入的 RPG::MoveCommand 对象
|
496
|
+
#
|
427
497
|
# @return [void]
|
428
498
|
def inject_to(movecommand)
|
429
499
|
movecommand.parameters[0] = @parameter
|
@@ -439,6 +509,7 @@ module R3EXS
|
|
439
509
|
# 将所有的字符串替换为指定的字符串
|
440
510
|
#
|
441
511
|
# @param hash [Hash<String, String>] 字符串翻译表
|
512
|
+
#
|
442
513
|
# @return [void]
|
443
514
|
def in_strings(hash)
|
444
515
|
@parameter = hash[@parameter] || @parameter
|
@@ -450,34 +521,20 @@ module R3EXS
|
|
450
521
|
def empty?
|
451
522
|
@index == -1
|
452
523
|
end
|
453
|
-
|
454
|
-
# 在原始数组中的索引
|
455
|
-
#
|
456
|
-
# @return [Integer]
|
457
|
-
attr_accessor :index
|
458
|
-
|
459
|
-
# 移动指令代码
|
460
|
-
#
|
461
|
-
# @return [Integer]
|
462
|
-
attr_accessor :code
|
463
|
-
|
464
|
-
# 移动指令用途
|
465
|
-
#
|
466
|
-
# @return [String]
|
467
|
-
attr_accessor :usage
|
468
|
-
|
469
|
-
# 移动指令参数
|
470
|
-
#
|
471
|
-
# @return [String]
|
472
|
-
attr_accessor :parameter
|
473
524
|
end
|
474
525
|
|
475
526
|
# 移动路线类
|
476
527
|
class MoveRoute
|
477
528
|
|
529
|
+
# 移动指令列表
|
530
|
+
#
|
531
|
+
# @return [Array<R3EXS::MoveCommand>]
|
532
|
+
attr_accessor :list
|
533
|
+
|
478
534
|
# 用 RPG::MoveRoute 初始化
|
479
535
|
#
|
480
536
|
# @param moveroute [RPG::MoveRoute] 待处理的 RPG::MoveRoute 对象
|
537
|
+
#
|
481
538
|
# @return [R3EXS::MoveRoute]
|
482
539
|
def initialize(moveroute)
|
483
540
|
@list = []
|
@@ -491,6 +548,7 @@ module R3EXS
|
|
491
548
|
# 注入到 RPG::MoveRoute 对象
|
492
549
|
#
|
493
550
|
# @param moveroute [RPG::MoveRoute] 待注入的 RPG::MoveRoute 对象
|
551
|
+
#
|
494
552
|
# @return [void]
|
495
553
|
def inject_to(moveroute)
|
496
554
|
@list.each do |movecommand|
|
@@ -512,6 +570,7 @@ module R3EXS
|
|
512
570
|
# 将所有的字符串替换为指定的字符串
|
513
571
|
#
|
514
572
|
# @param hash [Hash<String, String>] 字符串翻译表
|
573
|
+
#
|
515
574
|
# @return [void]
|
516
575
|
def in_strings(hash)
|
517
576
|
@list.each do |movecommand|
|
@@ -525,20 +584,39 @@ module R3EXS
|
|
525
584
|
def empty?
|
526
585
|
@list.empty?
|
527
586
|
end
|
528
|
-
|
529
|
-
# 移动指令列表
|
530
|
-
#
|
531
|
-
# @return [Array<R3EXS::MoveCommand>]
|
532
|
-
attr_accessor :list
|
533
587
|
end
|
534
588
|
|
535
589
|
# 事件指令类
|
536
590
|
class EventCommand
|
537
591
|
|
592
|
+
# 在原始数组中的索引
|
593
|
+
#
|
594
|
+
# @return [Integer]
|
595
|
+
attr_accessor :index
|
596
|
+
|
597
|
+
# 事件指令代码
|
598
|
+
#
|
599
|
+
# @return [Integer]
|
600
|
+
attr_accessor :code
|
601
|
+
|
602
|
+
# 事件指令用途
|
603
|
+
#
|
604
|
+
# @return [String]
|
605
|
+
attr_accessor :usage
|
606
|
+
|
607
|
+
# 事件指令参数
|
608
|
+
#
|
609
|
+
# @note 当 '@code' 为 102 时, parameter 是一个字符串数组
|
610
|
+
#
|
611
|
+
# @return [String] if @code != 102
|
612
|
+
# @return [Array<String>] if @code == 102
|
613
|
+
attr_accessor :parameter
|
614
|
+
|
538
615
|
# 用 RPG::EventCommand 初始化
|
539
616
|
#
|
540
617
|
# @param eventcommand [RPG::EventCommand] 待处理的 RPG::EventCommand 对象
|
541
618
|
# @param index [Integer] 在原始数组中的索引
|
619
|
+
#
|
542
620
|
# @return [R3EXS::EventCommand]
|
543
621
|
def initialize(eventcommand, index)
|
544
622
|
case eventcommand.code
|
@@ -650,6 +728,7 @@ module R3EXS
|
|
650
728
|
# 注入到 RPG::EventCommand 对象
|
651
729
|
#
|
652
730
|
# @param eventcommand [RPG::EventCommand] 待注入的 RPG::EventCommand 对象
|
731
|
+
#
|
653
732
|
# @return [void]
|
654
733
|
def inject_to(eventcommand)
|
655
734
|
case eventcommand.code
|
@@ -716,6 +795,7 @@ module R3EXS
|
|
716
795
|
# 将所有的字符串替换为指定的字符串
|
717
796
|
#
|
718
797
|
# @param hash [Hash<String, String>] 字符串翻译表
|
798
|
+
#
|
719
799
|
# @return [void]
|
720
800
|
def in_strings(hash)
|
721
801
|
case @code
|
@@ -738,38 +818,31 @@ module R3EXS
|
|
738
818
|
def empty?
|
739
819
|
@index == -1
|
740
820
|
end
|
821
|
+
end
|
822
|
+
|
823
|
+
# 公共事件类
|
824
|
+
class CommonEvent
|
741
825
|
|
742
826
|
# 在原始数组中的索引
|
743
827
|
#
|
744
828
|
# @return [Integer]
|
745
829
|
attr_accessor :index
|
746
830
|
|
747
|
-
#
|
748
|
-
#
|
749
|
-
# @return [Integer]
|
750
|
-
attr_accessor :code
|
751
|
-
|
752
|
-
# 事件指令用途
|
831
|
+
# 公共事件名称
|
753
832
|
#
|
754
833
|
# @return [String]
|
755
|
-
attr_accessor :
|
834
|
+
attr_accessor :name
|
756
835
|
|
757
|
-
#
|
758
|
-
#
|
759
|
-
# @note 当 '@code' 为 102 时, parameter 是一个字符串数组
|
836
|
+
# 事件指令列表
|
760
837
|
#
|
761
|
-
# @return [
|
762
|
-
|
763
|
-
attr_accessor :parameter
|
764
|
-
end
|
765
|
-
|
766
|
-
# 公共事件类
|
767
|
-
class CommonEvent
|
838
|
+
# @return [Array<R3EXS::EventCommand>]
|
839
|
+
attr_accessor :list
|
768
840
|
|
769
841
|
# 用 RPG::CommonEvent 初始化
|
770
842
|
#
|
771
843
|
# @param commonevent [RPG::CommonEvent] 待处理的 RPG::CommonEvent 对象
|
772
844
|
# @param index [Integer] 在原始数组中的索引
|
845
|
+
#
|
773
846
|
# @return [R3EXS::CommonEvent]
|
774
847
|
def initialize(commonevent, index, _unused = nil)
|
775
848
|
@index = index
|
@@ -783,7 +856,9 @@ module R3EXS
|
|
783
856
|
end
|
784
857
|
|
785
858
|
# 注入到 RPG::CommonEvent 对象
|
859
|
+
#
|
786
860
|
# @param commonevent [RPG::CommonEvent] 待注入的 RPG::CommonEvent 对象
|
861
|
+
#
|
787
862
|
# @return [void]
|
788
863
|
def inject_to(commonevent)
|
789
864
|
commonevent.name = @name
|
@@ -806,6 +881,7 @@ module R3EXS
|
|
806
881
|
# 将所有的字符串替换为指定的字符串
|
807
882
|
#
|
808
883
|
# @param hash [Hash<String, String>] 字符串翻译表
|
884
|
+
#
|
809
885
|
# @return [void]
|
810
886
|
def in_strings(hash)
|
811
887
|
@name = hash[@name] || @name
|
@@ -820,21 +896,6 @@ module R3EXS
|
|
820
896
|
def empty?
|
821
897
|
@name.to_s.empty? && @list.empty?
|
822
898
|
end
|
823
|
-
|
824
|
-
# 在原始数组中的索引
|
825
|
-
#
|
826
|
-
# @return [Integer]
|
827
|
-
attr_accessor :index
|
828
|
-
|
829
|
-
# 公共事件名称
|
830
|
-
#
|
831
|
-
# @return [String]
|
832
|
-
attr_accessor :name
|
833
|
-
|
834
|
-
# 事件指令列表
|
835
|
-
#
|
836
|
-
# @return [Array<R3EXS::EventCommand>]
|
837
|
-
attr_accessor :list
|
838
899
|
end
|
839
900
|
|
840
901
|
# 敌人类
|
@@ -845,6 +906,7 @@ module R3EXS
|
|
845
906
|
# @param enemy [RPG::Enemy] 待处理的 RPG::Enemy 对象
|
846
907
|
# @param index [Integer] 在原始数组中的索引
|
847
908
|
# @param with_note [Boolean] 是否处理 note 字段
|
909
|
+
#
|
848
910
|
# @return [R3EXS::Enemy]
|
849
911
|
def initialize(enemy, index, with_note)
|
850
912
|
super(enemy, index, with_note)
|
@@ -854,6 +916,7 @@ module R3EXS
|
|
854
916
|
# 注入到 RPG::Enemy 对象
|
855
917
|
#
|
856
918
|
# @param enemy [RPG::Enemy] 待注入的 RPG::Enemy 对象
|
919
|
+
#
|
857
920
|
# @return [void]
|
858
921
|
def inject_to(enemy)
|
859
922
|
super
|
@@ -866,9 +929,19 @@ module R3EXS
|
|
866
929
|
super
|
867
930
|
end
|
868
931
|
|
932
|
+
# 提取术语表
|
933
|
+
#
|
934
|
+
# @return [Array<GlossaryItem>]
|
935
|
+
def ex_glossary
|
936
|
+
glossary = []
|
937
|
+
glossary << GlossaryItem.new(@name, '敌人名称')
|
938
|
+
glossary
|
939
|
+
end
|
940
|
+
|
869
941
|
# 将所有的字符串替换为指定的字符串
|
870
942
|
#
|
871
943
|
# @param hash [Hash<String, String>] 字符串翻译表
|
944
|
+
#
|
872
945
|
# @return [void]
|
873
946
|
def in_strings(hash)
|
874
947
|
super(hash)
|
@@ -880,7 +953,6 @@ module R3EXS
|
|
880
953
|
def empty?
|
881
954
|
super
|
882
955
|
end
|
883
|
-
|
884
956
|
end
|
885
957
|
|
886
958
|
# 可使用物品类
|
@@ -891,6 +963,7 @@ module R3EXS
|
|
891
963
|
# @param usableitem [RPG::UsableItem] 待处理的 RPG::UsableItem 对象
|
892
964
|
# @param index [Integer] 在原始数组中的索引
|
893
965
|
# @param with_note [Boolean] 是否处理 note 字段
|
966
|
+
#
|
894
967
|
# @return [R3EXS::UsableItem]
|
895
968
|
def initialize(usableitem, index, with_note)
|
896
969
|
super(usableitem, index, with_note)
|
@@ -899,6 +972,7 @@ module R3EXS
|
|
899
972
|
# 注入到 RPG::UsableItem 对象
|
900
973
|
#
|
901
974
|
# @param usableitem [RPG::UsableItem] 待注入的 RPG::UsableItem 对象
|
975
|
+
#
|
902
976
|
# @return [void]
|
903
977
|
def inject_to(usableitem)
|
904
978
|
super
|
@@ -914,6 +988,7 @@ module R3EXS
|
|
914
988
|
# 将所有的字符串替换为指定的字符串
|
915
989
|
#
|
916
990
|
# @param hash [Hash<String, String>] 字符串翻译表
|
991
|
+
#
|
917
992
|
# @return [void]
|
918
993
|
def in_strings(hash)
|
919
994
|
super(hash)
|
@@ -935,13 +1010,16 @@ module R3EXS
|
|
935
1010
|
# @param item [RPG::Item] 待处理的 RPG::Item 对象
|
936
1011
|
# @param index [Integer] 在原始数组中的索引
|
937
1012
|
# @param with_note [Boolean] 是否处理 note 字段
|
1013
|
+
#
|
938
1014
|
# @return [R3EXS::Item]
|
939
1015
|
def initialize(item, index, with_note)
|
940
1016
|
super(item, index, with_note)
|
941
1017
|
end
|
942
1018
|
|
943
1019
|
# 注入到 RPG::Item 对象
|
1020
|
+
#
|
944
1021
|
# @param item [RPG::Item] 待注入的 RPG::Item 对象
|
1022
|
+
#
|
945
1023
|
# @return [void]
|
946
1024
|
def inject_to(item)
|
947
1025
|
super
|
@@ -954,9 +1032,19 @@ module R3EXS
|
|
954
1032
|
super
|
955
1033
|
end
|
956
1034
|
|
1035
|
+
# 提取术语表
|
1036
|
+
#
|
1037
|
+
# @return [Array<GlossaryItem>]
|
1038
|
+
def ex_glossary
|
1039
|
+
glossary = []
|
1040
|
+
glossary << GlossaryItem.new(@name, '物品名称')
|
1041
|
+
glossary
|
1042
|
+
end
|
1043
|
+
|
957
1044
|
# 将所有的字符串替换为指定的字符串
|
958
1045
|
#
|
959
1046
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1047
|
+
#
|
960
1048
|
# @return [void]
|
961
1049
|
def in_strings(hash)
|
962
1050
|
super(hash)
|
@@ -973,13 +1061,39 @@ module R3EXS
|
|
973
1061
|
# 事件类
|
974
1062
|
class Event
|
975
1063
|
|
1064
|
+
# 在原始哈希表中的键
|
1065
|
+
#
|
1066
|
+
# @return [Integer]
|
1067
|
+
attr_accessor :index
|
1068
|
+
|
1069
|
+
# 事件名称
|
1070
|
+
#
|
1071
|
+
# @return [String]
|
1072
|
+
attr_accessor :name
|
1073
|
+
|
1074
|
+
# 事件页列表
|
1075
|
+
#
|
1076
|
+
# @return [Array<R3EXS::Event::Page>]
|
1077
|
+
attr_accessor :pages
|
1078
|
+
|
976
1079
|
# 事件页类
|
977
1080
|
class Page
|
978
1081
|
|
1082
|
+
# 在原始数组中的索引
|
1083
|
+
#
|
1084
|
+
# @return [Integer]
|
1085
|
+
attr_accessor :index
|
1086
|
+
|
1087
|
+
# 事件指令列表
|
1088
|
+
#
|
1089
|
+
# @return [Array<R3EXS::EventCommand>]
|
1090
|
+
attr_accessor :list
|
1091
|
+
|
979
1092
|
# 用 RPG::Event::Page 初始化
|
980
1093
|
#
|
981
1094
|
# @param page [RPG::Event::Page] 待处理的 RPG::Event::Page 对象
|
982
1095
|
# @param index [Integer] 在原始数组中的索引
|
1096
|
+
#
|
983
1097
|
# @return [R3EXS::Event::Page]
|
984
1098
|
def initialize(page, index)
|
985
1099
|
@index = index
|
@@ -994,6 +1108,7 @@ module R3EXS
|
|
994
1108
|
# 注入到 RPG::Event::Page 对象
|
995
1109
|
#
|
996
1110
|
# @param page [RPG::Event::Page] 待注入的 RPG::Event::Page 对象
|
1111
|
+
#
|
997
1112
|
# @return [void]
|
998
1113
|
def inject_to(page)
|
999
1114
|
@list.each do |eventcommand|
|
@@ -1015,6 +1130,7 @@ module R3EXS
|
|
1015
1130
|
# 将所有的字符串替换为指定的字符串
|
1016
1131
|
#
|
1017
1132
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1133
|
+
#
|
1018
1134
|
# @return [void]
|
1019
1135
|
def in_strings(hash)
|
1020
1136
|
@list.each do |eventcommand|
|
@@ -1028,22 +1144,13 @@ module R3EXS
|
|
1028
1144
|
def empty?
|
1029
1145
|
@list.empty?
|
1030
1146
|
end
|
1031
|
-
|
1032
|
-
# 在原始数组中的索引
|
1033
|
-
#
|
1034
|
-
# @return [Integer]
|
1035
|
-
attr_accessor :index
|
1036
|
-
|
1037
|
-
# 事件指令列表
|
1038
|
-
#
|
1039
|
-
# @return [Array<R3EXS::EventCommand>]
|
1040
|
-
attr_accessor :list
|
1041
1147
|
end
|
1042
1148
|
|
1043
1149
|
# 用 RPG::Event 初始化
|
1044
1150
|
#
|
1045
1151
|
# @param event [RPG::Event] 待处理的 RPG::Event 对象
|
1046
1152
|
# @param index [Integer] 在原始哈希表中的键
|
1153
|
+
#
|
1047
1154
|
# @return [R3EXS::Event]
|
1048
1155
|
def initialize(event, index)
|
1049
1156
|
@index = index
|
@@ -1059,6 +1166,7 @@ module R3EXS
|
|
1059
1166
|
# 注入到 RPG::Event 对象
|
1060
1167
|
#
|
1061
1168
|
# @param event [RPG::Event] 待注入的 RPG::Event 对象
|
1169
|
+
#
|
1062
1170
|
# @return [void]
|
1063
1171
|
def inject_to(event)
|
1064
1172
|
event.name = @name
|
@@ -1081,6 +1189,7 @@ module R3EXS
|
|
1081
1189
|
# 将所有的字符串替换为指定的字符串
|
1082
1190
|
#
|
1083
1191
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1192
|
+
#
|
1084
1193
|
# @return [void]
|
1085
1194
|
def in_strings(hash)
|
1086
1195
|
@name = hash[@name] || @name
|
@@ -1095,29 +1204,31 @@ module R3EXS
|
|
1095
1204
|
def empty?
|
1096
1205
|
@name.to_s.empty? && @pages.empty?
|
1097
1206
|
end
|
1207
|
+
end
|
1098
1208
|
|
1099
|
-
|
1100
|
-
|
1101
|
-
# @return [Integer]
|
1102
|
-
attr_accessor :index
|
1209
|
+
# 地图类
|
1210
|
+
class Map
|
1103
1211
|
|
1104
|
-
#
|
1212
|
+
# 地图显示名称
|
1105
1213
|
#
|
1106
1214
|
# @return [String]
|
1107
|
-
attr_accessor :
|
1215
|
+
attr_accessor :display_name
|
1108
1216
|
|
1109
|
-
#
|
1217
|
+
# 地图注释
|
1110
1218
|
#
|
1111
|
-
# @return [
|
1112
|
-
attr_accessor :
|
1113
|
-
end
|
1219
|
+
# @return [String]
|
1220
|
+
attr_accessor :note
|
1114
1221
|
|
1115
|
-
|
1116
|
-
|
1222
|
+
# 事件列表
|
1223
|
+
#
|
1224
|
+
# @return [Array<R3EXS::Event>]
|
1225
|
+
attr_accessor :events
|
1117
1226
|
|
1118
1227
|
# 用 RPG::Map 初始化
|
1228
|
+
#
|
1119
1229
|
# @param map [RPG::Map] 待处理的 RPG::Map 对象
|
1120
1230
|
# @param with_note [Boolean] 是否处理 note 字段
|
1231
|
+
#
|
1121
1232
|
# @return [R3EXS::Map]
|
1122
1233
|
def initialize(map, with_note)
|
1123
1234
|
@display_name = map.display_name
|
@@ -1134,6 +1245,7 @@ module R3EXS
|
|
1134
1245
|
# 注入到 RPG::Map 对象
|
1135
1246
|
#
|
1136
1247
|
# @param map [RPG::Map] 待注入的 RPG::Map 对象
|
1248
|
+
#
|
1137
1249
|
# @return [void]
|
1138
1250
|
def inject_to(map)
|
1139
1251
|
map.display_name = @display_name
|
@@ -1156,9 +1268,19 @@ module R3EXS
|
|
1156
1268
|
strings
|
1157
1269
|
end
|
1158
1270
|
|
1271
|
+
# 提取术语表
|
1272
|
+
#
|
1273
|
+
# @return [Array<GlossaryItem>]
|
1274
|
+
def ex_glossary
|
1275
|
+
glossary = []
|
1276
|
+
glossary << GlossaryItem.new(@display_name, '地图名称')
|
1277
|
+
glossary
|
1278
|
+
end
|
1279
|
+
|
1159
1280
|
# 将所有的字符串替换为指定的字符串
|
1160
1281
|
#
|
1161
1282
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1283
|
+
#
|
1162
1284
|
# @return [void]
|
1163
1285
|
def in_strings(hash)
|
1164
1286
|
@display_name = hash[@display_name] || @display_name
|
@@ -1167,29 +1289,26 @@ module R3EXS
|
|
1167
1289
|
event.in_strings(hash)
|
1168
1290
|
end
|
1169
1291
|
end
|
1292
|
+
end
|
1170
1293
|
|
1171
|
-
|
1172
|
-
|
1173
|
-
# @return [String]
|
1174
|
-
attr_accessor :display_name
|
1294
|
+
# 地图信息类
|
1295
|
+
class MapInfo
|
1175
1296
|
|
1176
|
-
#
|
1297
|
+
# 在原始哈希表中的键
|
1177
1298
|
#
|
1178
|
-
# @return [
|
1179
|
-
attr_accessor :
|
1299
|
+
# @return [Integer]
|
1300
|
+
attr_accessor :index
|
1180
1301
|
|
1181
|
-
#
|
1302
|
+
# 地图内部名称
|
1182
1303
|
#
|
1183
|
-
# @return [
|
1184
|
-
attr_accessor :
|
1185
|
-
end
|
1186
|
-
|
1187
|
-
# 地图信息类
|
1188
|
-
class MapInfo
|
1304
|
+
# @return [String]
|
1305
|
+
attr_accessor :name
|
1189
1306
|
|
1190
1307
|
# 用 RPG::MapInfo 初始化
|
1308
|
+
#
|
1191
1309
|
# @param mapinfo [RPG::MapInfo] 待处理的 RPG::MapInfo 对象
|
1192
1310
|
# @param index [Integer] 在原始哈希表中的键
|
1311
|
+
#
|
1193
1312
|
# @return [R3EXS::MapInfo]
|
1194
1313
|
def initialize(mapinfo, index, _unused = nil)
|
1195
1314
|
@index = index
|
@@ -1199,6 +1318,7 @@ module R3EXS
|
|
1199
1318
|
# 注入到 RPG::MapInfo 对象
|
1200
1319
|
#
|
1201
1320
|
# @param mapinfo [RPG::MapInfo] 待注入的 RPG::MapInfo 对象
|
1321
|
+
#
|
1202
1322
|
# @return [void]
|
1203
1323
|
def inject_to(mapinfo)
|
1204
1324
|
mapinfo.name = @name
|
@@ -1211,32 +1331,44 @@ module R3EXS
|
|
1211
1331
|
[@name]
|
1212
1332
|
end
|
1213
1333
|
|
1334
|
+
# 提取术语表
|
1335
|
+
#
|
1336
|
+
# @return [Array<GlossaryItem>]
|
1337
|
+
def ex_glossary
|
1338
|
+
glossary = []
|
1339
|
+
glossary << GlossaryItem.new(@name, '地图名称')
|
1340
|
+
glossary
|
1341
|
+
end
|
1342
|
+
|
1214
1343
|
# 将所有的字符串替换为指定的字符串
|
1215
1344
|
#
|
1216
1345
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1346
|
+
#
|
1217
1347
|
# @return [void]
|
1218
1348
|
def in_strings(hash)
|
1219
1349
|
@name = hash[@name] || @name
|
1220
1350
|
end
|
1351
|
+
end
|
1221
1352
|
|
1222
|
-
|
1223
|
-
|
1224
|
-
# @return [Integer]
|
1225
|
-
attr_accessor :index
|
1353
|
+
# 技能类
|
1354
|
+
class Skill < UsableItem
|
1226
1355
|
|
1227
|
-
#
|
1356
|
+
# 技能使用时的消息
|
1228
1357
|
#
|
1229
1358
|
# @return [String]
|
1230
|
-
attr_accessor :
|
1231
|
-
end
|
1359
|
+
attr_accessor :message1
|
1232
1360
|
|
1233
|
-
|
1234
|
-
|
1361
|
+
# 技能使用时的消息
|
1362
|
+
#
|
1363
|
+
# @return [String]
|
1364
|
+
attr_accessor :message2
|
1235
1365
|
|
1236
1366
|
# 用 RPG::Skill 初始化
|
1367
|
+
#
|
1237
1368
|
# @param skill [RPG::Skill] 待处理的 RPG::Skill 对象
|
1238
1369
|
# @param index [Integer] 在原始数组中的索引
|
1239
1370
|
# @param with_note [Boolean] 是否处理 note 字段
|
1371
|
+
#
|
1240
1372
|
# @return [R3EXS::Skill]
|
1241
1373
|
def initialize(skill, index, with_note)
|
1242
1374
|
super(skill, index, with_note)
|
@@ -1247,6 +1379,7 @@ module R3EXS
|
|
1247
1379
|
# 注入到 RPG::Skill 对象
|
1248
1380
|
#
|
1249
1381
|
# @param skill [RPG::Skill] 待注入的 RPG::Skill 对象
|
1382
|
+
#
|
1250
1383
|
# @return [void]
|
1251
1384
|
def inject_to(skill)
|
1252
1385
|
super
|
@@ -1264,9 +1397,19 @@ module R3EXS
|
|
1264
1397
|
strings
|
1265
1398
|
end
|
1266
1399
|
|
1400
|
+
# 提取术语表
|
1401
|
+
#
|
1402
|
+
# @return [Array<GlossaryItem>]
|
1403
|
+
def ex_glossary
|
1404
|
+
glossary = []
|
1405
|
+
glossary << GlossaryItem.new(@name, '技能名称')
|
1406
|
+
glossary
|
1407
|
+
end
|
1408
|
+
|
1267
1409
|
# 将所有的字符串替换为指定的字符串
|
1268
1410
|
#
|
1269
1411
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1412
|
+
#
|
1270
1413
|
# @return [void]
|
1271
1414
|
def in_strings(hash)
|
1272
1415
|
super(hash)
|
@@ -1280,26 +1423,37 @@ module R3EXS
|
|
1280
1423
|
def empty?
|
1281
1424
|
super && @message1.to_s.empty? && @message2.to_s.empty?
|
1282
1425
|
end
|
1426
|
+
end
|
1283
1427
|
|
1284
|
-
|
1428
|
+
# 状态类
|
1429
|
+
class State < BaseItem
|
1430
|
+
|
1431
|
+
# 状态应用队员时的消息
|
1285
1432
|
#
|
1286
1433
|
# @return [String]
|
1287
1434
|
attr_accessor :message1
|
1288
1435
|
|
1289
|
-
#
|
1436
|
+
# 状态应用敌人时的消息
|
1290
1437
|
#
|
1291
1438
|
# @return [String]
|
1292
1439
|
attr_accessor :message2
|
1293
|
-
end
|
1294
1440
|
|
1295
|
-
|
1296
|
-
|
1441
|
+
# 状态保持时的消息
|
1442
|
+
#
|
1443
|
+
# @return [String]
|
1444
|
+
attr_accessor :message3
|
1445
|
+
|
1446
|
+
# 状态解除时的消息
|
1447
|
+
#
|
1448
|
+
# @return [String]
|
1449
|
+
attr_accessor :message4
|
1297
1450
|
|
1298
1451
|
# 用 RPG::State 初始化
|
1299
1452
|
#
|
1300
1453
|
# @param state [RPG::State] 待处理的 RPG::State 对象
|
1301
1454
|
# @param index [Integer] 在原始数组中的索引
|
1302
1455
|
# @param with_note [Boolean] 是否处理 note 字段
|
1456
|
+
#
|
1303
1457
|
# @return [R3EXS::State]
|
1304
1458
|
def initialize(state, index, with_note)
|
1305
1459
|
super(state, index, with_note)
|
@@ -1313,6 +1467,7 @@ module R3EXS
|
|
1313
1467
|
# 注入到 RPG::State 对象
|
1314
1468
|
#
|
1315
1469
|
# @param state [RPG::State] 待注入的 RPG::State 对象
|
1470
|
+
#
|
1316
1471
|
# @return [void]
|
1317
1472
|
def inject_to(state)
|
1318
1473
|
super
|
@@ -1334,9 +1489,19 @@ module R3EXS
|
|
1334
1489
|
strings
|
1335
1490
|
end
|
1336
1491
|
|
1492
|
+
# 提取术语表
|
1493
|
+
#
|
1494
|
+
# @return [Array<GlossaryItem>]
|
1495
|
+
def ex_glossary
|
1496
|
+
glossary = []
|
1497
|
+
glossary << GlossaryItem.new(@name, '状态名称')
|
1498
|
+
glossary
|
1499
|
+
end
|
1500
|
+
|
1337
1501
|
# 将所有的字符串替换为指定的字符串
|
1338
1502
|
#
|
1339
1503
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1504
|
+
#
|
1340
1505
|
# @return [void]
|
1341
1506
|
def in_strings(hash)
|
1342
1507
|
super(hash)
|
@@ -1352,37 +1517,83 @@ module R3EXS
|
|
1352
1517
|
def empty?
|
1353
1518
|
super && @message1.to_s.empty? && @message2.to_s.empty? && @message3.to_s.empty? && @message4.to_s.empty?
|
1354
1519
|
end
|
1520
|
+
end
|
1355
1521
|
|
1356
|
-
|
1522
|
+
# 系统类
|
1523
|
+
class System
|
1524
|
+
|
1525
|
+
# 游戏标题
|
1357
1526
|
#
|
1358
1527
|
# @return [String]
|
1359
|
-
attr_accessor :
|
1528
|
+
attr_accessor :game_title
|
1360
1529
|
|
1361
|
-
#
|
1530
|
+
# 货币单位
|
1362
1531
|
#
|
1363
1532
|
# @return [String]
|
1364
|
-
attr_accessor :
|
1533
|
+
attr_accessor :currency_unit
|
1365
1534
|
|
1366
|
-
#
|
1535
|
+
# 属性名称
|
1367
1536
|
#
|
1368
|
-
# @return [String]
|
1369
|
-
attr_accessor :
|
1537
|
+
# @return [Array<String>]
|
1538
|
+
attr_accessor :elements
|
1370
1539
|
|
1371
|
-
#
|
1540
|
+
# 技能类型名称
|
1372
1541
|
#
|
1373
|
-
# @return [String]
|
1374
|
-
attr_accessor :
|
1375
|
-
end
|
1542
|
+
# @return [Array<String>]
|
1543
|
+
attr_accessor :skill_types
|
1376
1544
|
|
1377
|
-
|
1378
|
-
|
1545
|
+
# 武器类型名称
|
1546
|
+
#
|
1547
|
+
# @return [Array<String>]
|
1548
|
+
attr_accessor :weapon_types
|
1549
|
+
|
1550
|
+
# 防具类型名称
|
1551
|
+
#
|
1552
|
+
# @return [Array<String>]
|
1553
|
+
attr_accessor :armor_types
|
1554
|
+
|
1555
|
+
# 开关名称
|
1556
|
+
#
|
1557
|
+
# @return [Array<String>]
|
1558
|
+
attr_accessor :switches
|
1559
|
+
|
1560
|
+
# 变量名称
|
1561
|
+
#
|
1562
|
+
# @return [Array<String>]
|
1563
|
+
attr_accessor :variables
|
1564
|
+
|
1565
|
+
# 系统术语
|
1566
|
+
#
|
1567
|
+
# @return [R3EXS::System::Terms]
|
1568
|
+
attr_accessor :terms
|
1379
1569
|
|
1380
1570
|
# 术语类
|
1381
1571
|
class Terms
|
1382
1572
|
|
1573
|
+
# 基本术语
|
1574
|
+
#
|
1575
|
+
# @return [Array<String>]
|
1576
|
+
attr_accessor :basic
|
1577
|
+
|
1578
|
+
# 属性名称
|
1579
|
+
#
|
1580
|
+
# @return [Array<String>]
|
1581
|
+
attr_accessor :params
|
1582
|
+
|
1583
|
+
# 装备类型名称
|
1584
|
+
#
|
1585
|
+
# @return [Array<String>]
|
1586
|
+
attr_accessor :etypes
|
1587
|
+
|
1588
|
+
# 命令名称
|
1589
|
+
#
|
1590
|
+
# @return [Array<String>]
|
1591
|
+
attr_accessor :commands
|
1592
|
+
|
1383
1593
|
# 用 RPG::System::Terms 初始化
|
1384
1594
|
#
|
1385
1595
|
# @param terms [RPG::System::Terms] 待处理的 RPG::System::Terms 对象
|
1596
|
+
#
|
1386
1597
|
# @return [R3EXS::System::Terms]
|
1387
1598
|
def initialize(terms)
|
1388
1599
|
@basic = terms.basic
|
@@ -1394,6 +1605,7 @@ module R3EXS
|
|
1394
1605
|
# 注入到 RPG::System::Terms 对象
|
1395
1606
|
#
|
1396
1607
|
# @param terms [RPG::System::Terms] 待注入的 RPG::System::Terms 对象
|
1608
|
+
#
|
1397
1609
|
# @return [void]
|
1398
1610
|
def inject_to(terms)
|
1399
1611
|
terms.basic = @basic
|
@@ -1414,9 +1626,30 @@ module R3EXS
|
|
1414
1626
|
strings
|
1415
1627
|
end
|
1416
1628
|
|
1629
|
+
# 提取术语表
|
1630
|
+
#
|
1631
|
+
# @return [Array<GlossaryItem>]
|
1632
|
+
def ex_glossary
|
1633
|
+
glossary = []
|
1634
|
+
@basic.each do |string|
|
1635
|
+
glossary << GlossaryItem.new(string, '基本术语')
|
1636
|
+
end
|
1637
|
+
@params.each do |string|
|
1638
|
+
glossary << GlossaryItem.new(string, '计量单位名称')
|
1639
|
+
end
|
1640
|
+
@etypes.each do |string|
|
1641
|
+
glossary << GlossaryItem.new(string, '装备类型名称')
|
1642
|
+
end
|
1643
|
+
@commands.each do |string|
|
1644
|
+
glossary << GlossaryItem.new(string, '指令名称')
|
1645
|
+
end
|
1646
|
+
glossary
|
1647
|
+
end
|
1648
|
+
|
1417
1649
|
# 将所有的字符串替换为指定的字符串
|
1418
1650
|
#
|
1419
1651
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1652
|
+
#
|
1420
1653
|
# @return [void]
|
1421
1654
|
def in_strings(hash)
|
1422
1655
|
@basic.map! { |string| hash[string] || string }
|
@@ -1424,31 +1657,12 @@ module R3EXS
|
|
1424
1657
|
@etypes.map! { |string| hash[string] || string }
|
1425
1658
|
@commands.map! { |string| hash[string] || string }
|
1426
1659
|
end
|
1427
|
-
|
1428
|
-
# 基本术语
|
1429
|
-
#
|
1430
|
-
# @return [Array<String>]
|
1431
|
-
attr_accessor :basic
|
1432
|
-
|
1433
|
-
# 属性名称
|
1434
|
-
#
|
1435
|
-
# @return [Array<String>]
|
1436
|
-
attr_accessor :params
|
1437
|
-
|
1438
|
-
# 装备类型名称
|
1439
|
-
#
|
1440
|
-
# @return [Array<String>]
|
1441
|
-
attr_accessor :etypes
|
1442
|
-
|
1443
|
-
# 命令名称
|
1444
|
-
#
|
1445
|
-
# @return [Array<String>]
|
1446
|
-
attr_accessor :commands
|
1447
1660
|
end
|
1448
1661
|
|
1449
1662
|
# 用 RPG::System 初始化
|
1450
1663
|
#
|
1451
1664
|
# @param system [RPG::System] 待处理的 RPG::System 对象
|
1665
|
+
#
|
1452
1666
|
# @return [R3EXS::System]
|
1453
1667
|
def initialize(system, _unused = nil)
|
1454
1668
|
@game_title = system.game_title
|
@@ -1465,6 +1679,7 @@ module R3EXS
|
|
1465
1679
|
# 注入到 RPG::System 对象
|
1466
1680
|
#
|
1467
1681
|
# @param system [RPG::System] 待注入的 RPG::System 对象
|
1682
|
+
#
|
1468
1683
|
# @return [void]
|
1469
1684
|
def inject_to(system)
|
1470
1685
|
system.game_title = @game_title
|
@@ -1495,9 +1710,32 @@ module R3EXS
|
|
1495
1710
|
strings
|
1496
1711
|
end
|
1497
1712
|
|
1713
|
+
# 提取术语表
|
1714
|
+
#
|
1715
|
+
# @return [Array<GlossaryItem>]
|
1716
|
+
def ex_glossary
|
1717
|
+
glossary = []
|
1718
|
+
glossary << GlossaryItem.new(@game_title, '游戏标题')
|
1719
|
+
glossary << GlossaryItem.new(@currency_unit, '货币单位')
|
1720
|
+
@elements.each do |element|
|
1721
|
+
glossary << GlossaryItem.new(element, '属性名称')
|
1722
|
+
end
|
1723
|
+
@skill_types.each do |skill_type|
|
1724
|
+
glossary << GlossaryItem.new(skill_type, '技能类型名称')
|
1725
|
+
end
|
1726
|
+
@weapon_types.each do |weapon_type|
|
1727
|
+
glossary << GlossaryItem.new(weapon_type, '武器类型名称')
|
1728
|
+
end
|
1729
|
+
@armor_types.each do |armor_type|
|
1730
|
+
glossary << GlossaryItem.new(armor_type, '防具类型名称')
|
1731
|
+
end
|
1732
|
+
glossary.concat(@terms.ex_glossary)
|
1733
|
+
end
|
1734
|
+
|
1498
1735
|
# 将所有的字符串替换为指定的字符串
|
1499
1736
|
#
|
1500
1737
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1738
|
+
#
|
1501
1739
|
# @return [void]
|
1502
1740
|
def in_strings(hash)
|
1503
1741
|
@game_title = hash[@game_title] || @game_title
|
@@ -1510,61 +1748,32 @@ module R3EXS
|
|
1510
1748
|
@variables.map! { |string| hash[string] || string }
|
1511
1749
|
@terms.in_strings(hash)
|
1512
1750
|
end
|
1751
|
+
end
|
1513
1752
|
|
1514
|
-
|
1515
|
-
|
1516
|
-
# @return [String]
|
1517
|
-
attr_accessor :game_title
|
1518
|
-
|
1519
|
-
# 货币单位
|
1520
|
-
#
|
1521
|
-
# @return [String]
|
1522
|
-
attr_accessor :currency_unit
|
1523
|
-
|
1524
|
-
# 属性名称
|
1525
|
-
#
|
1526
|
-
# @return [Array<String>]
|
1527
|
-
attr_accessor :elements
|
1528
|
-
|
1529
|
-
# 技能类型名称
|
1530
|
-
#
|
1531
|
-
# @return [Array<String>]
|
1532
|
-
attr_accessor :skill_types
|
1533
|
-
|
1534
|
-
# 武器类型名称
|
1535
|
-
#
|
1536
|
-
# @return [Array<String>]
|
1537
|
-
attr_accessor :weapon_types
|
1538
|
-
|
1539
|
-
# 防具类型名称
|
1540
|
-
#
|
1541
|
-
# @return [Array<String>]
|
1542
|
-
attr_accessor :armor_types
|
1753
|
+
# 图块类
|
1754
|
+
class Tileset
|
1543
1755
|
|
1544
|
-
#
|
1756
|
+
# 在原始数组中的索引
|
1545
1757
|
#
|
1546
|
-
# @return [
|
1547
|
-
attr_accessor :
|
1758
|
+
# @return [Integer]
|
1759
|
+
attr_accessor :index
|
1548
1760
|
|
1549
|
-
#
|
1761
|
+
# 图块名称
|
1550
1762
|
#
|
1551
|
-
# @return [
|
1552
|
-
attr_accessor :
|
1763
|
+
# @return [String]
|
1764
|
+
attr_accessor :name
|
1553
1765
|
|
1554
|
-
#
|
1766
|
+
# 图块注释
|
1555
1767
|
#
|
1556
|
-
# @return [
|
1557
|
-
attr_accessor :
|
1558
|
-
end
|
1559
|
-
|
1560
|
-
# 图块类
|
1561
|
-
class Tileset
|
1768
|
+
# @return [String]
|
1769
|
+
attr_accessor :note
|
1562
1770
|
|
1563
1771
|
# 用 RPG::Tileset 初始化
|
1564
1772
|
#
|
1565
1773
|
# @param tileset [RPG::Tileset] 待处理的 RPG::Tileset 对象
|
1566
1774
|
# @param index [Integer] 在原始数组中的索引
|
1567
1775
|
# @param with_note [Boolean] 是否处理 note 字段
|
1776
|
+
#
|
1568
1777
|
# @return [R3EXS::Tileset]
|
1569
1778
|
def initialize(tileset, index, with_note)
|
1570
1779
|
@index = index
|
@@ -1576,6 +1785,7 @@ module R3EXS
|
|
1576
1785
|
# 注入到 RPG::Tileset 对象
|
1577
1786
|
#
|
1578
1787
|
# @param tileset [RPG::Tileset] 待注入的 RPG::Tileset 对象
|
1788
|
+
#
|
1579
1789
|
# @return [void]
|
1580
1790
|
def inject_to(tileset)
|
1581
1791
|
tileset.name = @name
|
@@ -1595,6 +1805,7 @@ module R3EXS
|
|
1595
1805
|
# 将所有的字符串替换为指定的字符串
|
1596
1806
|
#
|
1597
1807
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1808
|
+
#
|
1598
1809
|
# @return [void]
|
1599
1810
|
def in_strings(hash)
|
1600
1811
|
@name = hash[@name] || @name
|
@@ -1607,33 +1818,44 @@ module R3EXS
|
|
1607
1818
|
def empty?
|
1608
1819
|
@name.to_s.empty? && @note.to_s.empty?
|
1609
1820
|
end
|
1821
|
+
end
|
1822
|
+
|
1823
|
+
# 敌群类
|
1824
|
+
class Troop
|
1610
1825
|
|
1611
1826
|
# 在原始数组中的索引
|
1612
1827
|
#
|
1613
1828
|
# @return [Integer]
|
1614
1829
|
attr_accessor :index
|
1615
1830
|
|
1616
|
-
#
|
1831
|
+
# 敌群名称
|
1617
1832
|
#
|
1618
1833
|
# @return [String]
|
1619
1834
|
attr_accessor :name
|
1620
1835
|
|
1621
|
-
#
|
1836
|
+
# 敌群页列表
|
1622
1837
|
#
|
1623
|
-
# @return [
|
1624
|
-
attr_accessor :
|
1625
|
-
end
|
1626
|
-
|
1627
|
-
# 敌群类
|
1628
|
-
class Troop
|
1838
|
+
# @return [Array<R3EXS::Troop::Page>]
|
1839
|
+
attr_accessor :pages
|
1629
1840
|
|
1630
1841
|
# 敌群页类
|
1631
1842
|
class Page
|
1632
1843
|
|
1844
|
+
# 在原始数组中的索引
|
1845
|
+
#
|
1846
|
+
# @return [Integer]
|
1847
|
+
attr_accessor :index
|
1848
|
+
|
1849
|
+
# 事件指令列表
|
1850
|
+
#
|
1851
|
+
# @return [Array<R3EXS::EventCommand>]
|
1852
|
+
attr_accessor :list
|
1853
|
+
|
1633
1854
|
# 用 RPG::Troop::Page 初始化
|
1634
1855
|
#
|
1635
1856
|
# @param page [RPG::Troop::Page] 待处理的 RPG::Troop::Page 对象
|
1636
1857
|
# @param index [Integer] 在原始数组中的索引
|
1858
|
+
#
|
1637
1859
|
# @return [R3EXS::Troop::Page]
|
1638
1860
|
def initialize(page, index)
|
1639
1861
|
@index = index
|
@@ -1648,6 +1870,7 @@ module R3EXS
|
|
1648
1870
|
# 注入到 RPG::Troop::Page 对象
|
1649
1871
|
#
|
1650
1872
|
# @param page [RPG::Troop::Page] 待注入的 RPG::Troop::Page 对象
|
1873
|
+
#
|
1651
1874
|
# @return [void]
|
1652
1875
|
def inject_to(page)
|
1653
1876
|
@list.each do |eventcommand|
|
@@ -1669,6 +1892,7 @@ module R3EXS
|
|
1669
1892
|
# 将所有的字符串替换为指定的字符串
|
1670
1893
|
#
|
1671
1894
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1895
|
+
#
|
1672
1896
|
# @return [void]
|
1673
1897
|
def in_strings(hash)
|
1674
1898
|
@list.each do |eventcommand|
|
@@ -1682,21 +1906,13 @@ module R3EXS
|
|
1682
1906
|
def empty?
|
1683
1907
|
@list.empty?
|
1684
1908
|
end
|
1685
|
-
|
1686
|
-
# 在原始数组中的索引
|
1687
|
-
#
|
1688
|
-
# @return [Integer]
|
1689
|
-
attr_accessor :index
|
1690
|
-
|
1691
|
-
# 事件指令列表
|
1692
|
-
#
|
1693
|
-
# @return [Array<R3EXS::EventCommand>]
|
1694
|
-
attr_accessor :list
|
1695
1909
|
end
|
1696
1910
|
|
1697
1911
|
# 用 RPG::Troop 初始化
|
1912
|
+
#
|
1698
1913
|
# @param troop [RPG::Troop] 待处理的 RPG::Troop 对象
|
1699
1914
|
# @param index [Integer] 在原始数组中的索引
|
1915
|
+
#
|
1700
1916
|
# @return [R3EXS::Troop]
|
1701
1917
|
def initialize(troop, index, _unused = nil)
|
1702
1918
|
@index = index
|
@@ -1712,6 +1928,7 @@ module R3EXS
|
|
1712
1928
|
# 注入到 RPG::Troop 对象
|
1713
1929
|
#
|
1714
1930
|
# @param troop [RPG::Troop] 待注入的 RPG::Troop 对象
|
1931
|
+
#
|
1715
1932
|
# @return [void]
|
1716
1933
|
def inject_to(troop)
|
1717
1934
|
troop.name = @name
|
@@ -1734,6 +1951,7 @@ module R3EXS
|
|
1734
1951
|
# 将所有的字符串替换为指定的字符串
|
1735
1952
|
#
|
1736
1953
|
# @param hash [Hash<String, String>] 字符串翻译表
|
1954
|
+
#
|
1737
1955
|
# @return [void]
|
1738
1956
|
def in_strings(hash)
|
1739
1957
|
@name = hash[@name] || @name
|
@@ -1748,30 +1966,17 @@ module R3EXS
|
|
1748
1966
|
def empty?
|
1749
1967
|
@name.to_s.empty? && @pages.empty?
|
1750
1968
|
end
|
1751
|
-
|
1752
|
-
# 在原始数组中的索引
|
1753
|
-
#
|
1754
|
-
# @return [Integer]
|
1755
|
-
attr_accessor :index
|
1756
|
-
|
1757
|
-
# 敌群名称
|
1758
|
-
#
|
1759
|
-
# @return [String]
|
1760
|
-
attr_accessor :name
|
1761
|
-
|
1762
|
-
# 敌群页列表
|
1763
|
-
#
|
1764
|
-
# @return [Array<R3EXS::Troop::Page>]
|
1765
|
-
attr_accessor :pages
|
1766
1969
|
end
|
1767
1970
|
|
1768
1971
|
# 武器类
|
1769
1972
|
class Weapon < EquipItem
|
1770
1973
|
|
1771
1974
|
# 用 RPG::Weapon 初始化
|
1975
|
+
#
|
1772
1976
|
# @param weapon [RPG::Weapon] 待处理的 RPG::Weapon 对象
|
1773
1977
|
# @param index [Integer] 在原始数组中的索引
|
1774
1978
|
# @param with_note [Boolean] 是否处理 note 字段
|
1979
|
+
#
|
1775
1980
|
# @return [R3EXS::Weapon]
|
1776
1981
|
def initialize(weapon, index, with_note)
|
1777
1982
|
super(weapon, index, with_note)
|
@@ -1780,6 +1985,7 @@ module R3EXS
|
|
1780
1985
|
# 注入到 RPG::Weapon 对象
|
1781
1986
|
#
|
1782
1987
|
# @param weapon [RPG::Weapon] 待注入的 RPG::Weapon 对象
|
1988
|
+
#
|
1783
1989
|
# @return [void]
|
1784
1990
|
def inject_to(weapon)
|
1785
1991
|
super
|
@@ -1792,9 +1998,19 @@ module R3EXS
|
|
1792
1998
|
super
|
1793
1999
|
end
|
1794
2000
|
|
2001
|
+
# 提取术语表
|
2002
|
+
#
|
2003
|
+
# @return [Array<GlossaryItem>]
|
2004
|
+
def ex_glossary
|
2005
|
+
glossary = []
|
2006
|
+
glossary << GlossaryItem.new(@name, '武器名称')
|
2007
|
+
glossary
|
2008
|
+
end
|
2009
|
+
|
1795
2010
|
# 将所有的字符串替换为指定的字符串
|
1796
2011
|
#
|
1797
2012
|
# @param hash [Hash<String, String>] 字符串翻译表
|
2013
|
+
#
|
1798
2014
|
# @return [void]
|
1799
2015
|
def in_strings(hash)
|
1800
2016
|
super(hash)
|