var door = aircraft.door.new("/services/deicing_truck/crane", 20);
var door3 = aircraft.door.new("/services/deicing_truck/deicing", 20);
var ground_services = {
init : func {
me.UPDATE_INTERVAL = 0.1;
me.loopid = 0;
me.ice_time = 0;
# Catering Truck
setprop("/services/catering/scissor-deg", 0);
setprop("/services/catering/position-norm", 0);
# De-icing Truck
setprop("/services/deicing_truck/enable", 0);
setprop("/services/deicing_truck/de-ice", 0);
# Set them all to 0 if the aircraft is not stationary
if (getprop("/velocities/groundspeed-kt") > 10) {
setprop("/services/chokes/nose", 0);
setprop("/services/chokes/left", 0);
setprop("/services/chokes/right", 0);
setprop("/services/fuel-truck/enable", 0);
setprop("/services/ext-pwr/enable", 0);
setprop("/services/deicing_truck/enable", 0);
setprop("/services/catering/enable", 0);
}
me.reset();
},
update : func {
# Chokes and Parking Brakes Control
# if ((getprop("/services/chokes/nose") == 1) or (getprop("/services/chokes/left") == 1) or (getprop("/services/chokes/right") == 1) or (getprop("/controls/parking-brake") == 1))
# setprop("/controls/gear/brake-parking", 1);
# else
# setprop("/controls/gear/brake-parking", 0);
# Catering Truck Controls
var cater_pos = getprop("/services/catering/position-norm");