/* called by: entrance ctrl of the object 'track' x5 \$ n1 c! [' \& u/ `
*/0 s2 c; g# ?- g! Y
is0 |4 i0 V; x& Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% ?* C( C; {3 ~6 Gdo
9 J! Z4 m% C& Q0 r+ l% W Lan := rootfolder.Internal.Tools.AOLlanguage;, G$ \9 a/ G* s
if current = @.Destination -- else return
5 _& {: p1 l) v& R then
4 N; g' F5 D: [8 s; a4 ` @.Destination := void;
n3 X5 k s# ^% s) o! H if @.occupied then
' |$ H# P. T/ [6 J part := @.cont;! R$ M( Y0 }3 l
@.transpOrder := void;3 W5 D" k8 b( f7 M- V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ P6 e2 s, P( {8 ?2 D @,root.eventcontroller.simTime);
3 \+ X+ M4 P( ~5 {4 Z7 u3 m7 u @.HasOrder := false;
6 h0 {6 D% |2 b9 Q T. Z @.DrivingHome := true;; u$ x4 c1 U0 _: x% h5 q: r
rgManager.tryToStartTransOrder;0 t: e% M/ P* Y8 y
if @.Destination = void6 M! J9 ~4 d' e7 _! u. k
then -- no transport order for vehicle @0 P- Q3 R8 _8 f
@.Destination :=' m/ T/ W( v. B- A2 E/ f
rgManager.nearestFreeStation(@,track.~);
- G: z0 Y7 B, P5 n4 \ newDirection(@);
" N U+ O# u3 [/ y H0 c1 L if @.Destination /= void then
" o/ D5 I% T/ k @.Destination.NumReservation :=2 Y" F' g: d, B+ F
@.Destination.NumReservation + 1;
$ p) p$ E" T6 K end;
. |* R4 z7 J$ w6 I! w @.CurrIcon := "drivingHome";
' j' S" s) T H- W( y @.DrivingHome := true;! ^4 W* ~9 h# [7 L* A j
end;) Q8 H: \$ m, T! F4 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: W/ a" _! n4 u% _! O2 j- B) ]! k
part := @.transpOrder;! w! X0 t. f" }' {+ `" |; F% a; U
part.move(@);-- load part/ q) [1 b3 B& |. n! ?2 e
@.CurrIcon := "load";
4 C {$ C. R5 s3 M GlobalDistObj := part.globDestination;# R& c1 q& _7 F; p P. X1 X
assignLObj := rgmanager.rgAssignL;
7 H7 I6 v1 C+ Z row := assignLObj.getRowNo(GlobalDistObj);
. u! y6 i! \" Q O if Row = -1 then -- since 705 K9 m! h8 o) D6 o5 R& a. S
if lan=1 then
V2 T% H6 L# t' C* W9 w) X7 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 V4 `; |, T. m+ m9 a9 c5 }" g6 l9 I* u
to_str("in der Andockstation: \"",?.~.name,"\""));
4 D2 O8 e C3 p0 {% j. P$ X+ F" h# S else/ p3 d' [5 V- \9 Q; s, S) X p5 T1 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. Z4 O+ V$ K5 ^9 b. u- N
to_str("in docking station: \"",?.~.name,"\"")); ( e8 J6 a8 ~: ~6 L5 v8 }) `
end;" q! O7 _; X+ E* s3 Y% x# b
else
# D! J9 v! l- Q, } @.Destination := assignLObj[1,row];
' N V" q H3 S/ V7 B4 i( M end; F% N2 a1 l: a( C( z) W* E
newDirection(@);
7 k% h# e/ T; B7 _* O @.HasOrder := true;
6 c& D! W9 }% T7 a, G5 | end;+ ]0 F1 @ e, h+ a
end;% L$ a( g x: m: W
end; -- of the method1 c, r* a1 g& t; X: u5 r
|