/* called by: entrance ctrl of the object 'track'
4 ?, s: h3 t3 a5 A*/
5 I* k4 c) G; U$ Gis/ c, A0 k1 U" |4 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 A7 C+ x' C7 v) Y$ ]* G* s* M
do
5 J; d! r- H4 r1 H1 P# q8 W Lan := rootfolder.Internal.Tools.AOLlanguage;: P6 T, U# e/ k- {
if current = @.Destination -- else return; s6 K; d/ ~+ q3 \- s. U- ^
then
+ z. ?; x) B1 n @.Destination := void;
3 X" C0 S. V" ? if @.occupied then0 g! R& Q' R7 V: e& E
part := @.cont;% j. t" D& t* Y$ j9 a9 p
@.transpOrder := void;
+ K' }+ [: Z3 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 I) W* {+ o# H9 h* R* a- _ @,root.eventcontroller.simTime);* d/ [ u8 j+ ~$ x9 q8 X2 t
@.HasOrder := false;$ n( Y' G. {# @' E
@.DrivingHome := true;' {/ d* Q F6 B& x
rgManager.tryToStartTransOrder;
8 F( H! m( e1 t* O8 z if @.Destination = void) D0 v: A4 ` h6 r6 k
then -- no transport order for vehicle @1 b3 P5 P5 U4 g- ^- Q0 V
@.Destination :=
# _% V2 X$ F9 D% ~* x8 ^ rgManager.nearestFreeStation(@,track.~);5 C6 L8 E, p$ X5 z0 x
newDirection(@); 4 C+ U6 o4 W6 ^" F- M4 d
if @.Destination /= void then
" m* ]. s2 W. e# n' ` @.Destination.NumReservation :=
$ h2 o" q8 y1 n5 V; x5 l @.Destination.NumReservation + 1;
/ n ^) j0 s& `( K end;
! `2 u: |8 H$ A! O, G+ R @.CurrIcon := "drivingHome";
) I" @! r' C) o+ _ @.DrivingHome := true;
. y; y+ W3 Y: W8 h- N end;3 O& H+ H% w) L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- z7 v" b! w# k% e0 ^+ i
part := @.transpOrder;
9 Y# e0 z7 m4 O7 \ part.move(@);-- load part
9 F3 y9 F! F- v+ R @.CurrIcon := "load";
" ?1 \0 x0 Q: O+ T, v. q V3 @ GlobalDistObj := part.globDestination;2 u; k- J+ s! c- Y) [" q5 b k
assignLObj := rgmanager.rgAssignL;
) v. u# s# R; C; O row := assignLObj.getRowNo(GlobalDistObj);
+ f- @9 J9 _3 M if Row = -1 then -- since 70: T+ f, T9 c) M
if lan=1 then" ^- n2 }1 p* r: A7 _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 `% g9 V2 U* c, A Z9 s to_str("in der Andockstation: \"",?.~.name,"\""));
* W) D! G1 T* Q3 A* k+ ?: v else
0 [% _1 @" A% ]9 M6 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ L& D; [% m4 E) B/ K; R to_str("in docking station: \"",?.~.name,"\""));
4 N/ g2 Y- \+ k end;
) \7 T O H: r else
! n! w( A0 G2 B! r& e7 D' e @.Destination := assignLObj[1,row];
7 b9 {5 y; W) L end; 2 E! S/ A8 `4 D: |' @/ W- k( X% K
newDirection(@);
$ y, M$ U7 T2 x! ~8 ~5 \: b @.HasOrder := true;* k1 b# v% M1 v5 B4 H" K
end;
7 i3 w# L% y9 P x end;8 A* ~6 L+ F# Y: J6 Q6 d
end; -- of the method
" I" F6 K0 B" h. l2 Q |