/* called by: entrance ctrl of the object 'track'/ s% ^5 T! V r# M' f2 _
*/
/ U! T7 k* t: o0 ois
) ?. o" c; r3 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 Q% |5 Y& H5 r. Y3 u2 Z9 ~$ y
do, {% h; H! _- x" Y7 y. b
Lan := rootfolder.Internal.Tools.AOLlanguage;+ v4 |' h- Z7 K% i4 i( M. }
if current = @.Destination -- else return- b+ ?4 v( P* Z8 X# |
then
4 C% @7 T7 J! x' N& i" i @.Destination := void;- v! P# G3 {4 v2 Y7 T
if @.occupied then
0 U% s e0 l- w2 z$ B/ } part := @.cont;
, n3 K! f3 A& z @.transpOrder := void;( A1 I0 p* ^* K: @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! b( b3 U; g& E# M( {$ v
@,root.eventcontroller.simTime);' R h5 J8 @( x1 q
@.HasOrder := false;
7 w4 M1 G% ~" ]6 m0 U& @/ D @.DrivingHome := true;
0 f: K0 ]; ~- _" f rgManager.tryToStartTransOrder;$ J) p2 \) C- h5 p4 s+ ]
if @.Destination = void2 U/ Q" P5 a$ ^ v& @! c
then -- no transport order for vehicle @
4 }, f' P5 j5 Z# h( u: I E/ ` @.Destination :=! J6 M2 _3 w w6 p& I, @
rgManager.nearestFreeStation(@,track.~);
7 I T% A# Y+ t newDirection(@);
4 d2 W0 V6 C8 X/ M if @.Destination /= void then
+ I0 ~9 \; K/ z8 N2 B; B4 Y @.Destination.NumReservation :=1 `8 t% {. J- Y
@.Destination.NumReservation + 1;# ~ D9 v7 e2 o' C; H1 ^
end;
" n% k. f8 p) E @.CurrIcon := "drivingHome";
9 ^ ?# T9 ?7 R- A @.DrivingHome := true;
' P2 r6 }& m& X end;! r! L; g% I: F) [6 j! Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! W: {, A2 U1 h* X, _" H5 f5 T
part := @.transpOrder;
* i0 I5 C7 c( ~4 `1 U/ D" Z part.move(@);-- load part
$ A( g7 m7 F6 I A @.CurrIcon := "load";' ]! P; w0 Z. h3 i9 p( F& d
GlobalDistObj := part.globDestination;
! l( K; }7 j$ B- S assignLObj := rgmanager.rgAssignL;
' L( z. q z3 W row := assignLObj.getRowNo(GlobalDistObj);; ]7 r, w% S4 D: V& L2 u
if Row = -1 then -- since 70' ^1 i7 P( t3 H& _/ C: q
if lan=1 then
) S# Q c: J* B; d1 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# Y, X7 P; J ^
to_str("in der Andockstation: \"",?.~.name,"\""));
+ ~6 Y- ]6 Y; `0 j* ?& |' M; ` else
x7 @$ k1 \2 l3 J7 [& [' ?; l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; ]( O2 v# ], {1 ?, O, |/ D to_str("in docking station: \"",?.~.name,"\"")); 9 O& x* }. s7 @0 S2 L
end;
# y" g/ V3 X& j: r9 ^7 {! m$ C4 M else- ]- C! n, r- ~: S
@.Destination := assignLObj[1,row];
2 \# p& A0 `0 [, z, c- _ end; , J# K! R( Y6 Z2 T# K
newDirection(@);
+ Z5 r* Z! a) I @.HasOrder := true;, j: E( W, X6 z. k2 z5 R2 M
end;8 Y% ?( \, G) A7 B& x5 D$ Q( k4 e# W
end;. _) T# b3 k2 @8 ?+ y$ R* Z/ F. n
end; -- of the method# b3 z% Z4 _" g9 E7 ~
|