/* called by: entrance ctrl of the object 'track'6 V9 x! N0 O4 t7 P' ~+ X) I/ J$ h
*/ P# J0 w& Z: x# b% b* a5 m
is
: }( N; v7 o& q5 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;( c j/ k# B* R# x1 O% X# B
do# q* U7 ?* ^! t3 Y U' g& H0 L% E
Lan := rootfolder.Internal.Tools.AOLlanguage;- `: |; o( U4 u9 q( o8 N' \9 j- L
if current = @.Destination -- else return
7 u5 D: i( I% _! L2 T! _ then0 `7 [. v8 u7 V+ P; L" h& R4 T
@.Destination := void;+ S# i( i0 F' u5 y8 X& u
if @.occupied then
9 ]7 `* E0 A, a" p* D part := @.cont;% U, P' e0 u8 J8 B+ Y
@.transpOrder := void;
$ q$ N0 R& K3 J% g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! B" n! q1 b+ }* @0 h; ]
@,root.eventcontroller.simTime);
6 ~) x/ z# ^: ]1 r7 F6 i8 B9 D @.HasOrder := false;
8 z) C' K# B( F/ P | @.DrivingHome := true;7 H6 N" H i& P% k7 i5 q" g
rgManager.tryToStartTransOrder;
) X9 @: s& O5 h, c if @.Destination = void
0 w. o2 R/ q+ F. t" B! c4 } then -- no transport order for vehicle @: e+ n8 Y% a/ [2 q
@.Destination :=) F/ _6 H* O/ w+ d8 ~5 k# m/ m2 p
rgManager.nearestFreeStation(@,track.~);2 f% {. \" x9 f: ?. T- {# W) T) C
newDirection(@); ; ~( u, e! A( R1 `& P
if @.Destination /= void then
* d& q" a6 P2 {5 [7 y+ b @.Destination.NumReservation :=
% j$ {5 S0 {3 k3 x* Q @.Destination.NumReservation + 1;
7 u! F K7 g) u! X0 k9 Z end;
; H( `6 r% X+ q @.CurrIcon := "drivingHome";6 I% g' s7 d9 C: l" s
@.DrivingHome := true;
6 d, o& v% h" e8 ?( V0 F end; l: v$ F: U9 b. M! v8 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 H- h x6 ~% d7 i! J2 u
part := @.transpOrder;! j- @/ ]/ j8 l8 x; l
part.move(@);-- load part
" z" @3 ~# I+ Z5 ~# w4 R* k5 k+ ? @.CurrIcon := "load";
: F8 g2 A3 C& @& Y( i GlobalDistObj := part.globDestination;
% w; b2 n$ f, p9 ? assignLObj := rgmanager.rgAssignL;
4 h+ U1 x8 `- L4 f row := assignLObj.getRowNo(GlobalDistObj);
2 L0 k2 p, I) ^/ n5 z0 G$ v/ f8 V, n if Row = -1 then -- since 70
, ]$ `4 k. \% `1 S if lan=1 then
+ [ E' o& b1 `6 _& y8 i8 F: w4 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. @; _+ } I5 \: l; X) d" q# \7 a to_str("in der Andockstation: \"",?.~.name,"\""));
1 W9 {2 u. \1 k1 [' J else
$ m% _2 z' y1 J: K" q ^: ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" f d1 _& k& v4 ]1 l9 g to_str("in docking station: \"",?.~.name,"\"")); 7 b1 Z8 V# R$ i4 y
end;! R, k0 q) Y3 `
else
2 U' k) f$ d. N: f( @$ y* J5 y @.Destination := assignLObj[1,row];& l7 E6 b5 M, c+ L; f; i- |; N; H% x
end;
3 _8 u5 C8 ^0 K, s) ?, E newDirection(@);
7 A T5 F* P% @" \" A @.HasOrder := true;) J2 X, `9 |; r, D' l* O0 h
end;
. C( k& j3 G3 {. V e8 i end;9 X9 b6 W1 u+ S: G; Z s. Q
end; -- of the method
; c" _) B }' i% z M |