wc3maptranslator 4.0.0 → 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.
Files changed (34) hide show
  1. package/.github/workflows/codeql-analysis.yml +54 -54
  2. package/CHANGELOG.md +5 -0
  3. package/LICENSE.md +23 -23
  4. package/lib/HexBuffer.ts +81 -81
  5. package/lib/W3Buffer.ts +69 -69
  6. package/lib/translators/CamerasTranslator.ts +101 -101
  7. package/lib/translators/DoodadsTranslator.ts +178 -178
  8. package/lib/translators/ImportsTranslator.ts +78 -78
  9. package/lib/translators/InfoTranslator.ts +584 -584
  10. package/lib/translators/RegionsTranslator.ts +123 -123
  11. package/lib/translators/SoundsTranslator.ts +237 -237
  12. package/lib/translators/StringsTranslator.ts +49 -49
  13. package/lib/translators/TerrainTranslator.ts +276 -276
  14. package/lib/translators/UnitsTranslator.ts +261 -261
  15. package/lib/translators/index.ts +10 -10
  16. package/package.json +2 -1
  17. package/test/HexBufferTest.ts +170 -170
  18. package/test/TranslatorReversion.ts +218 -218
  19. package/test/data/cameras.json +15 -15
  20. package/test/data/doodads.json +2729 -2729
  21. package/test/data/imports.json +385 -385
  22. package/test/data/info.json +249 -249
  23. package/test/data/obj-abilities.json +4891 -4891
  24. package/test/data/obj-buffs.json +37 -37
  25. package/test/data/obj-destructables.json +30 -30
  26. package/test/data/obj-doodads.json +37 -37
  27. package/test/data/obj-items.json +30 -30
  28. package/test/data/obj-units.json +39 -39
  29. package/test/data/obj-upgrades.json +37 -37
  30. package/test/data/regions.json +205 -205
  31. package/test/data/sounds.json +49 -49
  32. package/test/data/strings.json +114 -114
  33. package/test/data/terrain.json +1 -1
  34. package/test/data/units.json +451 -451
@@ -1,206 +1,206 @@
1
- [
2
- {
3
- "name": "UP Center",
4
- "id": 0,
5
- "weatherEffect": "0000",
6
- "ambientSound": "",
7
- "color": [
8
- 0,
9
- 0,
10
- 0
11
- ],
12
- "position": {
13
- "left": -704,
14
- "bottom": 480,
15
- "right": 704,
16
- "top": 1504
17
- }
18
- },
19
- {
20
- "name": "Right Center",
21
- "id": 1,
22
- "weatherEffect": "0000",
23
- "ambientSound": "",
24
- "color": [
25
- 0,
26
- 0,
27
- 0
28
- ],
29
- "position": {
30
- "left": 704,
31
- "bottom": -960,
32
- "right": 1696,
33
- "top": 448
34
- }
35
- },
36
- {
37
- "name": "Down Center",
38
- "id": 2,
39
- "weatherEffect": "0000",
40
- "ambientSound": "",
41
- "color": [
42
- 0,
43
- 0,
44
- 0
45
- ],
46
- "position": {
47
- "left": -704,
48
- "bottom": -1984,
49
- "right": 704,
50
- "top": -960
51
- }
52
- },
53
- {
54
- "name": "Left Center",
55
- "id": 3,
56
- "weatherEffect": "0000",
57
- "ambientSound": "",
58
- "color": [
59
- 0,
60
- 0,
61
- 0
62
- ],
63
- "position": {
64
- "left": -1760,
65
- "bottom": -960,
66
- "right": -704,
67
- "top": 480
68
- }
69
- },
70
- {
71
- "name": "Water Up",
72
- "id": 4,
73
- "weatherEffect": "0000",
74
- "ambientSound": "",
75
- "color": [
76
- 255,
77
- 255,
78
- 255
79
- ],
80
- "position": {
81
- "left": -1600,
82
- "bottom": 1088,
83
- "right": 1600,
84
- "top": 2976
85
- }
86
- },
87
- {
88
- "name": "Water Right",
89
- "id": 5,
90
- "weatherEffect": "0000",
91
- "ambientSound": "",
92
- "color": [
93
- 255,
94
- 255,
95
- 255
96
- ],
97
- "position": {
98
- "left": 1344,
99
- "bottom": -1856,
100
- "right": 3232,
101
- "top": 1344
102
- }
103
- },
104
- {
105
- "name": "Water Down",
106
- "id": 6,
107
- "weatherEffect": "0000",
108
- "ambientSound": "",
109
- "color": [
110
- 255,
111
- 255,
112
- 255
113
- ],
114
- "position": {
115
- "left": -1600,
116
- "bottom": -3488,
117
- "right": 1600,
118
- "top": -1600
119
- }
120
- },
121
- {
122
- "name": "Water Left",
123
- "id": 7,
124
- "weatherEffect": "0000",
125
- "ambientSound": "",
126
- "color": [
127
- 255,
128
- 255,
129
- 255
130
- ],
131
- "position": {
132
- "left": -3232,
133
- "bottom": -1856,
134
- "right": -1344,
135
- "top": 1344
136
- }
137
- },
138
- {
139
- "name": "LeftTop",
140
- "id": 8,
141
- "weatherEffect": "0000",
142
- "ambientSound": "",
143
- "color": [
144
- 128,
145
- 128,
146
- 255
147
- ],
148
- "position": {
149
- "left": -1376,
150
- "bottom": 480,
151
- "right": -704,
152
- "top": 1184
153
- }
154
- },
155
- {
156
- "name": "RightTop",
157
- "id": 9,
158
- "weatherEffect": "0000",
159
- "ambientSound": "",
160
- "color": [
161
- 128,
162
- 128,
163
- 255
164
- ],
165
- "position": {
166
- "left": 704,
167
- "bottom": 448,
168
- "right": 1312,
169
- "top": 1056
170
- }
171
- },
172
- {
173
- "name": "RightBottom",
174
- "id": 10,
175
- "weatherEffect": "0000",
176
- "ambientSound": "",
177
- "color": [
178
- 128,
179
- 128,
180
- 255
181
- ],
182
- "position": {
183
- "left": 704,
184
- "bottom": -1568,
185
- "right": 1312,
186
- "top": -960
187
- }
188
- },
189
- {
190
- "name": "LeftBottom",
191
- "id": 11,
192
- "weatherEffect": "0000",
193
- "ambientSound": "",
194
- "color": [
195
- 128,
196
- 128,
197
- 255
198
- ],
199
- "position": {
200
- "left": -1312,
201
- "bottom": -1600,
202
- "right": -704,
203
- "top": -960
204
- }
205
- }
1
+ [
2
+ {
3
+ "name": "UP Center",
4
+ "id": 0,
5
+ "weatherEffect": "0000",
6
+ "ambientSound": "",
7
+ "color": [
8
+ 0,
9
+ 0,
10
+ 0
11
+ ],
12
+ "position": {
13
+ "left": -704,
14
+ "bottom": 480,
15
+ "right": 704,
16
+ "top": 1504
17
+ }
18
+ },
19
+ {
20
+ "name": "Right Center",
21
+ "id": 1,
22
+ "weatherEffect": "0000",
23
+ "ambientSound": "",
24
+ "color": [
25
+ 0,
26
+ 0,
27
+ 0
28
+ ],
29
+ "position": {
30
+ "left": 704,
31
+ "bottom": -960,
32
+ "right": 1696,
33
+ "top": 448
34
+ }
35
+ },
36
+ {
37
+ "name": "Down Center",
38
+ "id": 2,
39
+ "weatherEffect": "0000",
40
+ "ambientSound": "",
41
+ "color": [
42
+ 0,
43
+ 0,
44
+ 0
45
+ ],
46
+ "position": {
47
+ "left": -704,
48
+ "bottom": -1984,
49
+ "right": 704,
50
+ "top": -960
51
+ }
52
+ },
53
+ {
54
+ "name": "Left Center",
55
+ "id": 3,
56
+ "weatherEffect": "0000",
57
+ "ambientSound": "",
58
+ "color": [
59
+ 0,
60
+ 0,
61
+ 0
62
+ ],
63
+ "position": {
64
+ "left": -1760,
65
+ "bottom": -960,
66
+ "right": -704,
67
+ "top": 480
68
+ }
69
+ },
70
+ {
71
+ "name": "Water Up",
72
+ "id": 4,
73
+ "weatherEffect": "0000",
74
+ "ambientSound": "",
75
+ "color": [
76
+ 255,
77
+ 255,
78
+ 255
79
+ ],
80
+ "position": {
81
+ "left": -1600,
82
+ "bottom": 1088,
83
+ "right": 1600,
84
+ "top": 2976
85
+ }
86
+ },
87
+ {
88
+ "name": "Water Right",
89
+ "id": 5,
90
+ "weatherEffect": "0000",
91
+ "ambientSound": "",
92
+ "color": [
93
+ 255,
94
+ 255,
95
+ 255
96
+ ],
97
+ "position": {
98
+ "left": 1344,
99
+ "bottom": -1856,
100
+ "right": 3232,
101
+ "top": 1344
102
+ }
103
+ },
104
+ {
105
+ "name": "Water Down",
106
+ "id": 6,
107
+ "weatherEffect": "0000",
108
+ "ambientSound": "",
109
+ "color": [
110
+ 255,
111
+ 255,
112
+ 255
113
+ ],
114
+ "position": {
115
+ "left": -1600,
116
+ "bottom": -3488,
117
+ "right": 1600,
118
+ "top": -1600
119
+ }
120
+ },
121
+ {
122
+ "name": "Water Left",
123
+ "id": 7,
124
+ "weatherEffect": "0000",
125
+ "ambientSound": "",
126
+ "color": [
127
+ 255,
128
+ 255,
129
+ 255
130
+ ],
131
+ "position": {
132
+ "left": -3232,
133
+ "bottom": -1856,
134
+ "right": -1344,
135
+ "top": 1344
136
+ }
137
+ },
138
+ {
139
+ "name": "LeftTop",
140
+ "id": 8,
141
+ "weatherEffect": "0000",
142
+ "ambientSound": "",
143
+ "color": [
144
+ 128,
145
+ 128,
146
+ 255
147
+ ],
148
+ "position": {
149
+ "left": -1376,
150
+ "bottom": 480,
151
+ "right": -704,
152
+ "top": 1184
153
+ }
154
+ },
155
+ {
156
+ "name": "RightTop",
157
+ "id": 9,
158
+ "weatherEffect": "0000",
159
+ "ambientSound": "",
160
+ "color": [
161
+ 128,
162
+ 128,
163
+ 255
164
+ ],
165
+ "position": {
166
+ "left": 704,
167
+ "bottom": 448,
168
+ "right": 1312,
169
+ "top": 1056
170
+ }
171
+ },
172
+ {
173
+ "name": "RightBottom",
174
+ "id": 10,
175
+ "weatherEffect": "0000",
176
+ "ambientSound": "",
177
+ "color": [
178
+ 128,
179
+ 128,
180
+ 255
181
+ ],
182
+ "position": {
183
+ "left": 704,
184
+ "bottom": -1568,
185
+ "right": 1312,
186
+ "top": -960
187
+ }
188
+ },
189
+ {
190
+ "name": "LeftBottom",
191
+ "id": 11,
192
+ "weatherEffect": "0000",
193
+ "ambientSound": "",
194
+ "color": [
195
+ 128,
196
+ 128,
197
+ 255
198
+ ],
199
+ "position": {
200
+ "left": -1312,
201
+ "bottom": -1600,
202
+ "right": -704,
203
+ "top": -960
204
+ }
205
+ }
206
206
  ]
@@ -1,50 +1,50 @@
1
- [
2
- {
3
- "name": "gg_snd_FirstSound",
4
- "variableName": "gg_snd_FirstSound",
5
- "path": "Units\\Demon\\HeroPitLord\\HPitLordYesAttack1.wav",
6
- "eax": "HeroAcksEAX",
7
- "volume": -1,
8
- "pitch": 0.75,
9
- "channel": 0,
10
- "flags": {
11
- "looping": false,
12
- "3dSound": false,
13
- "stopOutOfRange": true,
14
- "music": false
15
- },
16
- "fadeRate": {
17
- "in": 10,
18
- "out": 10
19
- },
20
- "distance": {
21
- "min": 0,
22
- "max": 10000,
23
- "cutoff": 3000
24
- }
25
- },
26
- {
27
- "name": "gg_snd_Warning",
28
- "variableName": "gg_snd_Warning",
29
- "path": "Sound\\Interface\\Warning.wav",
30
- "eax": "DefaultEAXON",
31
- "volume": -1,
32
- "pitch": 1,
33
- "channel": 0,
34
- "flags": {
35
- "looping": false,
36
- "3dSound": false,
37
- "stopOutOfRange": false,
38
- "music": false
39
- },
40
- "fadeRate": {
41
- "in": 10,
42
- "out": 10
43
- },
44
- "distance": {
45
- "min": 0,
46
- "max": 10000,
47
- "cutoff": 3000
48
- }
49
- }
1
+ [
2
+ {
3
+ "name": "gg_snd_FirstSound",
4
+ "variableName": "gg_snd_FirstSound",
5
+ "path": "Units\\Demon\\HeroPitLord\\HPitLordYesAttack1.wav",
6
+ "eax": "HeroAcksEAX",
7
+ "volume": -1,
8
+ "pitch": 0.75,
9
+ "channel": 0,
10
+ "flags": {
11
+ "looping": false,
12
+ "3dSound": false,
13
+ "stopOutOfRange": true,
14
+ "music": false
15
+ },
16
+ "fadeRate": {
17
+ "in": 10,
18
+ "out": 10
19
+ },
20
+ "distance": {
21
+ "min": 0,
22
+ "max": 10000,
23
+ "cutoff": 3000
24
+ }
25
+ },
26
+ {
27
+ "name": "gg_snd_Warning",
28
+ "variableName": "gg_snd_Warning",
29
+ "path": "Sound\\Interface\\Warning.wav",
30
+ "eax": "DefaultEAXON",
31
+ "volume": -1,
32
+ "pitch": 1,
33
+ "channel": 0,
34
+ "flags": {
35
+ "looping": false,
36
+ "3dSound": false,
37
+ "stopOutOfRange": false,
38
+ "music": false
39
+ },
40
+ "fadeRate": {
41
+ "in": 10,
42
+ "out": 10
43
+ },
44
+ "distance": {
45
+ "min": 0,
46
+ "max": 10000,
47
+ "cutoff": 3000
48
+ }
49
+ }
50
50
  ]