/* called by: entrance ctrl of the object 'track'; g+ M* q) z8 r9 [7 W% T' u W
*/
* H7 R( ]0 E `! S( Iis
$ [& S' Z5 ]& r. d part, GlobalDistObj, assignLObj:object;row,Lan:integer;# P: }/ G! m1 }, |0 p
do
6 _* u }( B- n Lan := rootfolder.Internal.Tools.AOLlanguage;
2 U7 k! c7 {$ R: k" }) n$ X if current = @.Destination -- else return
' E% R( J2 g# y then
7 A8 j3 ?4 {( b! A. W# \ @.Destination := void;9 u$ D. J0 u$ ^4 ?# C1 @( N
if @.occupied then3 h. Y6 W. s( n% ^- r
part := @.cont;/ q. L8 E3 m5 u. F4 L
@.transpOrder := void;
* q/ f+ Y: t5 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 H2 Y# U( ]4 L. H" k$ t
@,root.eventcontroller.simTime);
- ]' G9 d! G) E% r1 U: Q+ f2 C b/ d9 K7 M @.HasOrder := false;
" `7 F G" ^9 {6 L2 ?/ f: Z @.DrivingHome := true;0 ^4 }3 }, g# ?1 X% ]
rgManager.tryToStartTransOrder;
% p& L: l- T3 y: Q if @.Destination = void+ E* |2 X: S: ?. O7 f
then -- no transport order for vehicle @
. b O' }) b7 l* ?% b8 k @.Destination :=
7 D. k5 c- }% K' P f rgManager.nearestFreeStation(@,track.~);8 }- s" c, A' I
newDirection(@); * q/ T. r" [* H
if @.Destination /= void then1 k; V; M, S l, x; V" }# i
@.Destination.NumReservation :=
/ n* d7 _7 T" k* ?! ? @.Destination.NumReservation + 1;) Q7 ~3 N( L$ g: w2 z' m/ H1 L" ^' R+ Z
end;* u- z3 t! n+ S
@.CurrIcon := "drivingHome";4 z( s+ p% E9 H
@.DrivingHome := true;
3 e; ^6 C! ^2 B7 D end;
) m! W y/ m: N- V else -- the vehicle @ is empty, both vehicle and part are in the same dock station% u! g1 Z9 o1 A9 K
part := @.transpOrder; F2 @1 g+ Y2 g# x6 A
part.move(@);-- load part
# ` H( ~9 n9 d* ]: i8 W) X @.CurrIcon := "load";
- n" }1 k6 ?. u! }; P9 V GlobalDistObj := part.globDestination;3 v: P1 S: S: \ k0 f# f
assignLObj := rgmanager.rgAssignL;5 F2 \, `0 }3 ~
row := assignLObj.getRowNo(GlobalDistObj);
K1 O0 }" ~& a$ f7 N. Y' f; B if Row = -1 then -- since 70
0 x# _) \, ]0 Q/ k1 z if lan=1 then# ~( c3 S( C2 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. p; F3 W% S5 }2 ]+ } to_str("in der Andockstation: \"",?.~.name,"\""));
4 a+ A2 q$ K. a7 O* @: x+ K else
9 L6 l2 j7 l/ G, I0 d, i* W4 X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% E& z( Q/ S& J; T1 Q to_str("in docking station: \"",?.~.name,"\""));
( u! r( s( A9 F. |, y end;, X1 n: ^$ X$ A4 l% j
else' f. ~* O1 F) j c' i0 _% p2 m% u: h+ Y
@.Destination := assignLObj[1,row];
" N" D0 [6 c9 F- {8 i) D) S end; . f9 n' Q0 [0 M; I, s% ^6 B+ v4 a/ a; z
newDirection(@);
+ @/ m. b! o3 H& w- u @.HasOrder := true;5 I5 @3 ]. o5 i: C2 e
end;# P( B/ T6 x5 c& v8 ?. V
end;
! ]( `! p2 M, C, _end; -- of the method
( Y8 ]8 {3 n6 d( c$ r, h |