/* called by: entrance ctrl of the object 'track'
2 {2 s/ \. v4 j*/
q: H+ M- U- @2 nis9 v7 Y9 T! l a J9 s7 c- F& {) l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 U+ M0 [8 i- F9 ^+ d- W" vdo7 ^- r* a% \( [! W
Lan := rootfolder.Internal.Tools.AOLlanguage;8 a2 ^) I% B% v9 ?1 |3 t
if current = @.Destination -- else return8 l. F8 @- I( {, w
then
' i" z- T: \8 g/ W$ D @.Destination := void;
& M$ l/ V0 ~: y- F+ `, A0 N) s if @.occupied then
0 @. m& {/ l& T1 G& n part := @.cont;
6 V% u" G+ t2 l- t1 O2 L/ o+ _; H @.transpOrder := void;9 M* t$ S* h4 v0 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& R, i \& G5 O' o$ w! |3 ~ @,root.eventcontroller.simTime);$ f( M6 D# S( R6 r2 W
@.HasOrder := false;
1 W5 V& Z3 _) L h7 R& s @.DrivingHome := true;
I! R1 k: r0 u rgManager.tryToStartTransOrder;( U# ~/ k# f1 f) K; B3 k
if @.Destination = void
; i/ r( b3 j; Q) P9 E2 q+ [ then -- no transport order for vehicle @
9 z: E% }( J8 `# R0 h; e @.Destination :=7 j3 g/ I' P( R% I* M& L ?
rgManager.nearestFreeStation(@,track.~);. ]" {' q9 ?5 L# j- T' y. B8 E$ e
newDirection(@);
' n: T% `5 _( Q+ e+ `0 ?( b4 l if @.Destination /= void then
# S+ f# j$ k4 i/ c4 Z" z: h7 l @.Destination.NumReservation :=
) u5 s7 h( X# `- m7 Y; f( v @.Destination.NumReservation + 1;1 _( j0 f3 g2 k5 S5 Z& u4 C
end;8 x, e' F5 U- x$ k5 |1 B
@.CurrIcon := "drivingHome";
1 h Y# e4 S% q+ H+ ^* y4 W" p6 H @.DrivingHome := true;
3 K4 O! ^# p0 | end;
! S% m! L9 I& ?) e% h8 ], P. R else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 A. H" U+ {( {% j, {
part := @.transpOrder;
3 C& ~3 b8 o J" F7 m4 Q part.move(@);-- load part
5 o& f# _2 S2 D, G; x0 Q, R: i @.CurrIcon := "load";2 u3 C) X/ b f' l6 n% v' Y
GlobalDistObj := part.globDestination;* e: v* \5 Z0 U! E
assignLObj := rgmanager.rgAssignL;" C& z: H; P0 t. z% O" @9 `2 c0 N# A
row := assignLObj.getRowNo(GlobalDistObj);. ?# G( k( V1 L6 K7 [
if Row = -1 then -- since 70
& O# V {1 w9 f8 R1 ^- Y if lan=1 then
! g) Z5 A' [2 ]) f: l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# X+ \* s, e# k; X( W5 r to_str("in der Andockstation: \"",?.~.name,"\""));8 w' h1 V% b. K# s/ I) Z5 ^0 ]
else
1 ]) q! C8 ~2 ?8 y9 h# ]& v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- f+ k& p2 F9 U to_str("in docking station: \"",?.~.name,"\""));
0 x4 e1 v8 @9 [' ^( [ end;
1 e8 q2 C" n* _ else0 x' K1 m, v* {* M+ ~5 r
@.Destination := assignLObj[1,row];: E2 p7 ^, F" `5 r' _
end; 5 Y- X0 U8 s0 _' M* M& m! y
newDirection(@);, N, H7 `( ?; a
@.HasOrder := true;
7 l" D# J1 v5 V$ U; d- d end;
. |: u& J# t( ~/ ~; ~: h4 I end;4 @+ C3 C6 j' ^( l+ e% [' x" Y
end; -- of the method
5 m4 m( b& H0 k& e9 r5 i# f |