/* called by: entrance ctrl of the object 'track'
7 ]4 q5 z/ {6 r*/; }: S0 ^: U' @# h
is
2 M( s6 e& k5 b1 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 Z2 Q o7 I i0 o) q
do
% e& v6 K+ l+ N8 T M1 |, s4 c1 s Lan := rootfolder.Internal.Tools.AOLlanguage;
) n' a8 |% M p# A if current = @.Destination -- else return
$ e3 ]) t/ H' ~# e then0 M- Z; O6 s0 h8 Z$ f7 X. y8 N( M
@.Destination := void;0 N% X9 Y3 E* S a$ v% i4 L- r
if @.occupied then4 u8 o$ A: A3 s+ b) u
part := @.cont;) M0 C4 J! Q; \; ]3 M
@.transpOrder := void;6 {) \+ |. ~: Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 }& q2 H w1 N3 f; W( V @,root.eventcontroller.simTime);
( B9 G3 Q; `7 a! H, w @.HasOrder := false;. n. D: y; z3 b4 A0 { t
@.DrivingHome := true;- c: S5 h, W' K/ T- F9 N7 n# c7 V
rgManager.tryToStartTransOrder;
% d9 S- s! Q7 J1 y1 @ if @.Destination = void
$ h+ X9 d% D! [( | then -- no transport order for vehicle @& X2 y9 L7 ]2 q0 U0 [1 A
@.Destination :=) u# ~/ X" B; w5 p; D2 h( {
rgManager.nearestFreeStation(@,track.~);
/ X, l4 q0 S/ F' ^* S$ Y! g newDirection(@); 9 t/ ?' o- `) f4 f
if @.Destination /= void then( ^+ ^$ l% i1 _) x& W/ T
@.Destination.NumReservation :=# a, \ S5 y" Q0 u g* H" I
@.Destination.NumReservation + 1;8 l( T: k5 N1 {% ^
end;$ f! q, \0 Q/ T+ j/ l
@.CurrIcon := "drivingHome";) K1 [! n# v. ?8 Y* Q, |4 h
@.DrivingHome := true;& g. Z; i- a2 y ~0 E, D% U; K
end;
* q$ m5 c& S9 \4 w, ?/ x9 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 E5 o4 o+ v# L9 o& o part := @.transpOrder;! o( F# Z* D# A1 j2 H: Z
part.move(@);-- load part
3 r3 x3 Y8 J5 D, M. F @.CurrIcon := "load";
5 i) I6 u5 f8 X y" w9 _ GlobalDistObj := part.globDestination;3 C% Y# N5 N2 i3 N
assignLObj := rgmanager.rgAssignL;0 Q3 X, _3 b4 Z: T% E, }" b5 O
row := assignLObj.getRowNo(GlobalDistObj);
9 K$ j( g5 Y8 n4 r( Z+ n4 f2 ]5 \ if Row = -1 then -- since 70
6 d! ?) J+ ^' r! o+ V, Z if lan=1 then: A* G0 i5 ?0 j2 w% K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), w% X8 X: n7 k6 O! k, C6 C, E1 I9 h
to_str("in der Andockstation: \"",?.~.name,"\""));
' M7 q3 C, [/ @8 W+ b" ^ else4 [% C" k5 H: n+ k( S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 b3 u4 @8 _7 M: C7 K% ~ to_str("in docking station: \"",?.~.name,"\""));
8 Q1 q9 q5 `% R! z1 k end; S0 D) t$ |0 p4 \. E
else( c* G% i( `1 [- R
@.Destination := assignLObj[1,row];
% h3 Q) D4 _$ H; U end;
5 {2 n. [1 J7 S% _% f newDirection(@);
}. \! V) w. d+ ?+ d( d! V @.HasOrder := true;* Z# Z5 P, B* D3 L' f! L
end;
8 S5 [2 a5 L4 t& h8 O) ] end;
4 H" }. R+ d6 x5 |" g8 p- eend; -- of the method
+ Q* g4 D( t* O! r0 }* | |