/* called by: entrance ctrl of the object 'track'0 ~1 O- f2 |1 S u, T5 L2 }; S
*/
* ?0 Y, u# z% ~1 C2 jis
# L5 @6 T1 d' i( n part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 V6 J% S4 T( B/ r% m
do2 w7 T+ F4 w) z5 N. x' _
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 a6 E' O* n6 s& S0 g0 I1 q/ T if current = @.Destination -- else return
% i1 e* A5 @! G/ s7 ` then
: `- P9 {' D, _ @.Destination := void;) w, C; U% w/ q# e
if @.occupied then
* i( C3 U3 a& I1 o1 V part := @.cont;! v4 X3 K p/ n8 _
@.transpOrder := void;
" z6 }# E+ Z" r+ @" q+ d5 T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 _1 V6 |& g3 T1 J* W! ~
@,root.eventcontroller.simTime);
* P; o, m U6 L9 G* l @.HasOrder := false;' S4 h) L5 M- b, E7 n3 V
@.DrivingHome := true;+ Y/ w/ H& S# v$ E7 r5 X
rgManager.tryToStartTransOrder;( e# g0 I) [0 r2 t: o0 A& G
if @.Destination = void
% n( j8 C- B9 h4 }; c5 @/ h then -- no transport order for vehicle @1 p6 X# F$ v0 \) c
@.Destination :=
! g v7 b4 X \- ~( y- d rgManager.nearestFreeStation(@,track.~);
3 P2 ?5 s0 u8 D) t' j& v& n6 z" `, h newDirection(@); 3 N2 y; W8 U1 Y( Y3 C1 [- b4 T* Y5 M
if @.Destination /= void then6 v6 L# A; V1 m) r" j
@.Destination.NumReservation :=4 h& R& J* O( V% ~+ h' f$ _! t; M
@.Destination.NumReservation + 1;# I( A7 y1 u+ E4 g
end;
6 b' W2 |2 B/ i& Q% i( v @.CurrIcon := "drivingHome";
- v7 R! H/ P$ e% b: C/ ]9 R" _ @.DrivingHome := true;. t; N( u& f7 U; n6 {3 R% \1 Q/ N
end;- ^$ j8 t6 `% L. X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 d8 G! ^' M" t+ b/ g6 v
part := @.transpOrder;
& ^- H, X; \$ W9 b( B part.move(@);-- load part
/ O( y# \8 A7 {4 [ @.CurrIcon := "load";: m# g% q/ R8 i i- @& }, k7 m. O0 g9 N
GlobalDistObj := part.globDestination;
9 r" s$ {+ `2 j assignLObj := rgmanager.rgAssignL;, m) V6 ?+ f" Q; L6 j
row := assignLObj.getRowNo(GlobalDistObj);; t- V# y. N( A( ~
if Row = -1 then -- since 70* T. ?8 y( T! V9 @9 a% J
if lan=1 then
; _, `0 [, t/ F0 d0 _) F6 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ t( n* c% J# [
to_str("in der Andockstation: \"",?.~.name,"\""));
! ?) Z# e! N) ~* v else" d) n" n( @6 |4 K- g- U0 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 p: }. X9 u c5 Q" ?: K to_str("in docking station: \"",?.~.name,"\""));
( z) H C8 y2 T* ]0 B0 D$ e, P9 l end;) B' T! j, E4 p# a$ W! O0 o0 q
else% I' |1 q2 K c2 c& ]
@.Destination := assignLObj[1,row];
$ \% c2 ^) n, ^' n end;
3 v C1 l' g( K; v9 j7 h newDirection(@);
1 a8 S! z4 }! t4 a9 S& i' W1 H1 x @.HasOrder := true;" X; c" C$ \2 D$ O7 q+ Z0 T+ S
end;
L7 _0 Q9 l" V9 K" H/ Y end;
+ U! K' Z& m! A* E, j. i+ Wend; -- of the method
: b7 [, {2 \9 `, r4 J/ ~! B9 a |