-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.js
81 lines (79 loc) · 2.25 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
const fs = require("fs");
const { DcsMission, planeGroup, plane } = require("./dist");
const dcsMission = new DcsMission({
theatre: "Caucasus",
descriptionNeutralsTask: "",
descriptionRedTask: "",
descriptionBlueTask: "",
sortie: "",
descriptionText: "",
coalitions: { blue: [80] },
coalition: {
blue: {
name: "blue",
country: [
{
id: 80,
name: "CJTF Blue",
plane: {
group: [
planeGroup({
task: "CAS",
groupId: 1,
name: "Aerial-1",
x: -297153.83834764,
y: 632449.86255341,
route: {
points: [
{
alt: 2000,
type: "Turning Point",
action: "Turning Point",
alt_type: "BARO",
y: 632449.86255341,
x: -297153.83834764,
speed_locked: true,
formation_template: "",
speed: 154.16666666667,
ETA_locked: true,
task: {
id: "ComboTask",
params: {
tasks: {},
},
},
ETA: 0,
},
],
},
units: [
plane({
type: "F-16A",
onboard_num: "010",
callsign: { _1: 1, _2: 1, _3: 1, name: "Enfield11" },
y: 635588.6,
x: -292598.45714286,
name: "Aerial-1-1",
payload: {
pylons: {},
fuel: 5029,
flare: 120,
ammo_type: 1,
chaff: 240,
gun: 100,
},
speed: 123.33333333333,
unitId: 1,
}),
],
}),
],
},
},
],
},
},
});
dcsMission
.build()
.then((file) => fs.writeFileSync("example.miz", Buffer.from(file)));