2009-05-04 10:58:27 +00:00
|
|
|
# Pushback
|
2009-05-04 21:40:08 +00:00
|
|
|
# =============================================================================
|
|
|
|
# Creates an object to move the pushback to or out of the towing position.
|
|
|
|
# Needs /sim/model/pushback to exist in order to be executed.
|
2009-05-04 10:58:27 +00:00
|
|
|
|
2009-05-04 21:40:08 +00:00
|
|
|
var tractor = nil;
|
2009-05-04 10:58:27 +00:00
|
|
|
|
2009-05-04 21:40:08 +00:00
|
|
|
var tractor_init = func() {
|
|
|
|
var pushback_node = props.globals.getNode("sim/model/pushback");
|
|
|
|
if (pushback_node != nil) {
|
|
|
|
tractor = aircraft.door.new("sim/model/pushback", 10.0);
|
|
|
|
}
|
2009-05-04 10:58:27 +00:00
|
|
|
}
|
2009-05-04 21:40:08 +00:00
|
|
|
|
2009-05-04 10:58:27 +00:00
|
|
|
|
2009-05-04 21:40:08 +00:00
|
|
|
var tractor_connect = func() {
|
|
|
|
tractor.toggle();
|
|
|
|
}
|
2009-05-04 10:58:27 +00:00
|
|
|
|
2009-05-04 21:40:08 +00:00
|
|
|
_setlistener("/sim/signals/nasal-dir-initialized", func { tractor_init() });
|