Merge branch 'master' of git://gitorious.org/fg/fgdata
This commit is contained in:
commit
f13dbaf558
1 changed files with 21 additions and 0 deletions
|
@ -283,6 +283,27 @@ var request = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var request_random = func {
|
||||||
|
var tanker = values(Tanker.active);
|
||||||
|
if (size(tanker))
|
||||||
|
return tanker[0].identify();
|
||||||
|
|
||||||
|
var type = props.globals.getNode("systems/refuel", 1).getChildren("type");
|
||||||
|
if (!size(type))
|
||||||
|
return;
|
||||||
|
type = type[rand() * size(type)].getValue();
|
||||||
|
|
||||||
|
var (aiid, callsign, tacanid) =_= identity.get();
|
||||||
|
var hdg = rand() * 360;
|
||||||
|
var course = rand() * 360;
|
||||||
|
var dist = 6000 + rand() * 4000;
|
||||||
|
var alt = int(10 + rand() * 15) * 1000; # FL100--FL250
|
||||||
|
alt = skip_cloud_layer(alt * FT2M);
|
||||||
|
var coord = geo.aircraft_position().apply_course_distance(course, dist).set_alt(alt);
|
||||||
|
Tanker.new(aiid, callsign, tacanid, type, 250, hdg, coord);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var report = func {
|
var report = func {
|
||||||
var tanker = values(Tanker.active);
|
var tanker = values(Tanker.active);
|
||||||
if (size(tanker))
|
if (size(tanker))
|
||||||
|
|
Loading…
Reference in a new issue