/* called by: entrance ctrl of the object 'track'4 \, h S6 s) g
*/; A! X/ V* n. I; m4 c
is
% u6 V' @. K% y2 I5 r% _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, T! ~3 S- |( ~; N( V2 S9 wdo
w* z; o; l9 C% X1 l9 M+ W Lan := rootfolder.Internal.Tools.AOLlanguage;
0 Z" y8 f2 d6 Y; G3 ?% \ if current = @.Destination -- else return# E& X1 \0 { _$ A: y* R4 ]2 V) z
then
1 c% J: h3 p* o4 ]" ] @.Destination := void;
& r C! e/ x. |/ U6 L9 e if @.occupied then* n: y" H1 f1 ~# F0 Q% C
part := @.cont;! r7 m) f9 }. v: l2 D3 F: R& Q
@.transpOrder := void;4 v9 ~0 V( P1 f8 v3 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 n/ C( Q. q: c" j* X& ^ @,root.eventcontroller.simTime);
) _5 j4 [5 F- I$ ~( j+ g @.HasOrder := false;
* x9 u5 J( e# i" _6 B% i% E8 ?! b @.DrivingHome := true;
+ A6 C! q1 k7 f) Y3 j+ q rgManager.tryToStartTransOrder;
% A5 r9 T. J2 g: j if @.Destination = void
5 Q3 ?8 E; C: a1 `% O0 K. M then -- no transport order for vehicle @
, [8 k. z" u( @7 ^0 G( ^ @.Destination :=9 m7 y+ k+ r+ I' I
rgManager.nearestFreeStation(@,track.~);- V' Y" W( V6 q
newDirection(@); 1 U# I& i& M( b
if @.Destination /= void then- k0 P( H" j% f% B2 P
@.Destination.NumReservation :=2 j. \/ w3 r9 e0 S5 p8 a5 \) _% @
@.Destination.NumReservation + 1;) o. n6 K' ~) |! L1 h% a
end;
6 k& S0 |, w1 A5 j' h @.CurrIcon := "drivingHome";4 G, l/ M& X- L. L/ I7 z; B0 n$ j
@.DrivingHome := true; j- V' Z' u' | y9 b. T
end;! G# o) J: h( L" V _$ M" y& i4 R+ ~0 [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 V5 r) h( J3 v1 N' r
part := @.transpOrder;
% M/ \4 m5 k( p) l" }2 O8 V# E& @ part.move(@);-- load part
, I, f. x @- P2 `6 e @.CurrIcon := "load";
" E R( U3 h1 T2 n GlobalDistObj := part.globDestination;3 L: J2 ?; M! k
assignLObj := rgmanager.rgAssignL; V7 {" z% T' W4 l- r; d0 h
row := assignLObj.getRowNo(GlobalDistObj);' E2 E( @# G: r) E
if Row = -1 then -- since 70- A: q2 y/ Z, F' O. ]
if lan=1 then
0 q- h0 Z3 L( \2 P" H+ n! ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: a+ M; {$ f" x5 L, K% x
to_str("in der Andockstation: \"",?.~.name,"\""));
/ k3 C- P: w8 e7 |7 O! I$ N( ^ else/ ~' S4 Z+ W5 ~! F$ o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 u3 f( d ]7 N8 q+ ` V+ [: r to_str("in docking station: \"",?.~.name,"\""));
: F, ]3 f; i( U9 v+ ?) J end;3 g4 d8 ~9 v9 h2 W
else* s5 D+ @) f& J
@.Destination := assignLObj[1,row];: `3 S* }. W. s$ ^! S7 w4 Y
end; # m, h: i. }+ `9 W% [, U5 M
newDirection(@);
9 z* }7 ~: y7 o) Z; R+ O @.HasOrder := true;
/ {( ~5 j, N7 g4 t- ?# P end;
8 }! l0 A0 U( U* w3 S9 f: r2 m end;9 h. Y! A8 F/ X$ \- k7 z' \8 S+ X
end; -- of the method5 `/ o8 _! N* V p/ G
|