/* called by: entrance ctrl of the object 'track') W2 |( X0 @5 ^- B( t
*/
$ P+ E6 D: O7 ]: @2 Fis" R. _' A" a, G' D& F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ i! o" n6 j0 ?1 qdo' y' X T2 C# m- }" ]% O5 m; o
Lan := rootfolder.Internal.Tools.AOLlanguage;1 u. e$ m# ?1 L3 ^7 W( p' Q
if current = @.Destination -- else return
7 H( d3 l5 ~, o: |; ? then% V+ E. z9 l+ j; P, Q
@.Destination := void;' V. p& [5 D9 ~& F
if @.occupied then
6 k) `: q) t! L# T. @ u part := @.cont;
o3 P- j- Y' T+ W( S @.transpOrder := void;( x: q( W9 ?' X) x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 U2 c1 ]2 F1 u5 Q- x1 Z* y @,root.eventcontroller.simTime);9 k5 P7 z9 G9 D& c
@.HasOrder := false;
7 E# { Y1 e& y- c! U, y- o @.DrivingHome := true;- U# q* V+ E& a# y2 k* n& _$ l
rgManager.tryToStartTransOrder;/ F$ g+ w$ l8 n: N* Z7 U
if @.Destination = void/ O- B+ E. _. {! \$ ]
then -- no transport order for vehicle @
3 n' h5 L y. n: [7 E @.Destination :=
" G' U# G- h; {3 H2 m" V rgManager.nearestFreeStation(@,track.~);
9 P; Z% F: y+ Q+ } newDirection(@); * ] ]: q6 H! @* a- ?
if @.Destination /= void then
! F- B7 s$ q/ y" {8 s! O& C @.Destination.NumReservation :=
( K) g0 A/ G9 j5 T @.Destination.NumReservation + 1;
$ m9 w: n2 M9 p* X5 p8 e end;
! S, X4 D( |$ |4 {# b( | @.CurrIcon := "drivingHome";
! l5 E# U7 d t @.DrivingHome := true;
/ i! z8 Q9 J/ h' d. d4 u6 @8 u9 [/ t7 Q5 w end;
% g" g8 ?* E! G9 Z# { else -- the vehicle @ is empty, both vehicle and part are in the same dock station, H4 i7 X0 S+ e' s3 ^
part := @.transpOrder;1 V2 a% f, v# b4 c- @
part.move(@);-- load part1 }3 N: |: F$ C3 O' p) v! k- A
@.CurrIcon := "load";# x+ d0 c. i0 ` |, w
GlobalDistObj := part.globDestination;
( ~% Q! C: p# ` assignLObj := rgmanager.rgAssignL;
7 J; J. L- n4 Z! M( h; } row := assignLObj.getRowNo(GlobalDistObj);
& F7 p) u7 ?+ Y if Row = -1 then -- since 70
7 j# ~4 S9 f$ j3 i1 L' C6 } if lan=1 then) C" S* M: \# d7 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( j: F1 G9 r0 w" M p0 }' k
to_str("in der Andockstation: \"",?.~.name,"\""));6 y6 x% m! W$ j
else
( a; q" O. H8 X8 K. g, v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ Y$ y8 [$ D" n9 g" E$ f3 z, }! C u i to_str("in docking station: \"",?.~.name,"\""));
0 _% u6 c* ~5 X0 I" U end;
7 X& Q. p( D. D/ F. ? else
8 y! E3 P+ K- c, N" r; P" i @.Destination := assignLObj[1,row];
& D$ ?' I! {' A/ k, I. I, G3 e! W end;
/ @! K" C' Y$ E" b8 h newDirection(@);9 Y, ?, Y1 m5 |( A1 \* v( t( ?* @/ D
@.HasOrder := true;
- N# i: l' B t* H+ E) d; J' \ end;
A* M6 S2 Y4 \0 {7 a end;
. W' p4 C+ m( Q( u# i( o7 Eend; -- of the method
8 g. M, c$ W4 ^( G* e! x+ g! P; q |