/* called by: entrance ctrl of the object 'track'% Y& D0 s7 Y$ L- t- V9 ]# W
*/+ [+ O# E/ t& p6 d
is) A4 \7 g; r: \# `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 J: W) A4 U4 y# a; F( n
do" @4 c2 e& l3 I# h; {1 g6 ^ W
Lan := rootfolder.Internal.Tools.AOLlanguage;1 j) Y( ^0 d/ G
if current = @.Destination -- else return
% _) n$ M6 u% c3 e then- X! X* r1 y& z
@.Destination := void;
; A- |' b. Q7 f1 Q if @.occupied then
- l7 C6 i3 C6 B( ?: X part := @.cont;+ Z& D% g& S0 z% A; q
@.transpOrder := void;
0 U+ N% ~# m6 r. M+ S: n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 h' T4 d( y9 R/ |2 t
@,root.eventcontroller.simTime);3 t! w* J) |) J" S/ B3 j# X
@.HasOrder := false;
- B. I' }4 O4 n, W; p8 O @.DrivingHome := true;
, |3 C' |( D9 e& ^/ W' v rgManager.tryToStartTransOrder;$ l4 z, Z5 L# F' m4 y
if @.Destination = void5 [% m( B7 c. D, ]3 ]8 M
then -- no transport order for vehicle @
5 N' \" B' ^, `/ I; V @.Destination :=
1 q9 M. W) ~9 |# x: D* E rgManager.nearestFreeStation(@,track.~);. V" q6 z3 [6 k5 Z( W% P
newDirection(@);
" l9 V! L! C) T/ r! G if @.Destination /= void then
/ T; X6 b8 @$ H" u( W" [# v3 P @.Destination.NumReservation :=6 p7 `. ]. J: W( f l
@.Destination.NumReservation + 1;
% z2 O6 N/ g; X$ i- O* [ end;8 {% u# i S' X5 T+ K$ T; @
@.CurrIcon := "drivingHome";
: j4 K6 V6 p/ b0 w. \ @.DrivingHome := true;
% V& n9 n) b$ B) _ end;% @0 q+ E2 J* N6 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 _1 q9 m$ ]3 C- N: f
part := @.transpOrder;4 p- p. q3 q# s* R, ]- G+ i
part.move(@);-- load part9 x- J a3 _! N( E
@.CurrIcon := "load";
, \( p. [* w0 E: f7 K3 L GlobalDistObj := part.globDestination;. y% ?! p! ^& p. q( K x3 I4 ~& u
assignLObj := rgmanager.rgAssignL;
( G. T$ F4 t/ b% r# J0 y row := assignLObj.getRowNo(GlobalDistObj);+ X6 |: Z; _+ f8 q$ S8 Q1 |
if Row = -1 then -- since 70
+ r% J+ W4 [6 @5 \1 a- G! c if lan=1 then
$ |. `% r- ^7 T( J/ w+ z$ O( o# Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 b# { \; o# F) z% \! H
to_str("in der Andockstation: \"",?.~.name,"\""));+ W+ W- D. U5 V) }0 J
else
# g) U/ G. w. ?: _! U: Y$ B5 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& Y. Q' ?8 X# f* B! S8 z6 ~( k to_str("in docking station: \"",?.~.name,"\"")); 4 D( g% _8 ~" S' l, r' `4 f! V# Z
end;
5 s9 {! G1 X0 S0 N* `3 j3 U. B7 Y1 ` else
8 F9 I0 i: i6 Z3 T @.Destination := assignLObj[1,row];9 \0 q& B. O# z( j. G$ q" G
end; / Y+ d" N$ U( D* P' P6 V9 ~
newDirection(@);
+ y/ a$ Y% S0 Q3 y @.HasOrder := true;# ]" A! ^, o- W0 l2 _$ }
end;9 P# F( x/ T$ Z1 h7 T9 G
end;
; G1 P! O) |, T. [3 [, N2 v5 O7 ~end; -- of the method7 ?0 A6 N; M6 {# b* c( ], R
|