-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaddon-main.nas
More file actions
29 lines (21 loc) · 986 Bytes
/
addon-main.nas
File metadata and controls
29 lines (21 loc) · 986 Bytes
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
var main = func( root ) {
# logger defines global instance "logging"
io.load_nasal(root.basePath ~ "/Nasal/groundservices/logger.nas","groundservices");
var files =
['main.nas','maintest.nas','util.nas','GroundVehicle.nas','GroundService.nas','Groundnet.nas','Graph.nas',
'mathutil.nas','GroundServiceVisualizer.nas', 'GraphUtils.nas'];
foreach (f;files) {
io.load_nasal(root.basePath ~ "/Nasal/groundservices/" ~ f,"groundservices");
}
groundservices.root = root.basePath;
groundservices.reinit();
setlistener("/sim/signals/reinit", func() {
#reinit also performs shutdown if required
groundservices.reinit();
});
setlistener("/sim/signals/exit", func() {
#nothing to do
});
#TODO proper setup/cleanup as described in http://wiki.flightgear.org/Addons
printlog("alert","GroundServices addon initialized from path", root.basePath );
}