/* called by: entrance ctrl of the object 'track'
8 x. Z# g. [# V*/
' n. Z6 [' \3 Q; \3 F3 S" C: v: k' e1 @is
+ Y4 ~% e% H6 M+ W part, GlobalDistObj, assignLObj:object;row,Lan:integer;; W* O- d9 p0 _; [: h) p4 J" w7 X
do
0 g+ B/ x0 X6 W1 A9 e Lan := rootfolder.Internal.Tools.AOLlanguage;* _% ~+ `" `% a
if current = @.Destination -- else return1 F! L- p2 \3 E9 O3 F z
then
6 x# C6 V* e: @$ W1 _. f4 n @.Destination := void;$ Y- ?5 c. ]) p5 J( A& e
if @.occupied then5 V+ p) X8 V3 j0 y7 E, R6 i
part := @.cont;
' u0 f* L/ X, J- @: V @.transpOrder := void;
& m+ h$ M! N- z5 [8 |- I; c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 q& K# L5 t1 E9 Y* |& \& @# U% o1 P
@,root.eventcontroller.simTime);
( K$ G4 B7 s0 z# U0 J5 i9 l @.HasOrder := false;6 H) ^: u6 r2 V
@.DrivingHome := true;; d6 x8 l7 O$ L. `" \% b% f/ r
rgManager.tryToStartTransOrder;
( D" `6 W( p$ {) d6 Q: D* _ if @.Destination = void
4 t# A1 r5 n8 l& {: B then -- no transport order for vehicle @
# x- Z) ~8 R; @3 s: D @.Destination :=' p9 P# z" p0 a9 @! s
rgManager.nearestFreeStation(@,track.~);
5 B3 D$ R9 H3 U. Y8 f# C newDirection(@);
& W& r' l, D; j4 T& S) ?( A, A if @.Destination /= void then& a: Q7 [' s6 b6 e3 R8 A5 f
@.Destination.NumReservation :=( R' d, j6 B: C1 o
@.Destination.NumReservation + 1;
% h3 d ^- j; S% }8 L end;, y0 I, q" \' u+ n H
@.CurrIcon := "drivingHome";
% F% i* j4 U# }7 L* E4 Y @.DrivingHome := true;
, T" Y" L6 D' a/ ]9 ~2 N end;
; a! v' [. c% \- B* O0 e else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 Z8 k1 x& h$ F! F G: m7 f
part := @.transpOrder;' @2 z& U- m$ L, T$ y c$ `
part.move(@);-- load part
$ r; G; u% \9 g. H1 P @.CurrIcon := "load";7 |, N$ L- _1 S$ n
GlobalDistObj := part.globDestination;. `. @3 X5 I! z/ F, f
assignLObj := rgmanager.rgAssignL;/ \5 h ]; G. t
row := assignLObj.getRowNo(GlobalDistObj);: I+ |- ?, \$ f9 M6 {
if Row = -1 then -- since 70
" n/ R8 s6 [: j! s% d8 z& j if lan=1 then
, u0 q' [+ x/ E* f/ r) u9 J; V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' S3 r5 {* H: o! ?' I+ K
to_str("in der Andockstation: \"",?.~.name,"\""));
4 Z/ d. |( m. ]8 ] else
( t0 i9 j" }( F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 Z5 {$ c9 \4 b3 R R/ r6 q2 A6 v6 q9 r
to_str("in docking station: \"",?.~.name,"\"")); + o; z- b, \6 Y3 u4 A5 b
end;
1 L% @, K( T* g5 c else- o! c+ B# k6 w
@.Destination := assignLObj[1,row];
1 H6 N5 m% p1 Q- V% h( e end; # [; i, j8 R. d! Y
newDirection(@);3 R- T- p \' u: U. L* ^7 K' ~. W
@.HasOrder := true;
2 W# U7 l, ^. R) m6 z7 A5 W end;
* u% `4 t' K1 \% C% E end;) b- N# ~7 J" D* Q
end; -- of the method5 x4 ?+ B+ ]/ m; |+ Z6 E. o! m v
|