/* called by: entrance ctrl of the object 'track'
1 G0 j/ ]0 t J' p5 K*/
8 G/ X6 W' n' b- v1 U$ I7 K- Ris% v/ U* v% [1 b3 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" R8 ^& c b7 [% K% K
do9 a6 ^9 r. ~2 K: O3 q. t$ ]$ R
Lan := rootfolder.Internal.Tools.AOLlanguage;. e2 J6 j4 J9 g' p! n
if current = @.Destination -- else return
' Q. W! R1 w ~: a5 W then
0 C# U# L( J3 [ @.Destination := void;! J) A( r& S+ u0 f( o: u) W
if @.occupied then
) P2 u, r) ?2 b part := @.cont;9 H& n. J, H9 B) S1 l4 x8 x* F G- j# g% q
@.transpOrder := void;
^( {: z/ N; |9 c6 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 m. F8 [0 G* a; W% H2 _
@,root.eventcontroller.simTime);
3 D* }! f: T4 h/ m1 t, y! L @.HasOrder := false;) w! B* _" k# g) B' G2 Y4 D
@.DrivingHome := true;" V( W# O! j1 T
rgManager.tryToStartTransOrder;" A Q$ w3 [) B+ R% h0 Y) {
if @.Destination = void) X. u B) C' k$ q) o
then -- no transport order for vehicle @% e" P7 i$ j5 D8 z- y
@.Destination :=
. R% z8 s0 N3 ?7 e9 P rgManager.nearestFreeStation(@,track.~);: G( u% Z# V8 B9 P' b% K6 u4 J
newDirection(@); - `3 |9 W; `- K+ m2 M! V
if @.Destination /= void then
+ @; w4 ~1 @. c( T9 n @.Destination.NumReservation :=8 `3 {8 a/ Y* I5 z$ k0 `5 ?
@.Destination.NumReservation + 1;
6 h8 x7 V6 S4 v+ ~5 W! W9 o" P B end;
6 u! C% `3 F- p$ C2 n @.CurrIcon := "drivingHome";
- S) X0 i* ~/ o: c( h( @& M @.DrivingHome := true;, i9 f8 }/ q8 G# r- L" }
end;4 A7 m4 z; o: D/ W0 X) N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 h- X2 L, W5 s* U( w9 U
part := @.transpOrder;) t6 ?3 m" y3 u) d1 }
part.move(@);-- load part
6 F6 h9 p. a6 ^0 V @.CurrIcon := "load";
1 o+ Z, Q; S; M3 A GlobalDistObj := part.globDestination;7 ^0 \1 I6 s% }" {, E6 F" f6 ^
assignLObj := rgmanager.rgAssignL;
) D- U' m6 z1 K# \0 d8 U. Z0 o) e row := assignLObj.getRowNo(GlobalDistObj);4 {) y$ U2 V4 S* d! K+ H ?$ q/ U
if Row = -1 then -- since 70
) r3 `3 a v1 j8 F if lan=1 then
% \* R% @8 [! m3 {1 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% ]: f7 i* m+ K2 q
to_str("in der Andockstation: \"",?.~.name,"\""));% L. L# n8 `* \
else
4 E u: X5 g+ @5 S! T7 F8 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. \) P4 J, R/ D5 z
to_str("in docking station: \"",?.~.name,"\"")); : I ~7 F7 ^; @+ K( S
end;
O! B. m5 I: ~8 p n/ @- S else
2 C0 A4 T2 r* O5 b @.Destination := assignLObj[1,row];+ C, ~4 `4 s! ]3 s8 \* H% v
end; $ \9 d4 F# m! u( W
newDirection(@);
! O3 `- S! X* g' n$ n/ E @.HasOrder := true;8 ^2 G4 ]; }4 _- [
end;/ V4 i" k; q ^6 \% x
end;- \8 f5 I" Y- X& a: z" C
end; -- of the method
0 D* u! M/ a* O% k$ y3 `! f1 L4 w |