/* called by: entrance ctrl of the object 'track', @$ r* U( b! _6 k) E
*/
' Y2 z" P9 X9 ~$ `3 Z6 k; Iis+ a/ G9 w, p( M4 { H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
H& ]+ {- x% G kdo% {; R' ]# V. e/ P& }; n
Lan := rootfolder.Internal.Tools.AOLlanguage;
C+ x( y- p' k0 H8 s& ?; {, a if current = @.Destination -- else return
3 ]1 K: }( F! [( A2 @# i then
: A e: [ r' O @.Destination := void;7 a4 Q* q) E: i
if @.occupied then
2 h/ P8 l9 s2 M8 p6 [: Q" h part := @.cont;% U6 k) K4 j2 }' O3 y
@.transpOrder := void;
( `( N/ L9 ], z- | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 n6 h7 l) T7 g r+ ^% B
@,root.eventcontroller.simTime);
( ^5 r5 `" t" l' W @.HasOrder := false;
5 R- [. ^! Q$ _5 Q4 l @.DrivingHome := true;
2 ?) w$ b4 h; \& [ rgManager.tryToStartTransOrder;" n. }' A* M {0 Q
if @.Destination = void& |7 N' @5 i+ C% r
then -- no transport order for vehicle @
* I6 H* `6 }# t* O+ ^5 o& z4 n @.Destination :=
& N3 b. \7 T5 m+ W: ` rgManager.nearestFreeStation(@,track.~);
- Z9 g$ M2 z7 i& O( N newDirection(@);
2 g$ \) V9 C; C! B. d if @.Destination /= void then
7 R/ J, v H: o! h6 r3 ^ @.Destination.NumReservation :=
6 U4 e+ u! y( N5 m- B @.Destination.NumReservation + 1;* ~1 ~- e4 u0 q
end;( H/ w$ ~0 U: k) |: P) Q& w
@.CurrIcon := "drivingHome";
. @9 \3 A. E0 E5 y0 ]7 g; `* k @.DrivingHome := true;
`' r Z! j9 i8 G K end;+ b: U) q( i0 E. t8 R1 [9 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ W. |, T8 d) T# a p# ? part := @.transpOrder;
6 ]% S9 r5 ]9 f part.move(@);-- load part
* W0 M. J5 |" ]0 F" I+ z, C; b @.CurrIcon := "load";+ t! J9 n- u+ W) }# J) w w
GlobalDistObj := part.globDestination;- Z/ |, z$ p/ K3 Z, j8 p, n
assignLObj := rgmanager.rgAssignL;
0 K: V, O; E! R \( n row := assignLObj.getRowNo(GlobalDistObj);
% w7 m4 U% L4 d if Row = -1 then -- since 70
3 \! R. v1 X) f if lan=1 then
5 [2 p1 F7 R5 ~) W1 t) Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& Y$ T, l3 H' r; a2 ?5 i to_str("in der Andockstation: \"",?.~.name,"\""));
5 H# j+ C" ^& U else
' t D! I* f, i4 v* O+ U( C) A, d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Z+ U' |. q1 ^; ] to_str("in docking station: \"",?.~.name,"\"")); $ G/ a! [* P+ e! g
end;4 k+ ~( e. ^- H9 o, l! l9 H
else1 d$ O3 v% `$ [3 k! b* k1 b( t
@.Destination := assignLObj[1,row];) C7 B1 b9 f( l6 ?
end;
9 p E# X/ z3 x: m. Y/ k X* @ newDirection(@);8 B1 s5 h, [# [# v
@.HasOrder := true;
/ [/ k' Q0 q) z O6 z& J- z. r+ J end;. U! u7 D! q+ [4 ~
end;" d3 P6 X) B$ S) B
end; -- of the method
+ q$ Z$ z0 [( |# U |