/* called by: entrance ctrl of the object 'track'% S3 S. j* ]7 b6 S
*/
" D' ^* M6 o5 k' W+ H" Nis j' r j! a% x8 c: w z! _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! N+ a5 E* I4 _) u7 w/ X) | P/ l
do
6 t+ A( N$ P6 T, a1 J, o( q Lan := rootfolder.Internal.Tools.AOLlanguage;
/ _7 n% T S! f6 p/ b! w! X' R- F8 y" _ if current = @.Destination -- else return
3 ?" Z5 a4 v4 Y. B Z9 d then: u( B+ H$ ] Y1 k h4 k1 ?' Y4 w; r
@.Destination := void;# T5 [* f% j8 a% f
if @.occupied then; X9 n; z9 y: Z
part := @.cont;
! j1 p/ _; L4 J) v" o5 Q1 Z @.transpOrder := void;% q7 }: @4 Z+ F# A$ l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: P# f$ S! z: r @,root.eventcontroller.simTime);5 Y5 _* y) U4 U4 I+ |4 g7 s, Z
@.HasOrder := false;
4 R' g7 u3 o: | @.DrivingHome := true;
! [3 Y7 n% ~! L1 D* o- D rgManager.tryToStartTransOrder;' C2 |9 [* \5 ~1 s
if @.Destination = void
; ], R8 ~$ W$ K |5 O then -- no transport order for vehicle @
5 H# `( }. m, u- ?; c3 k @.Destination :=
9 l6 ?* V/ Q0 Y& }+ c- L rgManager.nearestFreeStation(@,track.~);
/ z/ B U( H) J% N newDirection(@); - x+ q0 n5 q( U) B2 F
if @.Destination /= void then/ l3 J$ n/ j9 b2 ?' ]
@.Destination.NumReservation :=' O5 c6 J5 Y5 X9 c# y# w
@.Destination.NumReservation + 1;
' b# n# W5 z; ~, p: r2 {0 B end;
4 t. K0 N6 E5 f5 x H) ?1 I# ?1 { @.CurrIcon := "drivingHome";
1 D, X0 l4 B7 z( O9 Y- \ @.DrivingHome := true;# j( x0 t; q! i. E' i5 x- G+ |
end;0 y h( M; ~6 `% V5 r$ F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. ^4 |% S2 r6 O
part := @.transpOrder;& A4 `) S1 }6 `
part.move(@);-- load part
" x5 l; _! h3 p# N- } @.CurrIcon := "load";
3 l1 l: d5 h6 O- j GlobalDistObj := part.globDestination;# R( a: t6 {8 v" v# n# H2 `' h: p
assignLObj := rgmanager.rgAssignL;
$ g: d& o. V H) | row := assignLObj.getRowNo(GlobalDistObj);0 R6 `8 j4 U7 y3 l
if Row = -1 then -- since 709 k5 }$ \7 W1 ]* d/ C
if lan=1 then
1 A; W( U' G! O- [8 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- w2 t* O% L2 d4 t6 s4 Z# g9 _( Q" a to_str("in der Andockstation: \"",?.~.name,"\""));; r4 d& V% L4 O4 F
else+ c0 f3 a% y% M3 k: ^! T6 Q6 ^$ `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 x2 E& \; m! X, l7 }: y
to_str("in docking station: \"",?.~.name,"\"")); 0 e( X% P R3 N& b6 K& i1 Q% Q
end;7 V( Z) ?/ y, i: Y% M" v& H1 o
else# o! H: o0 A p2 P' f6 F
@.Destination := assignLObj[1,row];+ [6 @5 J9 C9 \) O9 m
end;
$ N& c l) ^7 @3 l7 M) h newDirection(@);
9 f7 _9 K; L/ n7 H6 } @.HasOrder := true;% A$ E& H3 F# h% a, M' O2 y, F1 Z
end;- n$ |( P6 H' G/ l) b1 q& ~* L
end;! {6 d/ b% V* F. T
end; -- of the method
! \$ C) W1 x8 R9 w, ~ |