/* called by: entrance ctrl of the object 'track'* H8 t4 i# B% ~! J- F
*/
3 W% K( m1 i: |+ n8 l2 h, |is3 W7 G w+ P) c( K& _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 k3 ` z- O; l8 m' C2 u ^3 U! n
do
6 z n. `% D% n6 D Lan := rootfolder.Internal.Tools.AOLlanguage;* m$ K( A" s) d, V% ~5 Z- `
if current = @.Destination -- else return- c/ D# h/ `" X0 z& }% a
then
8 y1 T5 w7 ~% i4 l' L1 p; v; b6 z @.Destination := void;- F( S( |+ z8 p
if @.occupied then; @* z2 O' R! m/ a- }% [5 ^
part := @.cont;; [2 B3 o2 ~4 t5 e7 Q: {
@.transpOrder := void;
4 G, i3 J" t7 j$ h# a( j( ?& p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. l6 i! M1 l* K; o
@,root.eventcontroller.simTime);9 F3 a9 C$ T3 u- p6 Y+ Y
@.HasOrder := false;
$ X5 L$ [1 i# C$ n2 z# ]* i3 b6 _ @.DrivingHome := true;4 |% {. W/ E) M" N) Y9 T! F3 R2 R
rgManager.tryToStartTransOrder;
) N# C8 e% Y% \2 b9 @ if @.Destination = void
: s" E0 k9 e2 f$ c then -- no transport order for vehicle @, Y; T0 w! {4 L {: n
@.Destination :=
& |9 e8 s: C9 z( \& E% x3 H3 r4 d rgManager.nearestFreeStation(@,track.~);5 ^5 G2 l, M( ^5 K$ A
newDirection(@);
9 Q+ a! x! o2 q/ _7 A) S if @.Destination /= void then
* a( X# H+ L+ D; j$ ?5 {! B2 f3 j ? @.Destination.NumReservation :=
/ _( G8 i- A2 O u# J7 \* ?- ]/ X# Z @.Destination.NumReservation + 1;8 f* S3 C) ]' ]! G' O" k
end;+ x5 S. D8 c" q' ^6 K' |5 q2 w
@.CurrIcon := "drivingHome";
& i( j2 S- |+ `6 j( I @.DrivingHome := true;- d4 ?% H: ~0 }
end;: y/ n' C7 q m' q5 {" q9 C; i) q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 x) G" V) s: v1 S
part := @.transpOrder;& T: [0 [6 R! B5 r
part.move(@);-- load part, L* r: c7 ~1 W% |2 \* B
@.CurrIcon := "load";
2 m2 @. P8 A7 Y. {9 { GlobalDistObj := part.globDestination;/ ?( P2 C/ @7 }0 h
assignLObj := rgmanager.rgAssignL;7 l3 s1 Z! D* f5 q2 D
row := assignLObj.getRowNo(GlobalDistObj);
4 x, L6 c, T$ s; s5 [ if Row = -1 then -- since 700 d2 U o. y+ t) S$ c
if lan=1 then
3 u9 o' J: r: B8 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 h1 z! q9 z, O- A1 F7 `6 F/ L5 i3 w
to_str("in der Andockstation: \"",?.~.name,"\""));+ r& r) ~9 N' c; c! I, g: S
else+ A% d2 c- G5 g: \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 {# {4 n6 t0 s# k. q T/ M
to_str("in docking station: \"",?.~.name,"\""));
( n7 H! B$ i8 U2 V. Q end;! b! Y, n7 w* A, K. P3 p' l
else E6 N4 e& A6 E+ |! q
@.Destination := assignLObj[1,row];
; x1 _! O+ {1 V0 f0 f end; ) e0 p5 r. d# Z
newDirection(@);8 { e F }/ \0 U1 g
@.HasOrder := true;
\$ l. z: K/ ]) W5 K- w$ e end;! o# K" D0 D- P; E4 X" L$ |- i( _
end;, V9 c: E3 \5 I/ P
end; -- of the method
9 w# o: R7 ~) G9 J& P2 X& P) V |