/* called by: entrance ctrl of the object 'track'
3 j3 c; l1 x/ ]1 G& G*/
- |& I! ]5 G" ^/ g$ G% Q0 zis3 ^# L6 X/ F7 S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 ?1 n' f7 U. d7 Ddo1 X" u7 e$ R/ v% G7 f
Lan := rootfolder.Internal.Tools.AOLlanguage;
# R. \; K N. l( ?+ _4 q if current = @.Destination -- else return
$ `3 P) u. g# X; d, V! v$ _% } then
) q& Q6 \ O; t+ B: d* O8 I @.Destination := void;( m$ J* h% m( C3 [& G- K
if @.occupied then& z9 U0 c9 Z0 K6 r
part := @.cont;
4 Z6 |0 S0 ^# [( t) ~. Q+ i7 f @.transpOrder := void;' H4 E3 C+ u& x! l- Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- t2 D5 A. L) X& p; h, K
@,root.eventcontroller.simTime);. Q, H) x! d3 f! ]% T: E7 J+ U- j' x7 ]
@.HasOrder := false;8 ?% n$ I' ^" [7 o/ e' z
@.DrivingHome := true;: V3 `/ C; N& E3 N
rgManager.tryToStartTransOrder;
. t! N8 A+ D; [' q if @.Destination = void
* q2 q/ M9 ~. J$ d- Y+ k' I then -- no transport order for vehicle @
* v1 Y, _1 i& @ g+ d i @.Destination :=
9 ~* L$ d& r7 J: U* t7 f: s1 [ rgManager.nearestFreeStation(@,track.~);
; h# U& E8 L( n6 q newDirection(@);
! |8 n7 L! z4 x6 N9 d: q if @.Destination /= void then
3 x' w5 Q- j) i: [" T @.Destination.NumReservation :=. \: V) R0 D4 K! H: d7 Q
@.Destination.NumReservation + 1;
/ U6 ~2 F: V* @2 ?7 d end;
' \0 _% N6 n" a1 m" B- A6 ~ @.CurrIcon := "drivingHome";
+ y7 r V; g, o0 D) p @.DrivingHome := true;8 t1 W, f6 s' U i; y/ ?. j+ N
end;
2 P( `8 S/ a. P) G else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 c( k1 d1 y) R
part := @.transpOrder;
7 [: G" \* R' u0 E3 c- X part.move(@);-- load part2 P1 }# {/ S; I9 p
@.CurrIcon := "load";
0 p$ P9 f; t6 l6 j GlobalDistObj := part.globDestination;
% u- D4 v9 O0 ] assignLObj := rgmanager.rgAssignL;
& k$ B1 R+ i1 X, p- r row := assignLObj.getRowNo(GlobalDistObj);* [% L3 b1 z! {" |5 u
if Row = -1 then -- since 70' ?: S( \8 b- \
if lan=1 then
* D8 i$ Z3 s9 W9 A/ J# s* Z6 _, n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, w6 x( u* r9 G) H0 N/ R4 \
to_str("in der Andockstation: \"",?.~.name,"\""));* Z5 [7 A! ~$ F9 P
else0 x7 f' W# ~& T, F* w5 C0 l! x2 k! Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) V9 D# b% n' R, q8 ]: s* E
to_str("in docking station: \"",?.~.name,"\""));
0 j$ u7 M0 ?+ p5 e end;/ t* p! S# y( @) b G: n
else1 O. {* N! {- l) v' b% Q; M1 A
@.Destination := assignLObj[1,row];
' @# ~ ?: j* T; p* a& b: Q3 `; O( L end;
% L# s( [4 U' o8 \9 k newDirection(@);
) Y/ D8 _ v; Y @.HasOrder := true;
! Q. u" E+ B5 q5 ~ end;! ^+ r+ n7 ]5 \% n! n( d7 }: @
end;
5 n9 N& o+ Q" N3 U6 P$ m: \8 z+ Mend; -- of the method
0 U* h% _: p( E( c' t8 T8 b |