/* called by: entrance ctrl of the object 'track'
5 q+ Q- Q% B W$ p% ?" d*/
2 x. W8 }9 S' j" ]% i) Q# C( D) _is$ Y! S5 B: y8 ?/ d& a+ {2 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 D. a7 H' D) n2 E/ m7 @4 S
do$ i9 l9 }3 F2 u9 z) `5 {* Q
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 v8 e7 H0 I) `( r if current = @.Destination -- else return" \( U. k q9 P G6 P4 J( O
then3 _! J3 K9 n0 X! K, }
@.Destination := void;
" ?8 }! h+ ^! b: l( |& F& P/ \ if @.occupied then
5 v3 N' E+ n# W* A: z2 b2 X part := @.cont;
: n3 u ]+ F7 z3 o& p' Q @.transpOrder := void;
- U- x0 x& a- @0 w5 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% p" |; x% L! ^ d+ r8 g @,root.eventcontroller.simTime);, J5 E9 L+ W7 |& N- x4 y, b
@.HasOrder := false;' {5 ]2 P1 R6 n
@.DrivingHome := true;2 K7 t a. [0 m! ?( ]( F1 R
rgManager.tryToStartTransOrder;# Q$ l- J9 E& A/ m
if @.Destination = void; n2 ]+ ~7 j9 `; A( V
then -- no transport order for vehicle @: Z( q5 M7 }% n# j7 Q9 x; {$ R2 Q
@.Destination :=( Z Z2 Z0 k6 ~7 j" b! C: p
rgManager.nearestFreeStation(@,track.~);
4 @& N% [1 @ E% ` `; b newDirection(@); # r) G3 q6 H; L4 J' o0 n1 B. N
if @.Destination /= void then
8 o% S! p( {5 e7 P0 h+ A/ L3 d. k1 q @.Destination.NumReservation :=6 c9 n5 F9 |, f7 V3 r* l! b) M
@.Destination.NumReservation + 1;% i7 Y6 r& E$ L% \- O
end;" `4 i8 `: U- n+ O# _5 d7 C
@.CurrIcon := "drivingHome";
, D% {8 w7 H1 @- Y/ L @.DrivingHome := true;
k2 W; ^2 q9 v0 N+ w. Z end;4 [5 _6 A! P( _( v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! I+ n9 \' T' w
part := @.transpOrder;
6 ?8 J/ U7 E+ Y8 `4 a: P part.move(@);-- load part5 o% P' a& v" n; e5 [
@.CurrIcon := "load";1 J1 L/ X, [: O* F, W0 C4 ~
GlobalDistObj := part.globDestination;
% u, i8 V% t K9 W assignLObj := rgmanager.rgAssignL;* l* j' f; k) L" }" z+ x" [! ?
row := assignLObj.getRowNo(GlobalDistObj);# W9 B: X' M9 p; b: \! ?
if Row = -1 then -- since 700 k! f$ w7 z( X! } d4 t, g
if lan=1 then
8 B9 Y8 q: P+ w H! Z& V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 D3 g+ r/ Y: ^0 V to_str("in der Andockstation: \"",?.~.name,"\""));; `5 h, j" M; j
else$ D8 ~2 D. m8 ?" G' ]3 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 `& X9 B: ?2 ?! a6 y3 D+ N# }2 h( R to_str("in docking station: \"",?.~.name,"\""));
- _4 M, u$ y5 P3 Z: l: i end;
: L6 u1 k7 x- W( k' ^3 V# w else$ D2 `! d& Z* f
@.Destination := assignLObj[1,row];
+ I2 h j( S2 [ end;
8 ~- q" L6 a4 k% p3 Z# T newDirection(@);# n/ A" k% i7 E' x7 i$ m4 x: H
@.HasOrder := true;
- |( E( ~1 t2 Y( ^ \5 `/ w6 z end;' q" J7 v5 W6 x5 M6 H/ S, s* _3 t
end;
/ ^ Y% `& z: d7 rend; -- of the method
: B: m" \0 b" f0 W" q6 P8 u3 T |