/* called by: entrance ctrl of the object 'track'
* E+ w! `+ U6 Y, e P*/
) s K$ v2 {' m3 Xis
7 ]/ w! m& j6 C. Y6 |9 Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ]1 ]" l3 s0 x* `
do9 |' @4 u0 Q, C' }7 U% E# F
Lan := rootfolder.Internal.Tools.AOLlanguage;4 Y Z( H* D' f" ~ o/ d
if current = @.Destination -- else return
/ W1 l) |2 w" v then9 s+ U* C+ v2 w
@.Destination := void;
8 y" q9 W/ v# E/ T% z7 y4 K if @.occupied then/ o9 g. _- h1 ]) S$ K
part := @.cont;
; |& U& b2 Q4 y6 q @.transpOrder := void;" x1 ~- A7 l- u9 A8 L, X9 z4 B& y9 @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 m$ e! ?( J W8 Q, J) O
@,root.eventcontroller.simTime);, ], ^ J7 P0 w8 X8 \$ I" g
@.HasOrder := false;- b: F% v9 G# y( C+ _- x' |" V
@.DrivingHome := true;0 h" _1 q4 E% ]: G, z- ?3 ]
rgManager.tryToStartTransOrder;
, W1 P2 U/ f$ R if @.Destination = void3 b( ?6 [6 \/ A1 t( E
then -- no transport order for vehicle @
5 ?0 h0 }) g5 Z/ P3 V ~ @.Destination :=. ]& [/ a) X4 e- l: s
rgManager.nearestFreeStation(@,track.~);: p/ b r3 B8 G" D6 C( c8 W r
newDirection(@); 3 T. H' t# ^1 `- w9 f
if @.Destination /= void then5 [) s. n: L" f3 ?
@.Destination.NumReservation :=
5 ]2 P! w6 t) `' M' p h+ f' [ @.Destination.NumReservation + 1;- f, I6 R2 H6 _/ X
end;- ~0 W" G, \2 z; T, T" T/ S
@.CurrIcon := "drivingHome";& _/ [4 ~+ z5 R& W m: M2 ~3 A
@.DrivingHome := true;
( w* O! b/ l. A) |/ d% r$ B end;, G( M% ]: D9 C- G& K; X4 Z$ L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station Y* Q- R, N+ t. E' j
part := @.transpOrder;% D+ N9 P! f, F9 n
part.move(@);-- load part, Q$ X$ ], O. P7 d, h3 f- R' F3 v
@.CurrIcon := "load";+ P- S3 D* H, W' z4 `* e
GlobalDistObj := part.globDestination;
3 ^9 j" W8 M$ {, V# I' J+ n assignLObj := rgmanager.rgAssignL;! K: G# v# i( f# Y/ O5 Q3 x8 }
row := assignLObj.getRowNo(GlobalDistObj);
. m I) ]) |5 W* q- G5 C7 b if Row = -1 then -- since 708 k2 U3 s) h: E) `
if lan=1 then5 w5 [- a% ]+ o6 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ l% R" j3 E8 V' A2 ]0 Q to_str("in der Andockstation: \"",?.~.name,"\""));
9 Q. F" ~5 _2 s# N0 t) }- X8 u( \8 @ else
% C- C3 X$ s: J6 H7 x- a) m, q, l. r: U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- {. B2 R$ x: x. s- l to_str("in docking station: \"",?.~.name,"\"")); ! l+ y; k( h5 g) ?
end;1 ~4 S' h, v {7 ?
else* P( `* j( }) r" l, ^
@.Destination := assignLObj[1,row];
2 \ y4 |' Q/ m+ F4 S% k8 @8 D end;
9 k! R l$ P/ l" Q& a1 G0 ?. ^% F" C newDirection(@);
+ h+ P2 }! G p0 q0 r% t, G @.HasOrder := true;
4 ]9 L0 H9 U) v end;/ j8 b) h' P% j: ?$ R. {
end;
! }& w9 x3 d# @( ]# v( lend; -- of the method
. V- W( ^, |, M# ~0 S9 g |