/* called by: entrance ctrl of the object 'track'& Q9 S" n) h5 G, a& x3 W! _2 m
*/
9 h3 V. I2 X8 _6 uis1 O7 ]! Q6 b z, F1 M9 Q9 `. |1 n/ f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; H- Y9 W+ ?; T; D8 Odo
( [% y3 ~1 @. F: F% R; E: } Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Q# z0 W: X+ Z4 z4 [: ~ \ if current = @.Destination -- else return- M8 r2 ]: z$ v8 [; N
then
9 y' v& K; C+ d! v' v7 m. k @.Destination := void;0 V B; e" [; l" e
if @.occupied then5 k6 X5 `8 r( q5 G$ f _- q
part := @.cont;! D0 |" L; _ a" o2 m, I
@.transpOrder := void;
/ l3 h3 O! P( k9 \& K* C9 ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' `! r. A3 N$ N
@,root.eventcontroller.simTime);
, z8 H' I, y7 ], g @.HasOrder := false;
! v" G6 j1 J. E( s% I @.DrivingHome := true;+ Z2 w0 s- G, h9 G; a& _9 m# }/ j
rgManager.tryToStartTransOrder;8 M, y/ r) c0 m* \" B% c* h
if @.Destination = void
) I3 P+ A- y' Y then -- no transport order for vehicle @
) S- c. ?" v8 ?8 V @.Destination :=
0 P: f8 J; a8 @; o! o rgManager.nearestFreeStation(@,track.~);3 b( @ J7 C! q. P& G$ N
newDirection(@); 5 N" u$ R# g m5 d9 b" J
if @.Destination /= void then- @: g6 v" ]# }9 C! D
@.Destination.NumReservation :=
' w0 |0 X' p( ?& c( E- h J @.Destination.NumReservation + 1;! r& H& u1 \* I8 x$ M6 Q! ^2 z
end;; J' y# P5 w t' G# T
@.CurrIcon := "drivingHome"; B+ \+ w3 X' q! C8 P. v9 ~! a
@.DrivingHome := true;
7 A- V, D3 q; L2 J. A q/ } end;
1 V1 h M) C+ H m6 A. o4 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station) v* o; r j8 n
part := @.transpOrder;! Z. Z- k: D* P1 I9 g4 l
part.move(@);-- load part
! n5 x" D* u# [- R/ p2 O1 @ @.CurrIcon := "load";
+ u" M+ Y; k( S* O6 C7 N; \( K2 L GlobalDistObj := part.globDestination;
v; b. [% z* i assignLObj := rgmanager.rgAssignL;
5 t8 d$ X# s& N* M row := assignLObj.getRowNo(GlobalDistObj);
' |9 m) q, u2 H if Row = -1 then -- since 705 B L, N; N; g4 O
if lan=1 then: A" `( E4 k. K) m) D) g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& L8 F: l6 c o! w/ h& @ to_str("in der Andockstation: \"",?.~.name,"\""));
. c' v( _7 U4 r8 n! }6 C else
1 ?, ]$ G- ]" g2 h5 m) y5 m4 H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," T( k/ O. Q: ^. p
to_str("in docking station: \"",?.~.name,"\"")); 2 D: o: ^8 v6 Y$ a& z" F
end;+ `" p; `0 ]$ e7 u9 x! t
else
+ D, L$ ?1 i7 J2 H: e5 v3 u @.Destination := assignLObj[1,row];
9 a. ? _: ^# T- v5 X end; + d8 }0 ` D! g4 ]/ B: \
newDirection(@);
0 z5 y6 H6 W. z @.HasOrder := true;
4 H2 f3 Q* H( U- @6 ?/ ~$ l. m end;
! E/ z0 E! K8 W* x7 x6 v+ S6 o, p end;
& J; s) O' W9 f3 R. Q# Aend; -- of the method
7 H9 E! ]' B# s: C* ? ^ |