/* called by:        entrance ctrl of the object 'track'. j2 `$ |: [+ k 
*/ 
. j; l; V3 @4 S. q9 yis9 l$ D. k5 ?7 \! f- X 
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;" z" w/ S6 c  X8 e0 ? 
do! `' \! x$ W$ a$ Y0 r 
        Lan := rootfolder.Internal.Tools.AOLlanguage;1 ~1 K* N4 ^6 ?& K  B) }9 _0 e 
        if current = @.Destination -- else return 
% d2 S( u3 A8 l( ~7 D/ s" D7 @        then 
  \6 o+ W" r2 k" |' D+ {                @.Destination := void; 
0 }: B$ V2 x( ?  i* j: f                if @.occupied then# `. x$ R$ B; a( O" e 
                        part := @.cont;+ N! j# e! ^4 E) U7 x% a 
                        @.transpOrder := void;& m' C4 @7 {9 C 
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, 
6 R  q0 |8 e1 r                                @,root.eventcontroller.simTime); 
, @6 W: R; q; R# G                        @.HasOrder := false; 
7 r% |0 @2 D! j  b! B                        @.DrivingHome := true; 
$ B1 x* D7 h9 j                        rgManager.tryToStartTransOrder;' l9 W8 m% r' ^; E5 r 
                        if @.Destination = void1 V8 `0 W2 p$ g+ \. ~1 [7 R 
                        then -- no transport order for vehicle @ 
2 ~6 h' U' Q" Z/ G                                @.Destination :=/ P* A6 q  L  `! R* S, G 
                                rgManager.nearestFreeStation(@,track.~); 
, j5 V4 o/ U( B$ c" f                                newDirection(@);   * J* R# d% f) w3 ^7 V" K7 k 
                                if @.Destination /= void then" C- p- _; x- `" L2 Q 
                                        @.Destination.NumReservation :=& E% k9 t! @& G$ m6 g3 b 
                                        @.Destination.NumReservation + 1; 
1 J) R/ @0 ]  J' h. _7 U6 R                                end;$ s% g+ A+ W. v* r& v" H# E 
                                @.CurrIcon := "drivingHome";0 y9 {" \1 L. L2 w. o, [ 
                                @.DrivingHome := true;) P2 k! E1 N2 Y, K% D! { 
                        end;+ M, O+ g$ T' t) y, e, U2 w 
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station 
# q* f3 a5 I) M                        part := @.transpOrder; 
4 ~; U5 R" D) G% z3 f  C/ Q                        part.move(@);-- load part, H5 Z( b' b: k, ]8 a! C 
                        @.CurrIcon := "load"; 
4 @$ x) w; z, d  T2 _& j                        GlobalDistObj := part.globDestination;! c- d+ L' p8 s% b' t& u 
                        assignLObj := rgmanager.rgAssignL;3 n' j2 y8 f7 d% q 
                        row := assignLObj.getRowNo(GlobalDistObj);3 u! W) q; s# m  Z0 P5 H6 r' M 
                        if Row = -1 then -- since 70 
! b/ R$ ~2 d# r5 V$ l( h# Y# u9 `                                if lan=1 then 
, _2 S" v; R+ N  I+ ?/ D( K                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), 
) u- `5 Q3 f3 a4 t: M  F& c                                                to_str("in der Andockstation: \"",?.~.name,"\"")); 
( f: _7 ~# b& p2 e8 C                                else 
' ?, x+ f, g" ~+ e                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),  H, ~' t( x% t 
                                                to_str("in docking station: \"",?.~.name,"\""));                                 
& h  ^4 `% M5 f9 y* o! {                                end;! j0 U( h, P* U8 @7 t 
                        else* ], |1 S3 r% V# o6 P( [5 F* f 
                                @.Destination := assignLObj[1,row]; 
( }' n6 {0 O" d6 S$ u  P                        end;                        4 M* k5 B/ o: [9 l4 `5 C  J2 K- U- M 
                        newDirection(@);$ ~5 d0 V; k% J# y8 I, W: B 
                        @.HasOrder := true;! U/ s0 H- @9 Q+ w( d 
                end;4 a( J; B4 `. u+ X# D" u 
        end; 
5 [) L0 N( p- o: g, xend;        -- of the method4 c3 Q0 S4 w" y3 I+ I/ v; n2 m! f 
 |