/* called by: entrance ctrl of the object 'track'' k1 C1 F! G/ b3 l$ v% B
*/
5 j2 g0 \! \' u8 x' P& w. Pis/ A, o! b) E0 P4 A* a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% {4 F+ b; Z+ u; tdo# l5 ~7 @, ^% ^) [( I
Lan := rootfolder.Internal.Tools.AOLlanguage;( D6 y5 j9 O) B: t2 E
if current = @.Destination -- else return
+ t9 O: {# }' l M B0 ] then5 n* N" Z L- ]) s z0 S$ v" u9 K
@.Destination := void;( C$ k5 h/ L# U' z, \- t
if @.occupied then* Z- A& G; w9 ~( ~# o2 @- i
part := @.cont;6 z3 |" A9 `$ A
@.transpOrder := void;0 K0 q J3 |- t. v8 \4 U5 O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 u/ G$ V* D# C% y+ i
@,root.eventcontroller.simTime);4 V: N7 M9 D( F/ U N, K
@.HasOrder := false;, `$ I2 g# \& p' x
@.DrivingHome := true;
X& T: Q8 S, m+ B5 N& { rgManager.tryToStartTransOrder;
/ o" `. U1 b T& c( M1 u+ [+ `) K if @.Destination = void
' V$ c/ R7 J( V D. p, s$ c( N- P0 S then -- no transport order for vehicle @4 o6 z' Q) v' n7 x, N
@.Destination :=. b4 o/ b ~# d4 m& F; W3 i
rgManager.nearestFreeStation(@,track.~);4 `5 U/ H2 a7 O' ]/ @8 v9 W( ~
newDirection(@);
- z s* o# [: J5 l if @.Destination /= void then3 C( W; t# D' T9 f' P2 A% |9 b: \
@.Destination.NumReservation :=
) u" _& I' r" ?9 a- c @.Destination.NumReservation + 1;6 z; C- |! o% Q- I
end;6 Z. O& q2 m* \6 y
@.CurrIcon := "drivingHome";
$ I: v% V* F% `4 n# x/ c( h* J @.DrivingHome := true;
6 K+ @6 z" [4 w& c y8 D end;
8 ?# Z& V% n* E7 Y* w( w else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 ~2 Q; O" x6 R7 x7 @( y$ w' ~ part := @.transpOrder;
; \8 h5 p- o- J4 G3 l+ B9 f" o& F part.move(@);-- load part
0 d l( {( N6 p6 E @.CurrIcon := "load";
; c- S" i5 H, B; `9 @( ~3 A GlobalDistObj := part.globDestination;
n+ [7 l3 h. }9 R: s- Q* s assignLObj := rgmanager.rgAssignL;. d) y+ ~- d" p/ ^0 Q4 z! w5 `. _. C
row := assignLObj.getRowNo(GlobalDistObj);2 g) D6 b! l) }" H7 o6 l+ D3 ~; L
if Row = -1 then -- since 706 q6 X" a+ @& W0 O5 c$ w
if lan=1 then
1 v% u. u4 w% k2 q( d: z" y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; K" ~# Q. [% R- g0 M& J/ n
to_str("in der Andockstation: \"",?.~.name,"\""));
9 u% s: E; e( t, M else, u+ r5 Y/ H5 j+ j9 [4 S! c$ ~- u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% H* f! L6 y5 J8 W3 R1 E
to_str("in docking station: \"",?.~.name,"\""));
5 A! E, a+ p9 D/ O! ^% [2 ^6 B end;
9 a. e! n8 Q- ^( C0 C. ` else3 z2 j$ A9 L, C |! I
@.Destination := assignLObj[1,row];
3 B7 e# }; v, a. Y- U end; , Q! c" @0 S& n$ u' X5 D" P9 O
newDirection(@);
9 I: l" X' P, ^/ i$ F# S0 U1 x @.HasOrder := true;
% U! s4 N8 o$ V/ B# W0 @' K) B) B end;. u! R* F# T6 K/ C9 G" G; [& W
end;
. X4 ^# [6 c6 z; m, e/ `end; -- of the method- v8 f2 v6 k; V/ F) S( Z
|