wc3maptranslator 3.0.3 → 4.0.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.
- package/.codeclimate.yml +0 -1
- package/.eslintignore +0 -1
- package/.github/workflows/codeql-analysis.yml +54 -0
- package/.nycrc +1 -2
- package/.travis.yml +1 -2
- package/CHANGELOG.md +78 -0
- package/LICENSE.md +23 -0
- package/README.md +68 -75
- package/index.js +11 -15
- package/index.ts +12 -30
- package/lib/CommonInterfaces.ts +22 -0
- package/lib/HexBuffer.ts +11 -14
- package/lib/W3Buffer.ts +7 -3
- package/lib/translators/CamerasTranslator.ts +36 -41
- package/lib/translators/DoodadsTranslator.ts +57 -55
- package/lib/translators/ImportsTranslator.ts +29 -31
- package/lib/translators/InfoTranslator.ts +252 -204
- package/lib/translators/{object/ObjectsTranslator.ts → ObjectsTranslator.ts} +84 -82
- package/lib/translators/RegionsTranslator.ts +40 -58
- package/lib/translators/SoundsTranslator.ts +112 -96
- package/lib/translators/StringsTranslator.ts +23 -49
- package/lib/translators/TerrainTranslator.ts +166 -97
- package/lib/translators/UnitsTranslator.ts +98 -97
- package/lib/translators/index.ts +0 -1
- package/package.json +23 -16
- package/test/.mocharc.json +4 -0
- package/test/HexBufferTest.ts +11 -15
- package/test/TranslatorReversion.ts +104 -115
- package/test/W3BufferTest.ts +19 -13
- package/test/data/cameras.json +16 -0
- package/test/data/doodads.json +2730 -0
- package/test/data/imports.json +386 -0
- package/test/data/info.json +250 -0
- package/test/data/obj-abilities.json +4892 -0
- package/test/data/obj-buffs.json +38 -0
- package/test/data/obj-destructables.json +31 -0
- package/test/data/obj-doodads.json +38 -0
- package/test/data/obj-items.json +31 -0
- package/test/data/obj-units.json +40 -0
- package/test/data/obj-upgrades.json +38 -0
- package/test/data/regions.json +206 -0
- package/test/data/sounds.json +50 -0
- package/test/data/strings.json +115 -0
- package/test/data/terrain.json +1 -0
- package/test/data/units.json +452 -0
- package/test/data/war3map.doo +0 -0
- package/test/data/war3map.imp +0 -0
- package/test/data/war3map.j +3442 -0
- package/test/data/war3map.shd +0 -0
- package/test/data/war3map.w3a +0 -0
- package/test/data/war3map.w3b +0 -0
- package/test/data/war3map.w3c +0 -0
- package/test/data/war3map.w3d +0 -0
- package/test/data/war3map.w3e +0 -0
- package/test/data/war3map.w3h +0 -0
- package/test/data/war3map.w3i +0 -0
- package/test/data/war3map.w3q +0 -0
- package/test/data/war3map.w3r +0 -0
- package/test/data/war3map.w3s +0 -0
- package/test/data/war3map.w3t +0 -0
- package/test/data/war3map.w3u +0 -0
- package/test/data/war3map.wts +631 -0
- package/test/data/war3mapUnits.doo +0 -0
- package/examples/index.js +0 -123
- package/examples/index.ts +0 -134
- package/examples/json/cameras.json +0 -16
- package/examples/json/doodads.json +0 -28499
- package/examples/json/imports.json +0 -10
- package/examples/json/info.json +0 -111
- package/examples/json/object-abilities.json +0 -31
- package/examples/json/object-buffs.json +0 -24
- package/examples/json/object-destructables.json +0 -31
- package/examples/json/object-doodads.json +0 -24
- package/examples/json/object-items.json +0 -45
- package/examples/json/object-units.json +0 -45
- package/examples/json/object-upgrades.json +0 -31
- package/examples/json/regions.json +0 -36
- package/examples/json/sounds.json +0 -46
- package/examples/json/strings.json +0 -83
- package/examples/json/terrain.json +0 -46633
- package/examples/json/units.json +0 -332
- package/examples/package.json +0 -17
- package/examples/tsconfig.json +0 -27
- package/examples/war/war3map.doo +0 -0
- package/examples/war/war3map.imp +0 -0
- package/examples/war/war3map.w3a +0 -0
- package/examples/war/war3map.w3b +0 -0
- package/examples/war/war3map.w3c +0 -0
- package/examples/war/war3map.w3d +0 -0
- package/examples/war/war3map.w3e +0 -0
- package/examples/war/war3map.w3h +0 -0
- package/examples/war/war3map.w3i +0 -0
- package/examples/war/war3map.w3q +0 -0
- package/examples/war/war3map.w3r +0 -0
- package/examples/war/war3map.w3s +0 -0
- package/examples/war/war3map.w3t +0 -0
- package/examples/war/war3map.w3u +0 -0
- package/examples/war/war3map.wts +0 -99
- package/lib/translators/index.js +0 -16
- package/test/mocha.opts +0 -4
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "sloc",
|
|
4
|
+
"variation": 0,
|
|
5
|
+
"position": [
|
|
6
|
+
0,
|
|
7
|
+
-256,
|
|
8
|
+
-128
|
|
9
|
+
],
|
|
10
|
+
"rotation": 4.712,
|
|
11
|
+
"scale": [
|
|
12
|
+
1,
|
|
13
|
+
1,
|
|
14
|
+
1
|
|
15
|
+
],
|
|
16
|
+
"hero": {
|
|
17
|
+
"level": 0,
|
|
18
|
+
"str": 0,
|
|
19
|
+
"agi": 0,
|
|
20
|
+
"int": 0
|
|
21
|
+
},
|
|
22
|
+
"inventory": [],
|
|
23
|
+
"abilities": [],
|
|
24
|
+
"player": 0,
|
|
25
|
+
"hitpoints": -1,
|
|
26
|
+
"mana": -1,
|
|
27
|
+
"gold": 0,
|
|
28
|
+
"targetAcquisition": 0,
|
|
29
|
+
"color": -1,
|
|
30
|
+
"id": 1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "sloc",
|
|
34
|
+
"variation": 11,
|
|
35
|
+
"position": [
|
|
36
|
+
0,
|
|
37
|
+
-256,
|
|
38
|
+
-128
|
|
39
|
+
],
|
|
40
|
+
"rotation": 4.712,
|
|
41
|
+
"scale": [
|
|
42
|
+
1,
|
|
43
|
+
1,
|
|
44
|
+
1
|
|
45
|
+
],
|
|
46
|
+
"hero": {
|
|
47
|
+
"level": 0,
|
|
48
|
+
"str": 0,
|
|
49
|
+
"agi": 0,
|
|
50
|
+
"int": 0
|
|
51
|
+
},
|
|
52
|
+
"inventory": [],
|
|
53
|
+
"abilities": [],
|
|
54
|
+
"player": 11,
|
|
55
|
+
"hitpoints": -1,
|
|
56
|
+
"mana": -1,
|
|
57
|
+
"gold": 0,
|
|
58
|
+
"targetAcquisition": 0,
|
|
59
|
+
"color": -1,
|
|
60
|
+
"id": 17
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "sloc",
|
|
64
|
+
"variation": 1,
|
|
65
|
+
"position": [
|
|
66
|
+
0,
|
|
67
|
+
-256,
|
|
68
|
+
-128
|
|
69
|
+
],
|
|
70
|
+
"rotation": 4.712,
|
|
71
|
+
"scale": [
|
|
72
|
+
1,
|
|
73
|
+
1,
|
|
74
|
+
1
|
|
75
|
+
],
|
|
76
|
+
"hero": {
|
|
77
|
+
"level": 0,
|
|
78
|
+
"str": 0,
|
|
79
|
+
"agi": 0,
|
|
80
|
+
"int": 0
|
|
81
|
+
},
|
|
82
|
+
"inventory": [],
|
|
83
|
+
"abilities": [],
|
|
84
|
+
"player": 1,
|
|
85
|
+
"hitpoints": -1,
|
|
86
|
+
"mana": -1,
|
|
87
|
+
"gold": 0,
|
|
88
|
+
"targetAcquisition": 0,
|
|
89
|
+
"color": -1,
|
|
90
|
+
"id": 0
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "sloc",
|
|
94
|
+
"variation": 2,
|
|
95
|
+
"position": [
|
|
96
|
+
0,
|
|
97
|
+
-256,
|
|
98
|
+
-128
|
|
99
|
+
],
|
|
100
|
+
"rotation": 4.712,
|
|
101
|
+
"scale": [
|
|
102
|
+
1,
|
|
103
|
+
1,
|
|
104
|
+
1
|
|
105
|
+
],
|
|
106
|
+
"hero": {
|
|
107
|
+
"level": 0,
|
|
108
|
+
"str": 0,
|
|
109
|
+
"agi": 0,
|
|
110
|
+
"int": 0
|
|
111
|
+
},
|
|
112
|
+
"inventory": [],
|
|
113
|
+
"abilities": [],
|
|
114
|
+
"player": 2,
|
|
115
|
+
"hitpoints": -1,
|
|
116
|
+
"mana": -1,
|
|
117
|
+
"gold": 0,
|
|
118
|
+
"targetAcquisition": 0,
|
|
119
|
+
"color": -1,
|
|
120
|
+
"id": 2
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "sloc",
|
|
124
|
+
"variation": 3,
|
|
125
|
+
"position": [
|
|
126
|
+
0,
|
|
127
|
+
-256,
|
|
128
|
+
-128
|
|
129
|
+
],
|
|
130
|
+
"rotation": 4.712,
|
|
131
|
+
"scale": [
|
|
132
|
+
1,
|
|
133
|
+
1,
|
|
134
|
+
1
|
|
135
|
+
],
|
|
136
|
+
"hero": {
|
|
137
|
+
"level": 0,
|
|
138
|
+
"str": 0,
|
|
139
|
+
"agi": 0,
|
|
140
|
+
"int": 0
|
|
141
|
+
},
|
|
142
|
+
"inventory": [],
|
|
143
|
+
"abilities": [],
|
|
144
|
+
"player": 3,
|
|
145
|
+
"hitpoints": -1,
|
|
146
|
+
"mana": -1,
|
|
147
|
+
"gold": 0,
|
|
148
|
+
"targetAcquisition": 0,
|
|
149
|
+
"color": -1,
|
|
150
|
+
"id": 3
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"type": "sloc",
|
|
154
|
+
"variation": 4,
|
|
155
|
+
"position": [
|
|
156
|
+
0,
|
|
157
|
+
-256,
|
|
158
|
+
-128
|
|
159
|
+
],
|
|
160
|
+
"rotation": 4.712,
|
|
161
|
+
"scale": [
|
|
162
|
+
1,
|
|
163
|
+
1,
|
|
164
|
+
1
|
|
165
|
+
],
|
|
166
|
+
"hero": {
|
|
167
|
+
"level": 0,
|
|
168
|
+
"str": 0,
|
|
169
|
+
"agi": 0,
|
|
170
|
+
"int": 0
|
|
171
|
+
},
|
|
172
|
+
"inventory": [],
|
|
173
|
+
"abilities": [],
|
|
174
|
+
"player": 4,
|
|
175
|
+
"hitpoints": -1,
|
|
176
|
+
"mana": -1,
|
|
177
|
+
"gold": 0,
|
|
178
|
+
"targetAcquisition": 0,
|
|
179
|
+
"color": -1,
|
|
180
|
+
"id": 10
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "sloc",
|
|
184
|
+
"variation": 5,
|
|
185
|
+
"position": [
|
|
186
|
+
0,
|
|
187
|
+
-256,
|
|
188
|
+
-128
|
|
189
|
+
],
|
|
190
|
+
"rotation": 4.712,
|
|
191
|
+
"scale": [
|
|
192
|
+
1,
|
|
193
|
+
1,
|
|
194
|
+
1
|
|
195
|
+
],
|
|
196
|
+
"hero": {
|
|
197
|
+
"level": 0,
|
|
198
|
+
"str": 0,
|
|
199
|
+
"agi": 0,
|
|
200
|
+
"int": 0
|
|
201
|
+
},
|
|
202
|
+
"inventory": [],
|
|
203
|
+
"abilities": [],
|
|
204
|
+
"player": 5,
|
|
205
|
+
"hitpoints": -1,
|
|
206
|
+
"mana": -1,
|
|
207
|
+
"gold": 0,
|
|
208
|
+
"targetAcquisition": 0,
|
|
209
|
+
"color": -1,
|
|
210
|
+
"id": 11
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"type": "sloc",
|
|
214
|
+
"variation": 6,
|
|
215
|
+
"position": [
|
|
216
|
+
0,
|
|
217
|
+
-256,
|
|
218
|
+
-128
|
|
219
|
+
],
|
|
220
|
+
"rotation": 4.712,
|
|
221
|
+
"scale": [
|
|
222
|
+
1,
|
|
223
|
+
1,
|
|
224
|
+
1
|
|
225
|
+
],
|
|
226
|
+
"hero": {
|
|
227
|
+
"level": 0,
|
|
228
|
+
"str": 0,
|
|
229
|
+
"agi": 0,
|
|
230
|
+
"int": 0
|
|
231
|
+
},
|
|
232
|
+
"inventory": [],
|
|
233
|
+
"abilities": [],
|
|
234
|
+
"player": 6,
|
|
235
|
+
"hitpoints": -1,
|
|
236
|
+
"mana": -1,
|
|
237
|
+
"gold": 0,
|
|
238
|
+
"targetAcquisition": 0,
|
|
239
|
+
"color": -1,
|
|
240
|
+
"id": 12
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"type": "sloc",
|
|
244
|
+
"variation": 7,
|
|
245
|
+
"position": [
|
|
246
|
+
0,
|
|
247
|
+
-256,
|
|
248
|
+
-128
|
|
249
|
+
],
|
|
250
|
+
"rotation": 4.712,
|
|
251
|
+
"scale": [
|
|
252
|
+
1,
|
|
253
|
+
1,
|
|
254
|
+
1
|
|
255
|
+
],
|
|
256
|
+
"hero": {
|
|
257
|
+
"level": 0,
|
|
258
|
+
"str": 0,
|
|
259
|
+
"agi": 0,
|
|
260
|
+
"int": 0
|
|
261
|
+
},
|
|
262
|
+
"inventory": [],
|
|
263
|
+
"abilities": [],
|
|
264
|
+
"player": 7,
|
|
265
|
+
"hitpoints": -1,
|
|
266
|
+
"mana": -1,
|
|
267
|
+
"gold": 0,
|
|
268
|
+
"targetAcquisition": 0,
|
|
269
|
+
"color": -1,
|
|
270
|
+
"id": 13
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "sloc",
|
|
274
|
+
"variation": 8,
|
|
275
|
+
"position": [
|
|
276
|
+
0,
|
|
277
|
+
-256,
|
|
278
|
+
-128
|
|
279
|
+
],
|
|
280
|
+
"rotation": 4.712,
|
|
281
|
+
"scale": [
|
|
282
|
+
1,
|
|
283
|
+
1,
|
|
284
|
+
1
|
|
285
|
+
],
|
|
286
|
+
"hero": {
|
|
287
|
+
"level": 0,
|
|
288
|
+
"str": 0,
|
|
289
|
+
"agi": 0,
|
|
290
|
+
"int": 0
|
|
291
|
+
},
|
|
292
|
+
"inventory": [],
|
|
293
|
+
"abilities": [],
|
|
294
|
+
"player": 8,
|
|
295
|
+
"hitpoints": -1,
|
|
296
|
+
"mana": -1,
|
|
297
|
+
"gold": 0,
|
|
298
|
+
"targetAcquisition": 0,
|
|
299
|
+
"color": -1,
|
|
300
|
+
"id": 14
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"type": "sloc",
|
|
304
|
+
"variation": 9,
|
|
305
|
+
"position": [
|
|
306
|
+
0,
|
|
307
|
+
-256,
|
|
308
|
+
-128
|
|
309
|
+
],
|
|
310
|
+
"rotation": 4.712,
|
|
311
|
+
"scale": [
|
|
312
|
+
1,
|
|
313
|
+
1,
|
|
314
|
+
1
|
|
315
|
+
],
|
|
316
|
+
"hero": {
|
|
317
|
+
"level": 0,
|
|
318
|
+
"str": 0,
|
|
319
|
+
"agi": 0,
|
|
320
|
+
"int": 0
|
|
321
|
+
},
|
|
322
|
+
"inventory": [],
|
|
323
|
+
"abilities": [],
|
|
324
|
+
"player": 9,
|
|
325
|
+
"hitpoints": -1,
|
|
326
|
+
"mana": -1,
|
|
327
|
+
"gold": 0,
|
|
328
|
+
"targetAcquisition": 0,
|
|
329
|
+
"color": -1,
|
|
330
|
+
"id": 15
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"type": "sloc",
|
|
334
|
+
"variation": 10,
|
|
335
|
+
"position": [
|
|
336
|
+
0,
|
|
337
|
+
-256,
|
|
338
|
+
-128
|
|
339
|
+
],
|
|
340
|
+
"rotation": 4.712,
|
|
341
|
+
"scale": [
|
|
342
|
+
1,
|
|
343
|
+
1,
|
|
344
|
+
1
|
|
345
|
+
],
|
|
346
|
+
"hero": {
|
|
347
|
+
"level": 0,
|
|
348
|
+
"str": 0,
|
|
349
|
+
"agi": 0,
|
|
350
|
+
"int": 0
|
|
351
|
+
},
|
|
352
|
+
"inventory": [],
|
|
353
|
+
"abilities": [],
|
|
354
|
+
"player": 10,
|
|
355
|
+
"hitpoints": -1,
|
|
356
|
+
"mana": -1,
|
|
357
|
+
"gold": 0,
|
|
358
|
+
"targetAcquisition": 0,
|
|
359
|
+
"color": -1,
|
|
360
|
+
"id": 16
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"type": "H000",
|
|
364
|
+
"variation": 0,
|
|
365
|
+
"position": [
|
|
366
|
+
413.455,
|
|
367
|
+
-94.833,
|
|
368
|
+
-128
|
|
369
|
+
],
|
|
370
|
+
"rotation": 1.611,
|
|
371
|
+
"scale": [
|
|
372
|
+
1,
|
|
373
|
+
1,
|
|
374
|
+
1
|
|
375
|
+
],
|
|
376
|
+
"hero": {
|
|
377
|
+
"level": 1,
|
|
378
|
+
"str": 0,
|
|
379
|
+
"agi": 0,
|
|
380
|
+
"int": 0
|
|
381
|
+
},
|
|
382
|
+
"inventory": [],
|
|
383
|
+
"abilities": [],
|
|
384
|
+
"player": 1,
|
|
385
|
+
"hitpoints": -1,
|
|
386
|
+
"mana": -1,
|
|
387
|
+
"gold": 12500,
|
|
388
|
+
"targetAcquisition": -1,
|
|
389
|
+
"color": -1,
|
|
390
|
+
"id": 4
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"type": "hpea",
|
|
394
|
+
"variation": 0,
|
|
395
|
+
"position": [
|
|
396
|
+
-308.096,
|
|
397
|
+
-542.293,
|
|
398
|
+
-128
|
|
399
|
+
],
|
|
400
|
+
"rotation": 0.657,
|
|
401
|
+
"scale": [
|
|
402
|
+
1,
|
|
403
|
+
1,
|
|
404
|
+
1
|
|
405
|
+
],
|
|
406
|
+
"hero": {
|
|
407
|
+
"level": 1,
|
|
408
|
+
"str": 0,
|
|
409
|
+
"agi": 0,
|
|
410
|
+
"int": 0
|
|
411
|
+
},
|
|
412
|
+
"inventory": [],
|
|
413
|
+
"abilities": [],
|
|
414
|
+
"player": 1,
|
|
415
|
+
"hitpoints": -1,
|
|
416
|
+
"mana": -1,
|
|
417
|
+
"gold": 12500,
|
|
418
|
+
"targetAcquisition": -1,
|
|
419
|
+
"color": -1,
|
|
420
|
+
"id": 5
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"type": "hkni",
|
|
424
|
+
"variation": 0,
|
|
425
|
+
"position": [
|
|
426
|
+
-249.695,
|
|
427
|
+
98.257,
|
|
428
|
+
-128
|
|
429
|
+
],
|
|
430
|
+
"rotation": 4.08,
|
|
431
|
+
"scale": [
|
|
432
|
+
1,
|
|
433
|
+
1,
|
|
434
|
+
1
|
|
435
|
+
],
|
|
436
|
+
"hero": {
|
|
437
|
+
"level": 1,
|
|
438
|
+
"str": 0,
|
|
439
|
+
"agi": 0,
|
|
440
|
+
"int": 0
|
|
441
|
+
},
|
|
442
|
+
"inventory": [],
|
|
443
|
+
"abilities": [],
|
|
444
|
+
"player": 3,
|
|
445
|
+
"hitpoints": -1,
|
|
446
|
+
"mana": -1,
|
|
447
|
+
"gold": 12500,
|
|
448
|
+
"targetAcquisition": -1,
|
|
449
|
+
"color": -1,
|
|
450
|
+
"id": 6
|
|
451
|
+
}
|
|
452
|
+
]
|
|
Binary file
|
|
Binary file
|