/* called by: entrance ctrl of the object 'track'+ B- H, e4 k4 R0 L9 i7 B9 o" G3 g3 e& G
*// E% F& N8 ]" I
is4 o5 L9 R& r! H- y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 H) D; ?( z& i4 t( I' Kdo# D3 Z, j9 w4 q$ a' n; a2 p
Lan := rootfolder.Internal.Tools.AOLlanguage;3 b1 [' b% o) O
if current = @.Destination -- else return. u3 H2 ]( a6 b$ u; O3 O
then
! L8 @% M% t: q+ I6 W0 ?2 } @.Destination := void;- f* p: {) m& U& J+ g
if @.occupied then2 ^( I3 {" g7 v, A! v! Z
part := @.cont;
2 _: S; ^1 X4 y3 | @.transpOrder := void;
/ {2 P1 _5 V1 ^3 ?+ T' m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ^* K% U# B; ]
@,root.eventcontroller.simTime);
$ p L0 K* v7 v' v2 B1 ]) H @.HasOrder := false;, h/ Z L( k. \& i! \; k0 q
@.DrivingHome := true;
- {. V7 a/ o! I# Q rgManager.tryToStartTransOrder;* d8 }5 P/ s5 u. b J
if @.Destination = void$ ?" g7 S$ ]6 }( B2 ?4 C& _
then -- no transport order for vehicle @/ A- X _5 N- V
@.Destination :=5 a2 S; M: T' s, h
rgManager.nearestFreeStation(@,track.~);
1 v" f: T, G! x; p' ]* M- W$ } newDirection(@); 0 @# z* y# }4 g; t6 J
if @.Destination /= void then9 f- W; ]# u9 P3 I" D
@.Destination.NumReservation :=5 v+ S6 B/ ]* E' o& D4 e; K
@.Destination.NumReservation + 1;& R7 F- t- p8 B1 R5 a8 A
end;( S9 a+ x9 I5 H: t- W
@.CurrIcon := "drivingHome";
3 x$ ^! U! @! B0 G+ r0 V4 ] @.DrivingHome := true;, @1 B5 E" D" v& ]
end;
) u2 S* v' i* C! s1 K- n. l else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) Y6 W, M! h* B* @2 A part := @.transpOrder;
! t; r5 D, b+ N part.move(@);-- load part
- `3 o+ H; a% o! e8 M @.CurrIcon := "load";3 ]) m" _* r% i# M
GlobalDistObj := part.globDestination;7 I3 v6 ?+ h% K1 t7 ]. `/ j
assignLObj := rgmanager.rgAssignL;
3 D Z+ {8 {$ \0 R0 m' f; x row := assignLObj.getRowNo(GlobalDistObj);
% {# a2 P6 i( W+ D0 C9 |! ^7 P& u if Row = -1 then -- since 70
+ \% a" t4 A+ U5 T1 {0 o if lan=1 then
- A) v; }9 I. d, | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* F4 T3 r* F/ |* _
to_str("in der Andockstation: \"",?.~.name,"\""));
8 p0 r7 N) P! W else5 N- J- \9 B6 [$ E; @/ Q: }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- |$ l0 z: s9 a' N7 L
to_str("in docking station: \"",?.~.name,"\"")); # _# l6 e; c c$ E
end;
$ |5 w# H) }9 D$ w! [ else( H, j. p# {/ m+ e5 H2 `
@.Destination := assignLObj[1,row];
\. |4 G% k7 v B. O# ^/ S end; ! U4 T' z- e( s8 M
newDirection(@);/ ~8 ]4 t W5 O: u% j
@.HasOrder := true;
4 O5 H0 t+ e* f8 [2 u9 ^- r end;: z+ P/ L0 @5 \3 {0 _- k+ N$ e
end;
% ~# n" I9 r, U" p( e" X; a4 f5 d, rend; -- of the method* ]9 x0 a5 o$ O
|