/* called by: entrance ctrl of the object 'track'
1 p, P, B' i9 t7 ]" `*/3 J( }9 W. ^& q, D9 q5 p
is' e/ C2 ~$ Y' Z. @0 S) E: k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ @8 h& A3 z0 }: ], a2 c9 F6 O/ [do- X: y- R6 q/ V
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 p" A, f N: E- W; D8 z4 c9 F if current = @.Destination -- else return
4 _! K6 `' Y m then1 t, @, m$ K* Z9 F( Q- s) n
@.Destination := void;
2 z* p* o7 X( [ if @.occupied then
) W9 M) f8 N- O% }; | r! L. p part := @.cont; w2 U6 m+ \! ]# n$ m' G
@.transpOrder := void;
3 I: J1 h+ p" a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 L8 U! G& o0 U1 c: Y @,root.eventcontroller.simTime);
: O' t" t: p) _1 U& g$ D @.HasOrder := false;
* D8 M6 I) U& z; ~" Q9 ~ @.DrivingHome := true;8 Z7 |7 H; ~; F) g/ E1 f; K
rgManager.tryToStartTransOrder;' _& a# W n8 U; B. f
if @.Destination = void
1 ^/ [7 t1 k* ~% e& P( Z; c9 T7 i then -- no transport order for vehicle @
& f) \+ L" X7 n: q- `, w& J1 } @.Destination :=
2 ]0 b5 F0 J8 U) c1 Z rgManager.nearestFreeStation(@,track.~);
! G" u% ]) U3 B+ \4 Z# {1 W$ j newDirection(@);
2 k. h4 N, h8 `( A$ \1 } if @.Destination /= void then
" c9 z" s" Q/ K: R/ e* n @.Destination.NumReservation :=' Z- A; n; i) P- U6 ~
@.Destination.NumReservation + 1;+ P$ w9 c$ o4 l) x# [& P
end;
- \ B: Q N+ O2 e3 Y @.CurrIcon := "drivingHome";
+ Q: }' Y6 O: R$ ^ @.DrivingHome := true;
9 I% H$ j6 b) }* Y* L, }& O2 T* ] end;% {; Z4 @9 S: g4 }, l M% g( e9 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# b; `1 r1 i6 n. y. R4 ^ part := @.transpOrder;
6 M3 K# i1 k$ Z6 q3 r, _/ w part.move(@);-- load part
+ \, i' I r" t# V @.CurrIcon := "load";
& n' ]4 \& y; M2 s5 H, j GlobalDistObj := part.globDestination;
6 j2 p" q$ ]" y: G- d S: y assignLObj := rgmanager.rgAssignL;3 g5 g9 i2 h5 _! O
row := assignLObj.getRowNo(GlobalDistObj);
) s J0 p3 P" e8 y/ c- n; Y/ n9 { if Row = -1 then -- since 70
! j- I. M. n2 f: J" r if lan=1 then- @6 y4 a2 p. }! }) r, Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) M5 _0 d( P: S: Y( B
to_str("in der Andockstation: \"",?.~.name,"\""));2 d/ C: q7 F1 B+ `! R4 ]
else
& n* d. j0 @' ]9 E) c- `4 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 o2 l9 a0 W" o, ]6 ], }7 n
to_str("in docking station: \"",?.~.name,"\"")); / B( a; }9 Z$ r( m) P
end;* C3 V& o0 {4 |6 M6 M: [
else. p9 ?" `3 Q2 D, i4 r
@.Destination := assignLObj[1,row];, Y- l" O0 H/ `1 f2 ?: j% Z% [: b6 a
end; ! p: P3 n M3 `8 ^
newDirection(@);( c- d( G+ z! d: W: M# |
@.HasOrder := true;
: n- h+ \4 ~7 a% k# p) m; l end;
8 K1 M) t* }4 ]8 W end;
+ r5 S* I& H2 [% |$ g7 B% [end; -- of the method
' u5 a9 B6 @* Y |