/* called by: entrance ctrl of the object 'track'% P! b+ p5 i- |' o Q
*/
* L j2 J, \ W! Q/ e$ Gis5 M( v6 R7 [3 t: L& k9 h* H3 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* W# P% ^; {8 a7 ddo
) f4 f5 [& _1 g. K Lan := rootfolder.Internal.Tools.AOLlanguage;
6 q& V4 @/ h, g% C4 ^+ w if current = @.Destination -- else return
$ b; b$ J* J6 a: r. z2 r9 U then, b: E+ @) H9 ~
@.Destination := void;
+ R8 b) M6 h* w8 W. E% c if @.occupied then7 w' q$ Q. T/ H1 R: T% H& W
part := @.cont;6 l: n# K% g- y3 \4 G
@.transpOrder := void;
4 [4 D3 e* q: i* N- i: P1 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 \5 w' R5 H8 ~' Z6 @* D! p! v
@,root.eventcontroller.simTime);
. p ^) B0 W. E/ `+ G @.HasOrder := false;0 F) r4 [; f6 h. _6 }0 X# X# Z
@.DrivingHome := true;
* ~. k' V- x; q' p rgManager.tryToStartTransOrder;
5 ~+ {7 K; }2 S if @.Destination = void
% l, L, f! ~, _5 w. g( q then -- no transport order for vehicle @
7 F/ Z/ k) R% o, }. @2 Q; p" A @.Destination :=3 N2 u4 y; b: _
rgManager.nearestFreeStation(@,track.~);
" Q% v- B& a. O \ C newDirection(@);
$ h0 V2 L/ T1 b/ W& K9 } if @.Destination /= void then6 e# G k- X9 G/ _% x. X6 ~$ C
@.Destination.NumReservation :=" L3 z C( p5 G" h% y/ @
@.Destination.NumReservation + 1;4 X9 e7 y! O* _+ N3 _: |! W
end;. l+ ?$ x' n7 L; `- y0 ]
@.CurrIcon := "drivingHome";0 B% ^( @) v- c4 ^8 v* u
@.DrivingHome := true;* o0 \, x. X; ^3 K6 V
end;
6 A) N8 W! U& n4 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 p4 ^# l2 L( s+ i
part := @.transpOrder;0 r9 z# ^0 k7 J: L8 N% C( L
part.move(@);-- load part
( ~$ @/ p. j5 T2 p: \6 a @.CurrIcon := "load"; ?; F8 R* O$ W6 x3 \) c) g+ b
GlobalDistObj := part.globDestination;
5 K0 F* A( ~% z6 q: x/ L assignLObj := rgmanager.rgAssignL;* Z4 h" j6 h! E# U6 w8 r3 T
row := assignLObj.getRowNo(GlobalDistObj);
L" G" p# u4 T, K! v7 P if Row = -1 then -- since 700 @ A0 B- W3 Z6 I# b$ {
if lan=1 then: o: E" Y2 m' h: k/ E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- R- Q7 T6 ]+ c: j( T1 \2 R
to_str("in der Andockstation: \"",?.~.name,"\""));, y) d" m( E3 i9 [4 s' B
else/ Q8 y6 |. z o7 l |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& S0 P4 K) ]4 K3 g- c
to_str("in docking station: \"",?.~.name,"\"")); % _1 O( e& c: h( I7 P& S W5 ]4 ?
end;' f! b }& e9 x, y: F- k9 m/ b# b
else
% p" a d% r8 y- w( u2 g @.Destination := assignLObj[1,row];: ?8 M) ?5 J+ P, L7 A
end;
0 [! R5 K* J* h. m newDirection(@); {; U ^) p F% [' Y5 j9 i3 b
@.HasOrder := true;
$ ~! |8 O: y7 A% y. W end;! ^: t3 Y* F5 H5 Y8 K9 `! g
end;' _" S9 ?0 A5 c3 f8 l+ x
end; -- of the method. w' \" w* C0 g! G( z- c% z
|