/* called by: entrance ctrl of the object 'track'( D* ~) l( O( U) y9 v9 m+ G
*/
5 c/ o: A) o A5 }+ q/ y( {+ f) Kis k+ \ K+ {/ ^! l" W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ^/ E0 T: ^. B, s8 R! j% ^3 v9 n
do8 h5 v' f9 g, G' n8 u
Lan := rootfolder.Internal.Tools.AOLlanguage;1 ?/ S! [) e; [/ U5 W
if current = @.Destination -- else return
% T: O& Z; A$ h5 [2 s( m then
$ _& N+ U+ e5 _( S @.Destination := void;
7 F. o. c# D, ?/ c0 ] if @.occupied then; n' A' q1 S: \5 _
part := @.cont;
3 ~$ Y9 a6 K" d% O- u1 L5 U# K @.transpOrder := void;
& b i# H; }' V8 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) t9 Y' J( Y+ L% C2 P m- c1 Q9 e @,root.eventcontroller.simTime);
. }" e. | M3 x9 R4 P7 i @.HasOrder := false;
m% t$ M& d, H) j @.DrivingHome := true;: N8 n& w4 k8 @
rgManager.tryToStartTransOrder;6 b6 I! `) B m$ n9 J/ E
if @.Destination = void
; H5 m7 |% }7 c. o' ]6 g/ \' g/ v then -- no transport order for vehicle @& R% t' U4 I$ ^" r* P5 L# e- }
@.Destination :=# j. F4 x4 O0 D# T6 U6 d/ k2 \
rgManager.nearestFreeStation(@,track.~);0 }& S; H S. w% `1 e7 `0 W
newDirection(@); 9 @% e+ v7 g: N( r
if @.Destination /= void then+ D! |3 y4 R- O0 B' h m* j/ w
@.Destination.NumReservation :=
( E1 R1 f: N+ h @.Destination.NumReservation + 1;& r; u) D/ W! Q' Z3 \, }! I
end;
9 Q2 B# g. N+ }7 g @.CurrIcon := "drivingHome";& D/ f7 j1 R+ O; S- t/ T# g
@.DrivingHome := true;
9 Q0 d& \; {0 g end;
0 b9 j& @( f7 b" X7 z+ z4 `* r else -- the vehicle @ is empty, both vehicle and part are in the same dock station, j) O( F) E2 Y9 A, \' z& V
part := @.transpOrder;2 g6 }+ O: }* N# m0 y
part.move(@);-- load part* z& `4 _% L w5 C% _! b
@.CurrIcon := "load";6 \* N# Q+ T! L
GlobalDistObj := part.globDestination;- E7 b; @8 n, j [
assignLObj := rgmanager.rgAssignL;
1 @6 G/ t# a% @9 \ row := assignLObj.getRowNo(GlobalDistObj);# C2 b' w; e" c- B3 K8 G
if Row = -1 then -- since 70+ z1 D! Z# |" T8 ]* b
if lan=1 then
' f3 ^; ^3 C( f( ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 `, W) W* ~1 f# w5 Y to_str("in der Andockstation: \"",?.~.name,"\""));
2 u: F% R6 ] {( s" d else: {. u1 ~- t9 u( o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( V) L. K0 v. Z) c& B H. n to_str("in docking station: \"",?.~.name,"\""));
1 r' a$ _/ o1 c' M3 M end;7 d1 r+ y3 T- m' c5 {7 K
else# ~5 d6 ]4 w: G6 y$ n
@.Destination := assignLObj[1,row];' }" [" B# F, i
end;
2 n* V, @* H {) J9 k/ ?6 F newDirection(@);) I3 [; w- _# Q8 w1 ?" ?
@.HasOrder := true;
/ ]0 P2 k8 S, J end;
/ q- V% e# y/ n6 M, }7 B end;. E- D$ C" n! _2 ~% I7 ^! }
end; -- of the method. N! S( J# a2 E2 _& y9 U- F
|