/* called by: entrance ctrl of the object 'track', N5 }. k$ \% ]* s
*/
$ u% R# ?& m: e8 Xis$ h7 i. ]7 p/ V2 d' ]! t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- u8 J( E- D. C/ ?4 ]& ydo
8 A- @7 c! K3 n( c& H Lan := rootfolder.Internal.Tools.AOLlanguage;1 X9 A- U2 \# I* { M
if current = @.Destination -- else return
8 _( a+ o. q7 ` V2 q% I6 c; R then
& O: ]# X" w, I0 e8 @% |! e @.Destination := void;( z0 ` R+ ^9 i: t$ I. d( U: C
if @.occupied then) ?; {- m3 P; j' b
part := @.cont;
' Y- Y# D0 r' E2 Y( u! k/ V @.transpOrder := void;
1 F& N) f* ^8 S0 g9 i* c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, r" |8 ]( |+ S, x+ U( t
@,root.eventcontroller.simTime);( G$ b5 N& Z! |' Y
@.HasOrder := false;) E! U5 H m( m
@.DrivingHome := true;
" a2 S! Y% ^' [3 F rgManager.tryToStartTransOrder;
: ]" {# |, ~; W- U4 S2 E if @.Destination = void
( d9 ^! i0 e* o. e. k. ^% ~5 c then -- no transport order for vehicle @
4 L3 [% @* `4 D2 C9 S @.Destination :=
O* O( ~3 i' E4 [4 j9 e! P) t$ G rgManager.nearestFreeStation(@,track.~);
0 y8 g: ?% |# f% j* D8 f newDirection(@);
$ p" c4 Q6 Y( _; f _ if @.Destination /= void then
, e' t0 w+ Z( f: z4 z0 T Z; s @.Destination.NumReservation :=
/ _' m1 J( Q7 F) B. N9 E( h+ k" C @.Destination.NumReservation + 1;% T7 p8 K8 s8 O! g
end;
?! x4 d" h+ Z, _1 x& } @.CurrIcon := "drivingHome";
& |# v* p5 a3 p; ?8 p: H0 ] @.DrivingHome := true;
3 `( F/ ~6 R' `4 v4 Z! e2 y+ }" a end;
. s U0 e3 K7 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station! `( a, p8 U" R: Z0 f- x
part := @.transpOrder;
/ |: m; H) i4 E) h' @ part.move(@);-- load part! O6 |' A. {5 X" j# z5 R6 n
@.CurrIcon := "load";
7 W1 \& r) d* V: f GlobalDistObj := part.globDestination;( q0 Z# i$ o1 z; G) I- h
assignLObj := rgmanager.rgAssignL;! {6 s* G$ y$ X6 k% N
row := assignLObj.getRowNo(GlobalDistObj);
! P, X, B7 e4 B6 C+ f if Row = -1 then -- since 700 e5 {4 J1 f( V
if lan=1 then
5 f! |: i% `% ?5 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ r- j* t: n9 ]. k: Q* ^
to_str("in der Andockstation: \"",?.~.name,"\""));3 b+ ?2 ?+ Q" Z7 ]
else8 D0 Z* P7 \2 u* O1 J5 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 L! E% `. A% M1 k o8 e- k
to_str("in docking station: \"",?.~.name,"\"")); " b5 M! g1 @$ P1 j
end;) p% ~3 L0 Q; P- Q, C
else
7 g: E& y" }2 k: V# K @.Destination := assignLObj[1,row];7 L* h" ^' ]5 e% |5 `! Z" d6 f0 ]
end;
# d( P" D- R' `* G' M newDirection(@);* E p6 O- {4 I9 {. [0 d/ t9 B
@.HasOrder := true;1 |2 B% b" P% @9 G1 p; f: ^ r
end;
6 n0 y1 u6 k1 ?3 F! L end;: r6 U, ]; N7 @+ z3 v4 C
end; -- of the method
( D. x8 G8 q, E" F |