/* called by: entrance ctrl of the object 'track'* [- U. Y5 f8 F4 S" R
*/* e% x9 c7 b. e6 ^; ? Y" G. P+ @
is
% H- v( H9 S, e2 ?6 q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( r G& r. y1 V; Zdo0 T- Y0 C. {/ N
Lan := rootfolder.Internal.Tools.AOLlanguage;% a Y* _% ~. J `+ s- r$ @; I
if current = @.Destination -- else return; u, a7 \( ^6 ~. O- g% B
then
" ?5 s/ O) E( B; R% J5 c5 Y/ ^ @.Destination := void;8 h+ ~! Z! E: H1 j; ~
if @.occupied then5 t: {+ p0 O" ]0 E7 Z
part := @.cont;
$ D# U" T+ l K- y5 y8 S6 R @.transpOrder := void;
7 R; I6 v4 u! [) i) o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 g) k/ Z, {) d0 l1 U1 L
@,root.eventcontroller.simTime);4 Y2 B+ |# |1 P! v# o4 Z3 F
@.HasOrder := false;* r4 G2 n8 `. S; ] P& m! f8 i' k
@.DrivingHome := true;6 v/ Q# h/ ~: ?4 r& _& ^' B
rgManager.tryToStartTransOrder;
+ v5 s2 X1 Q, k( k3 Y Y$ n if @.Destination = void9 e! g5 O0 h- Z8 g4 T& h
then -- no transport order for vehicle @+ B+ M" n Z. u& |, c& t: p
@.Destination :=, z+ Y4 x: o0 X5 {
rgManager.nearestFreeStation(@,track.~);6 [% `/ W& R. _* A9 p
newDirection(@); 1 K. n, @& B8 \$ p/ q. }% v
if @.Destination /= void then; h# Z+ k& z/ N' H
@.Destination.NumReservation :=, ?8 w5 q& |9 m5 Q2 k: L
@.Destination.NumReservation + 1;
- j# p- h7 f( C9 l. Y$ U" z end;
! R) ?* v$ D) R3 Y4 K3 E @.CurrIcon := "drivingHome";; @, S. b/ P I+ j8 i4 z- r
@.DrivingHome := true;
& t" H* {2 y1 W end;
9 L1 Q2 i$ R( P- n7 A5 v else -- the vehicle @ is empty, both vehicle and part are in the same dock station& M6 ~$ [# b5 U4 l" v% @
part := @.transpOrder;( n: j8 M5 L0 E9 N, E) o
part.move(@);-- load part! M1 y" M$ Z6 {7 ~
@.CurrIcon := "load";3 q& L @3 x6 @4 }
GlobalDistObj := part.globDestination;
+ L1 A% v: ~! B$ g9 A3 k6 B; K assignLObj := rgmanager.rgAssignL;2 @3 o, d% B0 t2 \/ l5 C
row := assignLObj.getRowNo(GlobalDistObj);
2 o @: ?6 b' z$ D1 W4 W. @1 x if Row = -1 then -- since 706 r X/ @: T/ O
if lan=1 then
. t6 p& U# p+ |/ b7 F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: X9 d0 Q c" U' E4 r3 T. O" A! G
to_str("in der Andockstation: \"",?.~.name,"\""));
" o! `: C" x: i! ]! L/ S else* k. g. S& p9 u' T, [6 W- c( u a6 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! g7 G) |7 r# E; ~; B# Y
to_str("in docking station: \"",?.~.name,"\"")); 3 ^/ f( H) _2 c7 N* G) Q
end;3 t" }1 r" _7 m. ^: m+ f
else# V4 ]9 y/ V: T: y
@.Destination := assignLObj[1,row];( D& u, r& N d# b% V6 Y
end; % j0 Q8 y" x/ h5 y% p6 K5 g
newDirection(@);
- f7 Q, P( k D+ _2 x# P @.HasOrder := true;
# K7 ?. k# _( r end;3 s# u5 p9 Z# c/ a" n
end;
' ]2 M0 C, O5 [6 ?9 e7 t% Yend; -- of the method
- v: n3 ?2 f+ }6 f. m% Y |