/* called by: entrance ctrl of the object 'track'
$ a" f: y( ]0 L6 I*/
& G$ F3 [/ s$ C1 @is
/ J/ u. f3 w7 Z2 \/ `% l8 I part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ E; k: `: s8 b0 @$ [& ]do
, N, i1 n( G1 I8 R' W Lan := rootfolder.Internal.Tools.AOLlanguage;9 r6 p- {. k% I# A h2 U
if current = @.Destination -- else return: R- y2 e9 k0 A8 ^
then5 C g: [. l& K+ r6 w3 G% \
@.Destination := void;% R9 {: U! I" \( v
if @.occupied then) S: L; u& F" i5 K7 B4 `
part := @.cont;
2 e6 j9 Y$ J) u" U! ~" ~' ~7 Y @.transpOrder := void;
& M3 }+ f1 m8 Q# o0 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ Z$ R# B5 S/ r, d3 }) a* } @,root.eventcontroller.simTime);
" n# d& c1 ?* p8 J3 L8 \ @.HasOrder := false;
( q3 n, L1 F( |7 ?, r- B' ? @.DrivingHome := true;
; S, V' T9 n+ u9 n! ]" Z rgManager.tryToStartTransOrder;0 P6 n1 H8 S0 s, h; U, G
if @.Destination = void+ _; ]1 _0 L1 t% K _$ }( o6 V
then -- no transport order for vehicle @
$ T: s$ z! o7 ?: P- U! ^ @.Destination :=, k3 F& W0 m2 a k3 e! o
rgManager.nearestFreeStation(@,track.~);
" ?5 k7 h: a* A$ }3 m) {) z& |5 d newDirection(@);
' Q4 ]+ O" U9 v2 G if @.Destination /= void then
, ]4 y5 R& {( a0 q: B9 p: a @.Destination.NumReservation :=
5 h \0 K2 O* t1 H5 P5 w; I' Y @.Destination.NumReservation + 1;
( M0 z+ p; s% `' ]( | end;- [6 y) T' W& W; B" Y" A
@.CurrIcon := "drivingHome";
" { T9 k, V+ r$ j1 l$ P @.DrivingHome := true;
0 k" ?1 r2 y4 {) A- v9 P end;
, T. N/ I y1 E% p8 K7 f |3 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% Y3 r7 m4 V1 x$ s1 d, c1 V part := @.transpOrder;
8 M9 x! B0 _/ J: R5 c part.move(@);-- load part
8 }4 ?/ {' g# |! H @.CurrIcon := "load";# n j1 {- J- X
GlobalDistObj := part.globDestination;
1 W- J* H$ S& t" h, ? assignLObj := rgmanager.rgAssignL;
# e# W% I6 e; V row := assignLObj.getRowNo(GlobalDistObj);
: a$ a" [3 c4 {& T9 K( r if Row = -1 then -- since 70. d0 w/ k$ y: z. f/ \' z P
if lan=1 then
) X6 B- O3 `/ F9 M7 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ J8 T- c+ Q I m to_str("in der Andockstation: \"",?.~.name,"\""));
' R* g+ ^$ ~% R5 E4 I/ e else
$ Y. x) \2 B8 S' R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) R/ ]* F+ o6 z: ? to_str("in docking station: \"",?.~.name,"\"")); . y) r5 B L ]4 u9 N
end;
) I: |3 M2 r- b6 ? else
6 l5 M. s" `' ^$ i5 W, T @.Destination := assignLObj[1,row];, h8 ?, N) i/ }$ E$ g( I
end; 8 G: z5 j; _ W, n: ^! w" F
newDirection(@);4 S5 B( E1 R1 t' U$ S( h
@.HasOrder := true;
9 X' B2 E9 j+ B7 B3 ?6 A" E end;
; Q) v4 V# |3 Z9 r$ \: P end;5 o6 A5 [6 Q: w( C5 u2 D+ k6 B9 {% r& S
end; -- of the method
8 H9 @: p* x6 `; n, [- w |