/* called by: entrance ctrl of the object 'track'
# [7 j! H2 M4 G# a; Y*/
% x! p( T `; dis
8 w% b. m) D5 a* `/ F7 t; j8 X T# i, J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ p9 Z& [" A B& @: o8 Gdo
% X* V7 R; ]9 ?0 `/ V6 M: j Lan := rootfolder.Internal.Tools.AOLlanguage;
3 n( O" J) _9 G$ D5 }$ f if current = @.Destination -- else return f% [9 m/ F* f6 D$ G
then+ Z+ k0 W. u# R
@.Destination := void;
4 b6 Q4 c# n* g1 G5 U if @.occupied then3 u5 O2 n( t& R6 P% u' V
part := @.cont;2 }" y4 q$ B& V2 \
@.transpOrder := void;
8 r* R6 f* |$ {+ V2 o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 c; `3 L) |$ a. m @,root.eventcontroller.simTime);
/ v: K# j) q1 F: ] @.HasOrder := false;# G, G6 w) [9 n8 S- i* F
@.DrivingHome := true;5 w; H) \* f+ }/ K; ]; a& Q
rgManager.tryToStartTransOrder;# O* Q+ e, z; B; s
if @.Destination = void G& Y% M- R. {' l! m3 k' J, v. \
then -- no transport order for vehicle @
5 B& z! [4 y/ e @.Destination :=
) y' u9 c- D# ^" ]: V rgManager.nearestFreeStation(@,track.~);
: v) S/ D2 z# M" T& v) r newDirection(@); 6 G& X& R8 O/ Y# l7 {4 q: x+ O
if @.Destination /= void then
7 }: l3 X; m. R' [0 ~ @.Destination.NumReservation :=* T1 h+ j2 j. _- \* s
@.Destination.NumReservation + 1;7 Q- \( r5 y5 X, @+ |
end;" [& N8 i& d% A; A( ]
@.CurrIcon := "drivingHome";
9 _0 |/ a- k' _2 } @.DrivingHome := true;4 `& ~ \4 u4 b# n& G+ W
end;$ n: M/ B1 I) O- n2 v* H" W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* v4 j. e( K+ v& q( G# c
part := @.transpOrder;
" m! |2 _: q" D1 K6 H. v3 x# G' s part.move(@);-- load part8 v8 c: @/ E9 a' n( a' G8 y
@.CurrIcon := "load";
+ w U$ R3 g4 W/ N8 O% F) n GlobalDistObj := part.globDestination;
, l+ B: z4 j. U0 u assignLObj := rgmanager.rgAssignL;
0 Q; ^: j$ D, M6 N1 K. w row := assignLObj.getRowNo(GlobalDistObj);* s% X7 f4 @$ V1 K6 n3 y
if Row = -1 then -- since 70
; w" L O$ \$ ]# A& ~ if lan=1 then& D( C; H z6 J5 j0 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 \$ y' k. X) f$ @, r) m) @
to_str("in der Andockstation: \"",?.~.name,"\""));
( N& p; o" J$ I$ \* i& H6 N, L else* y$ h9 v8 r5 s& b0 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# z% `" d9 Q5 h
to_str("in docking station: \"",?.~.name,"\"")); . [3 ]" q! h1 X; m8 c, b! I+ U S G
end;
) g9 X$ L% t* F6 |# f8 w. k& E6 A else
& u7 L( y5 a! L @.Destination := assignLObj[1,row];
; r) n4 Z' g5 [+ {/ Q- U end; 0 O& V, W! ^6 q
newDirection(@);
- X3 K$ L$ @8 D- G( T0 h( A O) I @.HasOrder := true;
" B0 h6 v" [+ I V+ ?7 `* ^' { end;
" a8 S A W4 r8 @4 Z) y end;
% z0 W0 Y- W8 r; Vend; -- of the method
3 r" V9 g7 |. }" v. F$ S1 N8 e |