s2cfgtojson 7.0.13 → 7.0.15
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/dist/Struct.d.ts +67 -0
- package/dist/Struct.mjs +481 -0
- package/dist/enums.d.ts +205 -0
- package/dist/enums.mjs +2 -0
- package/dist/types.d.ts +9842 -0
- package/dist/types.mjs +3 -0
- package/dist/utility-types.d.ts +23 -0
- package/dist/utility-types.mjs +1 -0
- package/package.json +34 -3
- package/readme.md +1 -1
- package/Struct.mts +0 -623
- package/Struct.test.mts +0 -488
- package/enums.mts +0 -1980
- package/test.cfg +0 -598
- package/tsconfig.json +0 -8
- package/types.mts +0 -12248
- package/utility-types.mts +0 -668
package/Struct.test.mts
DELETED
|
@@ -1,488 +0,0 @@
|
|
|
1
|
-
import { describe, test, expect } from "vitest";
|
|
2
|
-
import {
|
|
3
|
-
createDynamicClassInstance,
|
|
4
|
-
ERank,
|
|
5
|
-
pad,
|
|
6
|
-
Struct,
|
|
7
|
-
ArmorPrototype,
|
|
8
|
-
Refs,
|
|
9
|
-
QuestNodePrototypeRandom,
|
|
10
|
-
QuestNodePrototypeLaunchers,
|
|
11
|
-
} from "./Struct.mjs";
|
|
12
|
-
import fs from "node:fs";
|
|
13
|
-
|
|
14
|
-
class ChimeraHPFix extends Struct {
|
|
15
|
-
__internal__ = new Refs({
|
|
16
|
-
rawName: "ChimeraHPFix",
|
|
17
|
-
isRoot: true,
|
|
18
|
-
bskipref: true,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
MaxHP = 750;
|
|
22
|
-
}
|
|
23
|
-
class TradePrototype extends Struct {
|
|
24
|
-
__internal__ = new Refs({
|
|
25
|
-
rawName: "TradersDontBuyWeaponsArmor",
|
|
26
|
-
refurl: "../TradePrototypes.cfg",
|
|
27
|
-
refkey: 0,
|
|
28
|
-
isRoot: true,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
TradeGenerators = new TradeGenerators();
|
|
32
|
-
}
|
|
33
|
-
class TradeGenerators extends Struct {
|
|
34
|
-
__internal__ = new Refs({
|
|
35
|
-
isArray: true,
|
|
36
|
-
rawName: "TradeGenerators",
|
|
37
|
-
//useAsterisk: true, this option is not supported for now
|
|
38
|
-
});
|
|
39
|
-
"0" = new TradeGenerator();
|
|
40
|
-
}
|
|
41
|
-
class TradeGenerator extends Struct {
|
|
42
|
-
__internal__ = new Refs({
|
|
43
|
-
rawName: "0",
|
|
44
|
-
});
|
|
45
|
-
BuyLimitations = new BuyLimitations();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
class BuyLimitations extends Struct {
|
|
49
|
-
__internal__ = new Refs({
|
|
50
|
-
rawName: "BuyLimitations",
|
|
51
|
-
isArray: true,
|
|
52
|
-
});
|
|
53
|
-
"0" = "EItemType::Weapon";
|
|
54
|
-
"1" = "EItemType::Armor";
|
|
55
|
-
"2" = new Struct({
|
|
56
|
-
__internal__: {
|
|
57
|
-
removenode: true,
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
describe("Struct", () => {
|
|
63
|
-
test("toString()", () => {
|
|
64
|
-
const c = new ChimeraHPFix();
|
|
65
|
-
expect(c.MaxHP).toBe(750);
|
|
66
|
-
expect(new ChimeraHPFix().toString()).toBe(
|
|
67
|
-
`ChimeraHPFix : struct.begin {bskipref}
|
|
68
|
-
MaxHP = 750
|
|
69
|
-
struct.end`,
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
expect(new TradePrototype().toString()).toBe(
|
|
73
|
-
`TradersDontBuyWeaponsArmor : struct.begin {refurl=../TradePrototypes.cfg;refkey=[0]}
|
|
74
|
-
TradeGenerators : struct.begin
|
|
75
|
-
[0] : struct.begin
|
|
76
|
-
BuyLimitations : struct.begin
|
|
77
|
-
[0] = EItemType::Weapon
|
|
78
|
-
[1] = EItemType::Armor
|
|
79
|
-
[2] : removenode
|
|
80
|
-
struct.end
|
|
81
|
-
struct.end
|
|
82
|
-
struct.end
|
|
83
|
-
struct.end`,
|
|
84
|
-
);
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
test("pad()", () => {
|
|
88
|
-
expect(pad("test")).toBe(" test");
|
|
89
|
-
expect(pad(pad("test"))).toBe(" test");
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
describe("createDynamicClassInstance", () => {
|
|
93
|
-
test("1", () => {
|
|
94
|
-
const instance = createDynamicClassInstance("DynamicClass");
|
|
95
|
-
instance.__internal__.isRoot = true;
|
|
96
|
-
|
|
97
|
-
expect(instance).toBeInstanceOf(Struct);
|
|
98
|
-
expect(instance.toString()).toBe(
|
|
99
|
-
`DynamicClass : struct.begin\n\nstruct.end`,
|
|
100
|
-
);
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
test("reserved keyword name", () => {
|
|
104
|
-
const instance = createDynamicClassInstance("default");
|
|
105
|
-
instance.__internal__.isRoot = true;
|
|
106
|
-
|
|
107
|
-
expect(instance).toBeInstanceOf(Struct);
|
|
108
|
-
expect(instance.toString()).toBe(`default : struct.begin\n\nstruct.end`);
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
describe("fromString()", () => {
|
|
113
|
-
test("1", () => {
|
|
114
|
-
const chimeraText = new ChimeraHPFix().toString();
|
|
115
|
-
|
|
116
|
-
expect(Struct.fromString(chimeraText)[0].toString()).toBe(chimeraText);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
test("2", () => {
|
|
120
|
-
const complexStructText = `BasePhantomAttack : struct.begin {refkey=BaseAttackAbility}
|
|
121
|
-
TriggeredCooldowns : struct.begin
|
|
122
|
-
[0] : struct.begin
|
|
123
|
-
CooldownTag = Ability.Cooldown.RunAttack
|
|
124
|
-
Duration = 50
|
|
125
|
-
struct.end
|
|
126
|
-
struct.end
|
|
127
|
-
Effects : struct.begin
|
|
128
|
-
[0] : struct.begin
|
|
129
|
-
EffectPrototypeSID = MutantMediumAttackCameraShake
|
|
130
|
-
Chance = 1
|
|
131
|
-
struct.end
|
|
132
|
-
struct.end
|
|
133
|
-
struct.end`;
|
|
134
|
-
expect(Struct.fromString(complexStructText)[0].toString()).toBe(
|
|
135
|
-
complexStructText,
|
|
136
|
-
);
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
test("3", () => {
|
|
140
|
-
const dynamicItemGeneratorText = `DynamicTraderItemGenerator : struct.begin {refurl=../ItemGeneratorPrototypes.cfg;refkey=[0]}
|
|
141
|
-
SID = DynamicTraderItemGenerator
|
|
142
|
-
ItemGenerator : struct.begin
|
|
143
|
-
[0] : struct.begin
|
|
144
|
-
Category = EItemGenerationCategory::WeaponPrimary
|
|
145
|
-
PlayerRank = ERank::Newbie
|
|
146
|
-
bAllowSameCategoryGeneration = true
|
|
147
|
-
ReputationThreshold = -500
|
|
148
|
-
RefreshTime = 1h
|
|
149
|
-
PossibleItems : struct.begin
|
|
150
|
-
[0] : struct.begin
|
|
151
|
-
ItemPrototypeSID = GunMark_SP
|
|
152
|
-
Weight = 1
|
|
153
|
-
MinDurability = 0.3
|
|
154
|
-
MaxDurability = 0.6
|
|
155
|
-
AmmoMinCount = 600
|
|
156
|
-
AmmoMaxCount = 900
|
|
157
|
-
struct.end
|
|
158
|
-
struct.end
|
|
159
|
-
struct.end
|
|
160
|
-
[1] : struct.begin
|
|
161
|
-
Category = EItemGenerationCategory::BodyArmor
|
|
162
|
-
PlayerRank = ERank::Newbie
|
|
163
|
-
bAllowSameCategoryGeneration = true
|
|
164
|
-
ReputationThreshold = -500
|
|
165
|
-
RefreshTime = 1h
|
|
166
|
-
PossibleItems : struct.begin
|
|
167
|
-
[*] : struct.begin
|
|
168
|
-
ItemPrototypeSID = DutyArmor_3_U1
|
|
169
|
-
Weight = 1
|
|
170
|
-
MinDurability = 1
|
|
171
|
-
MaxDurability = 1
|
|
172
|
-
struct.end
|
|
173
|
-
struct.end
|
|
174
|
-
struct.end
|
|
175
|
-
[2] : struct.begin
|
|
176
|
-
Category = EItemGenerationCategory::WeaponPistol
|
|
177
|
-
ReputationThreshold = -500
|
|
178
|
-
bAllowSameCategoryGeneration = true
|
|
179
|
-
RefreshTime = 1h
|
|
180
|
-
PossibleItems : struct.begin
|
|
181
|
-
[0] : struct.begin
|
|
182
|
-
ItemPrototypeSID = GunAPB_HG
|
|
183
|
-
Weight = 1
|
|
184
|
-
MinDurability = 0.25
|
|
185
|
-
MaxDurability = 0.5
|
|
186
|
-
AmmoMinCount = 60
|
|
187
|
-
AmmoMaxCount = 100
|
|
188
|
-
struct.end
|
|
189
|
-
struct.end
|
|
190
|
-
struct.end
|
|
191
|
-
[3] : struct.begin
|
|
192
|
-
Category = EItemGenerationCategory::WeaponSecondary
|
|
193
|
-
PlayerRank = ERank::Veteran
|
|
194
|
-
bAllowSameCategoryGeneration = true
|
|
195
|
-
RefreshTime = 1h
|
|
196
|
-
PossibleItems : struct.begin
|
|
197
|
-
[0] : struct.begin
|
|
198
|
-
ItemPrototypeSID = GunTOZ_SG
|
|
199
|
-
Weight = 1
|
|
200
|
-
MinDurability = 0.3
|
|
201
|
-
MaxDurability = 0.6
|
|
202
|
-
AmmoMinCount = 60
|
|
203
|
-
AmmoMaxCount = 90
|
|
204
|
-
struct.end
|
|
205
|
-
struct.end
|
|
206
|
-
struct.end
|
|
207
|
-
[4] : struct.begin
|
|
208
|
-
Category = EItemGenerationCategory::Head
|
|
209
|
-
PlayerRank = ERank::Veteran
|
|
210
|
-
bAllowSameCategoryGeneration = true
|
|
211
|
-
ReputationThreshold = -500
|
|
212
|
-
RefreshTime = 1h
|
|
213
|
-
PossibleItems : struct.begin
|
|
214
|
-
[0] : struct.begin
|
|
215
|
-
ItemPrototypeSID = DutyMask_1
|
|
216
|
-
Weight = 2
|
|
217
|
-
MinDurability = 1
|
|
218
|
-
MaxDurability = 1
|
|
219
|
-
struct.end
|
|
220
|
-
struct.end
|
|
221
|
-
struct.end
|
|
222
|
-
struct.end
|
|
223
|
-
struct.end`;
|
|
224
|
-
expect(Struct.fromString(dynamicItemGeneratorText)[0].toString()).toBe(
|
|
225
|
-
dynamicItemGeneratorText,
|
|
226
|
-
);
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
test("4", () => {
|
|
230
|
-
const dynamicItemGeneratorText = `A : struct.begin
|
|
231
|
-
N1 = 0.1f
|
|
232
|
-
N2 = 1.
|
|
233
|
-
N3 = 0.f
|
|
234
|
-
N4 = .1
|
|
235
|
-
N5 = .1f
|
|
236
|
-
N6 = -2.22f
|
|
237
|
-
struct.end`;
|
|
238
|
-
const str = Struct.fromString<{ [key: `N${number}`]: number }>(
|
|
239
|
-
dynamicItemGeneratorText,
|
|
240
|
-
);
|
|
241
|
-
expect(str[0].N1).toBe(0.1);
|
|
242
|
-
expect(str[0].N2).toBe(1);
|
|
243
|
-
expect(str[0].N3).toBe(0);
|
|
244
|
-
expect(str[0].N4).toBe(0.1);
|
|
245
|
-
expect(str[0].N5).toBe(0.1);
|
|
246
|
-
expect(str[0].N6).toBe(-2.22);
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
test("5", () => {
|
|
250
|
-
const testCfg = fs.readFileSync("./test.cfg", "utf-8").trim();
|
|
251
|
-
const structs = Struct.fromString(testCfg);
|
|
252
|
-
expect(structs.map((s) => s.toString()).join("\n")).toBe(testCfg);
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
describe("fork", () => {
|
|
257
|
-
test("1", () => {
|
|
258
|
-
const a = new TradePrototype();
|
|
259
|
-
const b = a.fork() as TradePrototype;
|
|
260
|
-
|
|
261
|
-
expect(a === b).toBe(false);
|
|
262
|
-
b.TradeGenerators = new TradeGenerators().fork();
|
|
263
|
-
expect(b.toString()).toBe(
|
|
264
|
-
"TradersDontBuyWeaponsArmor : struct.begin {bpatch}\n" +
|
|
265
|
-
" TradeGenerators : struct.begin {bpatch}\n" +
|
|
266
|
-
" struct.end\n" +
|
|
267
|
-
"struct.end",
|
|
268
|
-
);
|
|
269
|
-
});
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
describe("addNode", () => {
|
|
273
|
-
test("1", () => {
|
|
274
|
-
const a = new TradePrototype().fork(true);
|
|
275
|
-
expect(a.TradeGenerators[0].BuyLimitations[0]).toBe("EItemType::Weapon");
|
|
276
|
-
expect(a.TradeGenerators[0].BuyLimitations[1]).toBe("EItemType::Armor");
|
|
277
|
-
a.TradeGenerators[0].BuyLimitations.addNode(
|
|
278
|
-
"EItemType::Artifact",
|
|
279
|
-
undefined,
|
|
280
|
-
);
|
|
281
|
-
expect(a.TradeGenerators[0].BuyLimitations[3]).toBe(
|
|
282
|
-
"EItemType::Artifact",
|
|
283
|
-
);
|
|
284
|
-
});
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
describe("forEach", () => {
|
|
288
|
-
test("1", () => {
|
|
289
|
-
const a = new TradePrototype().fork(true);
|
|
290
|
-
expect(a.TradeGenerators[0].BuyLimitations[0]).toBe("EItemType::Weapon");
|
|
291
|
-
expect(a.TradeGenerators[0].BuyLimitations[1]).toBe("EItemType::Armor");
|
|
292
|
-
a.TradeGenerators[0].BuyLimitations.forEach(([k]) => {
|
|
293
|
-
a.TradeGenerators[0].BuyLimitations[k] = "forEach" as any;
|
|
294
|
-
});
|
|
295
|
-
expect(a.TradeGenerators[0].BuyLimitations[0]).toBe("forEach");
|
|
296
|
-
expect(a.TradeGenerators[0].BuyLimitations[1]).toBe("forEach");
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
describe("filter", () => {
|
|
301
|
-
test("1", () => {
|
|
302
|
-
const a = new TradePrototype().fork(true);
|
|
303
|
-
expect(a.TradeGenerators[0].BuyLimitations[0]).toBe("EItemType::Weapon");
|
|
304
|
-
expect(a.TradeGenerators[0].BuyLimitations[1]).toBe("EItemType::Armor");
|
|
305
|
-
const b = a.TradeGenerators[0].BuyLimitations.filter(([k]) => k === "0");
|
|
306
|
-
expect(b[0]).toBe("EItemType::Weapon");
|
|
307
|
-
expect(b[1]).toBeUndefined();
|
|
308
|
-
});
|
|
309
|
-
});
|
|
310
|
-
|
|
311
|
-
describe("map", () => {
|
|
312
|
-
test("1", () => {
|
|
313
|
-
const a = new TradePrototype();
|
|
314
|
-
expect(a.TradeGenerators[0].BuyLimitations[0]).toBe("EItemType::Weapon");
|
|
315
|
-
expect(a.TradeGenerators[0].BuyLimitations[1]).toBe("EItemType::Armor");
|
|
316
|
-
const b = a.TradeGenerators[0].BuyLimitations.map(
|
|
317
|
-
([k, v]) => `${v}-mapped-${k}`,
|
|
318
|
-
);
|
|
319
|
-
expect(b[0]).toBe("EItemType::Weapon-mapped-0");
|
|
320
|
-
expect(b[1]).toBe("EItemType::Armor-mapped-1");
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
describe("clone", () => {
|
|
325
|
-
test("1", () => {
|
|
326
|
-
const a = new TradePrototype();
|
|
327
|
-
const b = a.clone() as TradePrototype;
|
|
328
|
-
|
|
329
|
-
expect(a === b).toBe(false);
|
|
330
|
-
expect(a.TradeGenerators === b.TradeGenerators).toBe(false);
|
|
331
|
-
expect(a.toString()).toBe(b.toString());
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
describe("removeNode", () => {
|
|
336
|
-
test("1", () => {
|
|
337
|
-
const a = new TradePrototype().fork(true);
|
|
338
|
-
expect(a.TradeGenerators[0].BuyLimitations[0]).toBe("EItemType::Weapon");
|
|
339
|
-
expect(a.TradeGenerators[0].BuyLimitations[1]).toBe("EItemType::Armor");
|
|
340
|
-
a.TradeGenerators[0].BuyLimitations.removeNode("0");
|
|
341
|
-
expect(a.TradeGenerators[0].BuyLimitations[0]).toBe("removenode");
|
|
342
|
-
});
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
describe("toJson", () => {
|
|
346
|
-
test("1", () => {
|
|
347
|
-
const struct = new TradePrototype();
|
|
348
|
-
expect(struct.toJson()).toEqual({
|
|
349
|
-
__internal__: {
|
|
350
|
-
rawName: "TradersDontBuyWeaponsArmor",
|
|
351
|
-
isRoot: true,
|
|
352
|
-
refurl: "../TradePrototypes.cfg",
|
|
353
|
-
refkey: 0,
|
|
354
|
-
},
|
|
355
|
-
TradeGenerators: {
|
|
356
|
-
__internal__: { rawName: "TradeGenerators", isArray: true },
|
|
357
|
-
"0": {
|
|
358
|
-
__internal__: { rawName: "0" },
|
|
359
|
-
BuyLimitations: {
|
|
360
|
-
__internal__: { rawName: "BuyLimitations", isArray: true },
|
|
361
|
-
"0": "EItemType::Weapon",
|
|
362
|
-
"1": "EItemType::Armor",
|
|
363
|
-
"2": {
|
|
364
|
-
__internal__: {
|
|
365
|
-
removenode: true,
|
|
366
|
-
},
|
|
367
|
-
},
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
},
|
|
371
|
-
});
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
test("2", () => {
|
|
375
|
-
const struct = new ChimeraHPFix();
|
|
376
|
-
expect(struct.toJson(true)).toEqual({
|
|
377
|
-
_: { w: "ChimeraHPFix", r: true, s: true },
|
|
378
|
-
MaxHP: 750,
|
|
379
|
-
});
|
|
380
|
-
});
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
describe("fromJson", () => {
|
|
384
|
-
test("1", () => {
|
|
385
|
-
const json = {
|
|
386
|
-
__internal__: { rawName: "Test", isRoot: true },
|
|
387
|
-
MeshGenerator: {
|
|
388
|
-
__internal__: { rawName: "MeshGenerator" },
|
|
389
|
-
Meshes: {
|
|
390
|
-
__internal__: { rawName: "Meshes", isArray: true },
|
|
391
|
-
"0": {
|
|
392
|
-
__internal__: { rawName: "0" },
|
|
393
|
-
MeshPath: "path/to/mesh",
|
|
394
|
-
Offset: {
|
|
395
|
-
__internal__: { rawName: "Offset" },
|
|
396
|
-
X: 0,
|
|
397
|
-
Y: 0,
|
|
398
|
-
Z: 0,
|
|
399
|
-
},
|
|
400
|
-
Rotation: {
|
|
401
|
-
__internal__: { rawName: "Rotation" },
|
|
402
|
-
Pitch: 0,
|
|
403
|
-
Yaw: 0,
|
|
404
|
-
Roll: 0,
|
|
405
|
-
},
|
|
406
|
-
},
|
|
407
|
-
},
|
|
408
|
-
},
|
|
409
|
-
};
|
|
410
|
-
const struct = Struct.fromJson(json);
|
|
411
|
-
expect(struct.toString()).toBe(`Test : struct.begin
|
|
412
|
-
MeshGenerator : struct.begin
|
|
413
|
-
Meshes : struct.begin
|
|
414
|
-
[0] : struct.begin
|
|
415
|
-
MeshPath = path/to/mesh
|
|
416
|
-
Offset : struct.begin
|
|
417
|
-
X = 0
|
|
418
|
-
Y = 0
|
|
419
|
-
Z = 0
|
|
420
|
-
struct.end
|
|
421
|
-
Rotation : struct.begin
|
|
422
|
-
Pitch = 0
|
|
423
|
-
Yaw = 0
|
|
424
|
-
Roll = 0
|
|
425
|
-
struct.end
|
|
426
|
-
struct.end
|
|
427
|
-
struct.end
|
|
428
|
-
struct.end
|
|
429
|
-
struct.end`);
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
test("2", () => {
|
|
433
|
-
const json = {
|
|
434
|
-
_: { w: "Test", r: true },
|
|
435
|
-
MeshGenerator: {
|
|
436
|
-
_: { w: "MeshGenerator" },
|
|
437
|
-
Meshes: {
|
|
438
|
-
_: { w: "Meshes", a: true },
|
|
439
|
-
"0": {
|
|
440
|
-
_: { w: "0" },
|
|
441
|
-
MeshPath: "path/to/mesh",
|
|
442
|
-
Offset: {
|
|
443
|
-
_: { w: "Offset" },
|
|
444
|
-
X: 0,
|
|
445
|
-
Y: 0,
|
|
446
|
-
Z: 0,
|
|
447
|
-
},
|
|
448
|
-
Rotation: {
|
|
449
|
-
_: { w: "Rotation" },
|
|
450
|
-
Pitch: 0,
|
|
451
|
-
Yaw: 0,
|
|
452
|
-
Roll: 0,
|
|
453
|
-
},
|
|
454
|
-
},
|
|
455
|
-
},
|
|
456
|
-
},
|
|
457
|
-
};
|
|
458
|
-
const struct = Struct.fromJson(json, true);
|
|
459
|
-
expect(struct.toString()).toBe(`Test : struct.begin
|
|
460
|
-
MeshGenerator : struct.begin
|
|
461
|
-
Meshes : struct.begin
|
|
462
|
-
[0] : struct.begin
|
|
463
|
-
MeshPath = path/to/mesh
|
|
464
|
-
Offset : struct.begin
|
|
465
|
-
X = 0
|
|
466
|
-
Y = 0
|
|
467
|
-
Z = 0
|
|
468
|
-
struct.end
|
|
469
|
-
Rotation : struct.begin
|
|
470
|
-
Pitch = 0
|
|
471
|
-
Yaw = 0
|
|
472
|
-
Roll = 0
|
|
473
|
-
struct.end
|
|
474
|
-
struct.end
|
|
475
|
-
struct.end
|
|
476
|
-
struct.end
|
|
477
|
-
struct.end`);
|
|
478
|
-
});
|
|
479
|
-
});
|
|
480
|
-
});
|
|
481
|
-
|
|
482
|
-
// noinspection JSUnusedLocalSymbols
|
|
483
|
-
const MyRank: ERank = "ERank::Experienced, ERank::Veteran, ERank::Master";
|
|
484
|
-
// noinspection BadExpressionStatementJS
|
|
485
|
-
({}) as ArmorPrototype["MeshGenerator"];
|
|
486
|
-
|
|
487
|
-
(new Struct() as QuestNodePrototypeRandom).Launchers =
|
|
488
|
-
{} as QuestNodePrototypeLaunchers;
|