/* called by: entrance ctrl of the object 'track'. o/ K/ A- `1 }, w5 `5 {
*/
0 c2 s4 O* Y: ris
; o8 o1 j. M/ w4 o! L# ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;. |7 _/ t- G" ]$ T6 d8 T
do6 `" X5 v+ x2 [8 {: c2 n! k3 H
Lan := rootfolder.Internal.Tools.AOLlanguage;
' ^: Z! ]# E7 A( L# u2 a) l ~ if current = @.Destination -- else return
# Q. G$ k! T* a then& }+ S- L% y# p
@.Destination := void;5 i/ B9 J8 F* A, |$ u
if @.occupied then1 {. X' ~$ ^! F9 @5 v, T' t
part := @.cont;
$ m4 d8 `* ]9 o t ^1 c+ a) O @.transpOrder := void;
# ^' r, l' d! |: m; n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# v% I* u2 W W b: H4 C- Z
@,root.eventcontroller.simTime);
% U; G, ~* s0 c: |+ _ @.HasOrder := false;
2 W% t* \/ s5 `0 c% C& v) x @.DrivingHome := true;3 w) o+ A7 u; D: ]# f9 E% F3 @$ N! u
rgManager.tryToStartTransOrder;
{2 r7 C/ R: a( ]* X: a1 A if @.Destination = void
- }' I+ r! ]& U' x u$ s( G' R then -- no transport order for vehicle @5 ?% \$ P8 G6 \# o, d
@.Destination :=' ?! C0 @+ y G" G+ H+ {& m
rgManager.nearestFreeStation(@,track.~);
4 E3 v- m8 \1 T" ] newDirection(@); " r8 @ C$ }/ g3 F! Z9 S" u) \
if @.Destination /= void then
% P/ X2 R! ]0 {8 d' g4 q% b @.Destination.NumReservation :=" s d# I% u1 e) _0 o
@.Destination.NumReservation + 1;
2 A$ L. G" u" s. x( L end;2 x3 x$ N- k. N& S1 O: w$ r
@.CurrIcon := "drivingHome";
6 k( h8 h; d/ {+ G1 J% x @.DrivingHome := true;
- r% A) k# K; F* g6 ? end;
- ^9 h1 R, C) P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 S* {- w/ k, | part := @.transpOrder;
9 {9 j2 j0 C. K {- n- N4 K part.move(@);-- load part; b% Y/ b7 f. ~ m; V
@.CurrIcon := "load";
: H# f) r" G$ i- Y- U. s GlobalDistObj := part.globDestination;
0 U* _$ E$ L" }' U! h2 F: k6 V assignLObj := rgmanager.rgAssignL;
5 U7 A% J( w* |$ k' D }( @ row := assignLObj.getRowNo(GlobalDistObj);
D8 K$ c& {$ R" e( K if Row = -1 then -- since 70& _/ Q" k5 j( b$ v" h t3 E
if lan=1 then
$ i5 n, \2 P0 d3 s* |& s: l4 u5 V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," k1 }$ C$ v6 z2 D" X
to_str("in der Andockstation: \"",?.~.name,"\""));3 ?0 r3 P0 Y8 }6 V/ H& k( H+ P
else
+ a7 Q, b/ ^- [& g+ S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 P1 S. A& ? N to_str("in docking station: \"",?.~.name,"\""));
4 x! `0 |, q0 s end;% G6 A- Z6 g) z6 {1 F
else# Q# h8 _9 i1 t' C' g* k. r% O# j
@.Destination := assignLObj[1,row];
9 {" v2 u, E) ~% L/ D" I8 ~4 |8 v6 { end; $ l4 I( p. q( f4 D! `
newDirection(@);
% `9 G3 v( u, o6 |1 O9 L6 b @.HasOrder := true;1 ]4 P1 E9 v; t9 I0 R
end;
9 |% e' s1 v2 i- Y; A- j end; N" S& T: w8 g* Y
end; -- of the method
. z# j e& O i4 ]4 b( P |