/* called by: entrance ctrl of the object 'track'
, X7 _! x- e+ p* z; {*/
# r1 v8 C: Z" ~# t9 Eis5 Y) a: t7 x8 r7 `, q. h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 V" U% b p8 b- W0 U% M/ e
do6 Q5 d9 v3 L. u( Q
Lan := rootfolder.Internal.Tools.AOLlanguage;" s" r6 Q [5 L x7 O
if current = @.Destination -- else return
; A; S7 ~* d1 l then% n6 B5 S0 A7 J4 k1 ~6 W
@.Destination := void;! Y) _3 N2 l. c' z- n" D- B
if @.occupied then6 m0 Y" K+ G# }* V. w
part := @.cont;
" N* K2 k7 [8 D) O/ s @.transpOrder := void;( |) l* B& c8 \0 q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- {# A8 j w# e
@,root.eventcontroller.simTime);, c' |! E8 q d8 P
@.HasOrder := false;
' D7 w4 U1 l& E% c& |1 k1 W @.DrivingHome := true;1 k5 q# [+ M6 V I9 d! i
rgManager.tryToStartTransOrder;
; U! l. M' g! O4 }: e. ]" u d if @.Destination = void
8 l7 d X. q$ d) p- N7 l, s then -- no transport order for vehicle @( s9 C2 f5 q* H% E
@.Destination :=
4 r/ B9 R0 ?8 m: V* Y1 |% T rgManager.nearestFreeStation(@,track.~);
% `* }, Q1 p4 h newDirection(@);
/ \# z8 ]) H" Q/ e* l& h if @.Destination /= void then
+ U: N/ h3 i1 U: H2 ~" B( ` @.Destination.NumReservation :=1 s/ f( `1 l& J ~8 |! Q# f; v
@.Destination.NumReservation + 1;& A: j( _$ {1 ?. O" D
end;$ \7 X5 `* u( u3 F! N
@.CurrIcon := "drivingHome";) `* f2 q3 W \" c1 ^ Z9 o) d. R
@.DrivingHome := true;
0 I" N! P' _, j, Y$ [ N- w3 n end;9 P. ~. N& ]6 s: P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 g" }8 [: O; m$ c part := @.transpOrder;) ~6 x6 |8 s6 l, c$ ?) ~
part.move(@);-- load part5 d1 L* Y8 m! {9 U
@.CurrIcon := "load";# i2 O& Z( y6 e; H" e O1 t' v
GlobalDistObj := part.globDestination;
6 R" S8 L8 w+ O6 d% o; I2 b assignLObj := rgmanager.rgAssignL;
, }( ~! W1 Y; \/ M: S# x) U) ~ row := assignLObj.getRowNo(GlobalDistObj);
4 c5 W1 R2 p- v$ O if Row = -1 then -- since 70
0 {% Q" X: b+ ?5 r6 v if lan=1 then
& c( ^$ J. e9 ~0 X0 B0 l" W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 q+ A4 m+ d. X: j9 ?- h) C+ J
to_str("in der Andockstation: \"",?.~.name,"\""));3 Q; z0 r6 C0 S- |
else2 t% ?8 ]* _: Y( V! `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 X+ \0 f; \6 ~$ a- H0 s! O to_str("in docking station: \"",?.~.name,"\"")); - G" Q+ q& ]) ]! f: Z
end;" R3 J" V- r& C8 k) _1 {1 [ h! r
else
1 f; o! v$ n1 y0 R% B7 g @.Destination := assignLObj[1,row];" a) d# A2 r. d2 `5 c+ y
end;
2 p/ E8 c& v% B- N) ~' Y newDirection(@);5 W0 H( h& W+ B0 ]( o
@.HasOrder := true;0 s# S$ D5 {7 H9 w3 \( l
end;
! X& L: {% g9 z. l Y2 V. r end;' V2 v& x! ]5 O$ @% j% M& h0 V/ t) l1 Z0 O
end; -- of the method. |0 k. Q' u! ~ Z, Z7 Y: F% i
|