/* called by: entrance ctrl of the object 'track'
6 ?- N- w& J- d) M6 S7 x6 }3 u$ g*/
0 o d. |5 l \is
) |) b6 i' @7 X) M6 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;: w D: u) Q$ G
do
" S, c, E. ~2 j5 J# T Lan := rootfolder.Internal.Tools.AOLlanguage;
7 W5 @9 C* Y; t; @) b if current = @.Destination -- else return
' K) _1 \! e8 f8 Z' {+ U6 m then' H3 W, @4 i- s6 @: M0 D$ `
@.Destination := void;
! Q9 C) O5 \. ~) a1 D if @.occupied then
' _/ n! B2 I$ m( N; p$ Q' S0 p1 ? part := @.cont;, S; r( {( N5 }( G* M
@.transpOrder := void;
6 ~* [6 B9 x5 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 H! X# n- G) n$ p5 @+ L @,root.eventcontroller.simTime);8 E! s$ D# B/ t$ f2 i9 i
@.HasOrder := false;
" i; \7 i# a& O* E4 w1 O3 M5 p @.DrivingHome := true;
! j5 P2 R d) Q" q8 c" b! c rgManager.tryToStartTransOrder;9 ]8 ~5 T* S1 P5 G
if @.Destination = void
+ Z" ]1 g- C: V+ v. [2 Y" q then -- no transport order for vehicle @' H" Z: s6 }% A% ?7 F" x. H
@.Destination :=
$ W; r0 [6 s- x rgManager.nearestFreeStation(@,track.~);6 f+ ^8 B9 M% m! C k2 s2 @
newDirection(@);
: Y+ v) b' o. A, n if @.Destination /= void then
$ X' s3 Z* `3 U$ j3 [+ | @.Destination.NumReservation :=
' m6 b$ Y, l' x" _' v @.Destination.NumReservation + 1;
; j: G8 V$ ]; P; H end;
! ~- v B0 a( q- y @.CurrIcon := "drivingHome";
2 m; U" H$ Z+ g1 c* K% B6 G$ O @.DrivingHome := true;
8 U; h! L6 E9 n2 z( |4 } ^ end;
& Y Y# h9 K; R3 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station- w2 [. I/ v$ ^8 R7 N" }$ U
part := @.transpOrder;" s8 J1 i% }; b9 p: k7 b; e* S4 `
part.move(@);-- load part/ c1 T4 E+ p( a) ^
@.CurrIcon := "load"; W3 z0 T3 ?) s
GlobalDistObj := part.globDestination;
- R( Y7 e( Q" K% n% R; {# F$ q assignLObj := rgmanager.rgAssignL;5 a E6 i7 e8 K& R6 k
row := assignLObj.getRowNo(GlobalDistObj);
+ a$ N# ]* p, p if Row = -1 then -- since 70
) o* {6 I% g. s) E$ S if lan=1 then9 E3 C( Q: x- n* ^5 N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! D6 M/ N$ |# Z) z7 R0 m
to_str("in der Andockstation: \"",?.~.name,"\""));
: c C8 p: ]- k! _ else/ A) z0 D6 I2 c8 j9 Q9 b9 i* U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; L' c) i! | O9 X. s
to_str("in docking station: \"",?.~.name,"\"")); * C# I$ C; ~. n- N* P2 H: Z& x6 T
end;
& Q+ s- N8 K, l) `( i else
& F6 C" g; @5 ` @.Destination := assignLObj[1,row];% B! k( J. S1 O* a; f! x
end; $ J) C; g+ i2 s/ A5 f* v: R
newDirection(@);
3 p8 e6 e' h& R$ J @.HasOrder := true;
7 M4 h) m: D; l+ ~' E+ w/ | end;
8 r1 U% }% n# n- U1 U$ F9 t. H' b end;$ L& ~9 k* C/ R, L3 f
end; -- of the method
) _ J% {% u _& B) l |