/* called by: entrance ctrl of the object 'track'- b6 m$ d* J# J3 \" H' B) k
*/
1 X0 R7 ^. r: x) \0 ais( N) }: H' j% j, w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ q3 L! }! V, \9 N: [: [
do I) J5 h# @) ~2 c$ A/ U7 ~$ L8 G& `
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ t! e p) n% o; r7 }4 [ if current = @.Destination -- else return
: w) M, l' l0 g) ^- j then
$ ?3 b" t% ^( |- `% _ @.Destination := void; z: p+ r5 _. {/ B' I) P
if @.occupied then
) v: w3 ~; D/ ?% _ G) Z0 k- R# b part := @.cont;- W' x4 D8 d1 t" c& X# ?5 V
@.transpOrder := void;
; T6 h% }) h. k8 Z; L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, R6 Y9 K5 M' ^4 L1 t6 o
@,root.eventcontroller.simTime);9 b k( W2 j8 |' O' U
@.HasOrder := false;
& J6 W9 o# I; j/ f" X! w3 U @.DrivingHome := true;
' }; J* s6 i& q; F7 Y' e( C% ]0 y6 b rgManager.tryToStartTransOrder;
) n1 f( P8 D, N- ~# J& z+ ] if @.Destination = void
! k4 Q9 P7 ~4 \$ `# j1 e then -- no transport order for vehicle @4 q3 B; @. T0 _, P
@.Destination :=' \. l3 K2 ]' N& h. ]
rgManager.nearestFreeStation(@,track.~);
# C+ y$ x" y- f# S newDirection(@);
$ S1 N6 M1 t. C: ?5 f u if @.Destination /= void then( {4 d3 Y8 S8 l! T. f' |
@.Destination.NumReservation :=
% ]- g; R4 ^* h8 T/ l @.Destination.NumReservation + 1;
3 n- k& a! s0 c) E( I5 C( t end;
+ a! p, {4 I: T+ J @.CurrIcon := "drivingHome";
1 [% m/ C* K: g& Z7 ^% v' s @.DrivingHome := true;$ g. |+ D+ N B8 y0 n6 ?4 c
end;: m0 K& W' Z7 G$ g" g! E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 U3 m& ^" [" z. B) K6 Z2 y e part := @.transpOrder;! I6 y( b! y- _9 R6 Z1 d0 g8 R
part.move(@);-- load part
2 Y8 B) W6 ?3 K z$ f% m @.CurrIcon := "load";
! A; C* u1 x) Z: U! u7 c; {5 t GlobalDistObj := part.globDestination;
- o! q' t7 ]7 i6 n assignLObj := rgmanager.rgAssignL;
l8 Q4 u) ~, h6 p. d; K% } row := assignLObj.getRowNo(GlobalDistObj);5 j+ v5 [) Y8 e# f+ O1 _
if Row = -1 then -- since 70. I- Z2 z3 I- s6 Q: Z5 G
if lan=1 then
+ d G- V# | u7 M4 u8 f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 @; N# I* Q) B! m. E* @! C; Z$ p to_str("in der Andockstation: \"",?.~.name,"\""));
4 v4 S; D) c% g' ` else
- B% G9 p7 N7 B9 h2 q7 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 P9 q* A1 E# N9 U" v
to_str("in docking station: \"",?.~.name,"\""));
2 B+ o1 w4 V+ b0 |+ P6 Y' J9 g end;8 f5 k8 a0 A& D2 z! I
else
% _' j- I( z6 ^7 |+ y5 h @.Destination := assignLObj[1,row];: _5 V) z& L7 t `
end;
! U. w0 _$ V* Y4 [) l9 ` newDirection(@);
* t- T' u4 v3 ]8 Y8 V. a* x4 C @.HasOrder := true;
+ E. A$ V; p* ]) Z end;
6 S! [5 P4 D$ ?5 v$ V r1 z9 ] end;/ _$ E6 s- @4 [* f! A
end; -- of the method
+ d4 A6 @ S) F( i1 F |