-
Notifications
You must be signed in to change notification settings - Fork 2
/
Cockpit.kc
88 lines (70 loc) · 1.6 KB
/
Cockpit.kc
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
82
83
84
85
86
87
88
module KOS::Cockpit;
import KOS::Builtin unqualified;
import KOS::Math unqualified;
builtin Scalar Throttle;
// the steering values accept more types in KOS Scripts, but due to the lack of overloading,
// we're stuck with the most general ones here.
builtin Direction Steering;
builtin Scalar WheelSteering;
//// Staging
Void Stage() {
__kos [| STAGE. |]
}
//// ACTION GROUPS
builtin Boolean RCS;
builtin Boolean SAS;
builtin String SASMode;
builtin String NavMode;
builtin Boolean Abort;
builtin Boolean Gear;
builtin Boolean Brakes;
builtin Boolean Lights;
builtin Boolean AG1;
builtin Boolean AG2;
builtin Boolean AG3;
builtin Boolean AG4;
builtin Boolean AG5;
builtin Boolean AG6;
builtin Boolean AG7;
builtin Boolean AG8;
builtin Boolean AG9;
builtin Boolean AG10;
//// KOS "fake" Action groups
builtin Boolean Legs;
builtin Boolean Chutes;
builtin Boolean ChutesSafe;
builtin Boolean Panels;
builtin Boolean Radiators;
builtin Boolean Ladders;
builtin Boolean Bays;
builtin Boolean DeployDrills;
builtin Boolean Drills;
builtin Boolean FuelCells;
builtin Boolean ISRU;
builtin Boolean Intakes;
//// Targets
builtin private Structure TargetImpl "Target";
Void SetTargetByName(String tgt) {
TargetImpl = tgt;
}
// TODO: uncomment target setters and getters
/*
Void SetTargetShip(Ship ship) {
cast<Ship>(Target) = ship;
}
Void SetTargetBody(Body body) {
cast<Body>(Target) = body;
}
Void SetTargetPart(Part part) {
cast<Part>(Target) = part;
}
Ship GetTargetShip() {
return cast<Ship>(Target);
}
Body GetTargetBody() {
return cast<Body>(Target);
}
Part GetTargetPart() {
return cast<Part>(Target);
}
*/