/* called by: entrance ctrl of the object 'track'; d; U- Y* w; ~
*/
6 C$ N* M" A% J( `9 dis8 b; ?( T# a4 X+ i' ?4 j# Q, X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 L$ f5 H. k$ Q& p9 _ s
do2 \' p. E. Q6 o' f
Lan := rootfolder.Internal.Tools.AOLlanguage;
: N, N4 _5 t. i. |3 S if current = @.Destination -- else return- e( F# p/ v# S7 J$ W, M
then
( C5 {; ^) l' q" A. d Y4 D5 U9 q @.Destination := void;
c9 j' K* a5 |* }% X$ | if @.occupied then$ x" n1 j- g7 x* M- ?
part := @.cont;! r9 @. t. `8 p: y6 @6 p
@.transpOrder := void;
$ q: j$ T" ~* X8 @8 \: K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* ~/ Q9 z1 g" X* B5 M @,root.eventcontroller.simTime);
" ^- ?0 \) O0 s7 F1 b+ N @.HasOrder := false;
( E* P2 n! Y9 f @.DrivingHome := true;
; {6 R2 R: H+ ~" G. U5 _ rgManager.tryToStartTransOrder;# n* N$ d% @$ w: T1 s" e
if @.Destination = void3 |, }5 P: D4 s$ C- {: |; s, g3 c
then -- no transport order for vehicle @
* K# }% c/ k/ T7 a @.Destination :=
- p; S0 `/ z+ {7 T2 h rgManager.nearestFreeStation(@,track.~);1 S4 c. ^, `( Y) v0 A! [# k: H
newDirection(@); " ]( Q5 S( f: n8 R2 z+ k
if @.Destination /= void then5 \) D& S: e/ _0 E; R& L1 ?
@.Destination.NumReservation :=
3 r! ?* V$ m# B( E3 K% n- Y @.Destination.NumReservation + 1;
: D# |! ]$ e* x. I! R, | end;( D" F; t* n8 O& J7 i
@.CurrIcon := "drivingHome";8 s# ?8 x: {2 o7 l$ H
@.DrivingHome := true;2 M1 N- J9 E' A0 V& h# o
end;
} o* T1 ~1 |7 J, C( p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
J* C# B$ C0 T" a part := @.transpOrder;
. V) f# V) e. j3 \5 b part.move(@);-- load part- c/ j; ^ d. N8 W9 Z( [4 O
@.CurrIcon := "load";2 J' l- A1 p9 Y4 q, Q
GlobalDistObj := part.globDestination;
8 |3 n4 k+ O9 k1 D1 K. B assignLObj := rgmanager.rgAssignL;6 f; t' }+ y' I# x
row := assignLObj.getRowNo(GlobalDistObj);
! f& p8 `3 Y- H7 p8 J8 m: \ if Row = -1 then -- since 70
4 i8 {8 {" }; j v if lan=1 then
& ^% s/ B- V7 Z! y' d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," ^9 _& [! G. r
to_str("in der Andockstation: \"",?.~.name,"\""));
; [6 M- O. n" ? else
. K0 L2 E/ n% c3 l4 P, s( Z7 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 D9 q1 O% t- j
to_str("in docking station: \"",?.~.name,"\"")); / v) H+ G+ L1 S6 J# a
end;
. O0 d& Z$ ?0 Q- o( ?( @. h" b else4 ]: Q0 w+ I9 f# |. F% ?
@.Destination := assignLObj[1,row];. N, |8 k6 I- i9 t9 g3 f
end; 9 X B8 u. I9 l9 c
newDirection(@);+ T* x; V# [" W0 |
@.HasOrder := true;/ u5 }4 X5 A. C, c# i4 u: y% p9 k P0 N
end;
) H& D6 f1 X- a/ A end;* ]- c6 q# C/ e' g
end; -- of the method4 |- |; `1 h9 B6 h( [& N
|