/* called by: entrance ctrl of the object 'track'
6 P; e; c W w" ` M. ]7 k*// g# M3 P9 f" A" ^
is
2 v2 ~, I8 r* M" a$ I: A part, GlobalDistObj, assignLObj:object;row,Lan:integer;; c( n1 t9 s9 _ g, H
do* D0 E% f4 d. Z3 H9 ?, g$ W
Lan := rootfolder.Internal.Tools.AOLlanguage;$ i2 x' [3 S" X( ^; S! N. S/ f( o
if current = @.Destination -- else return
; V% [$ O" D" Z) b then! o# E8 m* H5 ]* p4 p% g
@.Destination := void;
1 Z7 G3 y% G# A7 T+ l& H if @.occupied then
+ s" H9 k) O0 Z( ~ part := @.cont;" v% e" C3 M" ^& a
@.transpOrder := void;- U5 `5 K( k' \& N7 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- l; O6 ]0 E( S9 A5 U @,root.eventcontroller.simTime);
' |! R. U! b" J% U; ^9 h: } @.HasOrder := false;
( P- L" i2 {) @1 ` @.DrivingHome := true;
; S3 E5 B$ @0 N9 Q4 [ rgManager.tryToStartTransOrder;% {9 [$ T4 Y. ~
if @.Destination = void
% l2 H) r& h2 @) I* n. o8 } then -- no transport order for vehicle @6 g0 s, l% m8 }7 p. V$ {
@.Destination :=
. y ?- t8 q" B Y rgManager.nearestFreeStation(@,track.~);
+ J) w3 j/ v) x! P: W0 d newDirection(@); 3 `, f _% k7 X$ g! t+ T
if @.Destination /= void then' p4 a. c7 D1 A/ P' W
@.Destination.NumReservation :=, Y+ Z( f2 l A" n" s
@.Destination.NumReservation + 1;
% Q3 B ~9 l+ Q1 }" v end;
1 W/ p7 T0 }/ J- ]4 K- Z @.CurrIcon := "drivingHome"; J. Z, U& A& @, L& m5 v2 G0 n( o
@.DrivingHome := true;
- a+ r! X! e; ` end;
9 ^6 [ |# j% K/ j else -- the vehicle @ is empty, both vehicle and part are in the same dock station: J6 Y7 B+ W7 w6 l2 }! b, u: K# b
part := @.transpOrder;3 V/ ~! X! [/ N& @' ~5 X
part.move(@);-- load part
9 v+ x& _" D& v7 r9 N: o( `2 L- ? @.CurrIcon := "load";
% s7 R t3 i; g" u" K' I4 C GlobalDistObj := part.globDestination;3 E1 J; j% ^& k! ~! W) J
assignLObj := rgmanager.rgAssignL;- C0 |# L$ T# N$ V A
row := assignLObj.getRowNo(GlobalDistObj);
& v, ^( Q$ f2 n- @7 m: N if Row = -1 then -- since 706 S- r. k9 V! i
if lan=1 then
9 p/ y! h2 T6 w2 s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' T1 I$ P8 ~1 M4 n3 X& {
to_str("in der Andockstation: \"",?.~.name,"\""));
4 L6 e7 ?0 e" p else, o: C2 Y! ]" T/ d3 M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," T7 _3 Z T# {5 T7 @3 Q6 s
to_str("in docking station: \"",?.~.name,"\""));
- A4 P% `) v8 p% \$ Z1 x end;% W z( F: m' k* y
else
3 ]8 U0 _3 N8 ^: o @.Destination := assignLObj[1,row];
, e# i- ~' a% A7 G; d end; , f+ X# ?& B5 U6 z$ C& x: W
newDirection(@);5 i8 q ?: \" B9 c# U# }
@.HasOrder := true;
2 Q5 D( Q& _/ u6 a2 W$ J end;" L' ^. g! s( C' v
end;
+ G+ A0 `# Q) H6 C) ^end; -- of the method
3 ~; h% V+ O$ @3 H4 N% e |