/* called by: entrance ctrl of the object 'track'+ q! ~1 ]3 P( c$ W% y& N5 J. g
*/: m0 }7 R* o' s G
is! z( x* `- d/ c! t) P# u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 C/ e) |% Y( ^# S4 k" Edo0 J t' x, Y; V& {0 ?! @% ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ X8 N; o$ f9 _; c+ ~# @ if current = @.Destination -- else return
3 w' |: p! }+ Q0 B then( }7 d+ d" R2 }8 ]2 G- e2 b. x
@.Destination := void;' L$ w# G, X% }$ b' Q9 x
if @.occupied then
" i4 [, v" i1 C part := @.cont;
$ x+ }1 A4 ?+ M) _+ G" E- K" | @.transpOrder := void;" q9 |7 J7 f) n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" n) k2 D9 i U m; l @,root.eventcontroller.simTime);
. Y: K k( C7 `* [0 X4 _ @.HasOrder := false;
7 B: V1 v0 T& O, }( Y @.DrivingHome := true;5 k' `; n! C4 V
rgManager.tryToStartTransOrder; K7 F% X; j) q
if @.Destination = void
$ s/ t0 B+ T. V$ v( U then -- no transport order for vehicle @
/ U7 T0 h) p i2 @: }+ n @.Destination :=
% M4 P' l: \! k3 s+ n# Q: l rgManager.nearestFreeStation(@,track.~);
; ^7 d# c0 g' ` newDirection(@); + M/ c1 T/ Y9 E3 |5 A7 X
if @.Destination /= void then0 S3 S- o4 p% y- J' J
@.Destination.NumReservation :=3 A: C9 z# |6 G2 X9 v! Q
@.Destination.NumReservation + 1;
( Q }/ G$ n# f9 V# l) k+ w, y0 ^ end;
. w4 t& i0 c$ t @.CurrIcon := "drivingHome";
0 E) R! b4 _6 h( g% h0 Y @.DrivingHome := true;
- r/ i0 J" y% f end;
' D5 ?1 Q/ P. a6 R r( i @, s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 H% ]- w- Q! w& y2 g* U part := @.transpOrder;
& ^! z2 Q& e8 x$ h- g. V: t( N5 t' x M part.move(@);-- load part
' H. g0 b9 s( K$ G1 | @.CurrIcon := "load";6 e+ j# |, p. A
GlobalDistObj := part.globDestination;- Y9 I0 Q8 W/ V% F1 m4 K
assignLObj := rgmanager.rgAssignL;& x: ~2 v; K% j# X
row := assignLObj.getRowNo(GlobalDistObj);
: W( m* G3 ^7 `8 H$ [9 g* M if Row = -1 then -- since 70
) \ Z a7 z& S if lan=1 then P2 x$ z0 F2 O. ~1 E# u7 n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 P% L$ V; M8 O0 M8 _4 ~6 f9 P$ X to_str("in der Andockstation: \"",?.~.name,"\""));( B# p- \" B( \6 D3 c1 `
else
9 X! q8 v( e6 }# z$ q& e: c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 k: a% j3 o9 _
to_str("in docking station: \"",?.~.name,"\""));
' |" v2 s; v3 ^3 S+ k# S3 d end;
+ ?& v& m- c0 | M else
+ S U2 w% B- [- ~) ] @.Destination := assignLObj[1,row];
: L( ?1 T5 h/ a+ Q% K- ] end; 5 I/ C6 o( H( C, F
newDirection(@);6 G( O1 M% p4 i0 _8 O. a
@.HasOrder := true;
0 K G0 g% ^4 A end;
4 P! ?& V, z' N+ h4 a2 w end;! S! s) e9 r% |# P0 V
end; -- of the method. k- D! y" [, z6 A. x
|