/* called by: entrance ctrl of the object 'track'1 g) |" }6 d, s9 s% I
*/' h# Y Z1 X3 [. k6 }, r- C
is2 ?) l4 t7 P. o6 `1 C- H) p5 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ U8 u( v1 L5 V1 ~. p! u1 G- o W; Xdo
& |: s# A' V( A4 t. B! z% T+ D/ U Lan := rootfolder.Internal.Tools.AOLlanguage;
) k6 @0 b+ N3 ~ if current = @.Destination -- else return
+ x+ m' M8 S( d; ~6 R: } then, ~/ k. F7 L4 V
@.Destination := void;
0 b2 U' r/ T9 i, N if @.occupied then
) U6 f# w6 ^( ~, p. C part := @.cont;
& K% `: Z( r5 W+ Z- z @.transpOrder := void;, w3 v& f5 q! E' m" r1 U) T* e; W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; i; w# F9 r" i; A
@,root.eventcontroller.simTime);! ?/ X) r% ~ n! H! M
@.HasOrder := false;" _7 N3 n+ g' m, A9 x
@.DrivingHome := true;; |/ \- G% s$ X! I& x
rgManager.tryToStartTransOrder;. _* i/ i; S( W! W, p' I) w4 M! E% Q
if @.Destination = void( ~" [2 A ]1 K% J3 d
then -- no transport order for vehicle @
! ]$ Q' Z3 T- z @.Destination :=$ p( m( O5 `% z$ n
rgManager.nearestFreeStation(@,track.~);
! O8 A, E( ~! s) V: M+ { newDirection(@); . H' J; l$ a# E6 z4 ?/ x
if @.Destination /= void then: O3 Q9 U% L$ J c- g
@.Destination.NumReservation :=
! h0 Q" K; a3 U0 [- ~4 } @.Destination.NumReservation + 1;
; ` P# ?- G9 N* N end;+ w$ l. X; {' o4 l- v3 v: z
@.CurrIcon := "drivingHome";
: f! g9 W. B( H9 l6 Y: D; R" { @.DrivingHome := true; S( ]9 h7 e1 O; Y$ u" K
end;- c; M$ n( W5 L0 }* v: Y0 ]$ @ N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 Y+ j) P: y r; E7 b$ Z# q$ h part := @.transpOrder;% c3 m( Z) T r5 r
part.move(@);-- load part: w8 Q9 A7 Y r0 o, s" u
@.CurrIcon := "load";
5 \8 f% \/ V" H5 A/ o) p7 ~$ Y GlobalDistObj := part.globDestination;
% j! G4 }* O3 R% x assignLObj := rgmanager.rgAssignL;7 l: p: w4 i1 h$ M
row := assignLObj.getRowNo(GlobalDistObj);
# w2 J% d( x! X9 U& S ? if Row = -1 then -- since 70
; x/ M: J9 V" y, b5 l1 D if lan=1 then& y0 J" y3 E/ @' K- q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 v% S/ J* e; \( f: W/ _9 _9 z3 q" x to_str("in der Andockstation: \"",?.~.name,"\""));
$ I9 ?. Q" h& H6 F7 X! v# } else
4 |/ V5 f5 O& k5 Q' k& k! u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 c8 Q9 J v' R5 K' R' t( K0 z to_str("in docking station: \"",?.~.name,"\""));
% m, q3 [. b* _& Q. K, e end;, L, ?" m2 ]' c! [% r, w0 y
else( j y8 L2 d( r
@.Destination := assignLObj[1,row];
) C# l) l1 U3 p( K" l- n end; $ [2 }/ v$ y3 ^) ?0 L7 u5 l
newDirection(@);
( x& S: \7 d( K1 l @.HasOrder := true;
3 v' |6 X; a. T# x V end;# H6 a+ w8 m% H9 v _
end;
0 k# M( ?4 [& }6 Pend; -- of the method
5 P, e$ x& {4 P& `/ b8 k |