/* called by: entrance ctrl of the object 'track'& I+ N0 b! U# \. p- h/ B/ R0 @
*/
F' y, w3 E4 f) Lis
1 g3 ?9 r8 K6 k! y part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ v; Q( r1 {" X, \, ]
do$ c/ ^- K% Z U2 ]0 ?' _/ N
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 S" i# i& o f! S if current = @.Destination -- else return" @ U6 E- n5 w9 z. c! g; W2 R9 j9 _
then* r6 \) j: L* b( M2 Y
@.Destination := void;! P. R' o4 T: A0 v- t; i
if @.occupied then' h& L" W/ |* w/ I
part := @.cont;! b: ^1 x) L" l: [, \* A
@.transpOrder := void;
5 |! ]; ^' E% d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ K0 K+ C( J8 ?7 z @,root.eventcontroller.simTime);
; C8 a# f0 i7 M' v, V j7 {8 ^ @.HasOrder := false;
( G+ l/ |2 Q2 X" c# l. `9 ~ @.DrivingHome := true;
" F$ {0 f/ b% K# R" d. r4 ?7 G2 E rgManager.tryToStartTransOrder;/ v4 \% C/ F% Q+ [8 m
if @.Destination = void
" h# S& i& K0 v8 ? then -- no transport order for vehicle @
+ v9 u& }+ ~) h @.Destination :=1 f# S5 T! T6 h3 `
rgManager.nearestFreeStation(@,track.~);
; w" [: j( O# P0 s newDirection(@);
6 R, B, q9 C* r. Q# A if @.Destination /= void then
8 t" g6 ~- I. p4 ^6 f/ q @.Destination.NumReservation :=5 a! s# c: b+ H$ z* J, O
@.Destination.NumReservation + 1;
2 w3 [* P1 B7 F4 n, q end;$ f0 i$ q1 Z% l. v$ i( [9 B' t
@.CurrIcon := "drivingHome";
4 _" L. @0 b8 J8 @# | @.DrivingHome := true;
+ }5 ?1 i5 V. z/ T6 p% m; } end;
7 @1 U0 t% h( f7 ]8 L# [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 E# `6 E; ?6 s$ ^- C4 l% O part := @.transpOrder;
; y2 N9 U, l+ [6 E4 K part.move(@);-- load part
# |* x; A) t1 V9 P+ k @.CurrIcon := "load";
0 _8 U* S: S1 j& [( v* G* w7 Q# ] GlobalDistObj := part.globDestination;
- B$ D* g: |# G( D+ g% `/ ^ assignLObj := rgmanager.rgAssignL;% p/ p& H8 M* t) L4 A4 \1 D& c
row := assignLObj.getRowNo(GlobalDistObj);/ X: E: H- C, D M8 ^6 e) [! D) u+ \
if Row = -1 then -- since 70
- d- ?7 d; m. r6 p% j5 `- G if lan=1 then
9 ]' F. c6 ~: I1 a0 ? w% C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% e; h& C& r/ L
to_str("in der Andockstation: \"",?.~.name,"\""));2 ]! X4 e- x: Y7 K/ k7 ]) @2 ]
else
3 n% ^, V8 l1 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Y2 F/ [; Z* ]! U to_str("in docking station: \"",?.~.name,"\""));
! S, H. t2 V, m) C" Z' X end;
2 q T2 `- A6 D0 ?& G else; a# t% ?) { m" \) X
@.Destination := assignLObj[1,row];+ @6 n! X3 x h# L
end;
* j j" s: v z C3 X& ^ newDirection(@);2 z6 D X/ d. Q: V% {
@.HasOrder := true;
1 p, U4 z" G3 H2 L end;% H! f/ X9 ^0 l+ v ` V. x
end;3 I, W; ?# b$ q9 k6 n6 F
end; -- of the method
; |6 Z% x7 m4 h/ V |