/* called by: entrance ctrl of the object 'track'3 r7 M8 C! L6 W6 U K2 d8 }3 W4 }
*/$ r. t$ f, l8 H1 V+ h2 Z( ~7 z
is" q* R" B5 u( B7 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# B9 U* a1 C7 Q, ~
do" C( E) h# n/ K) Y. r7 O3 z
Lan := rootfolder.Internal.Tools.AOLlanguage;
( F+ {2 T8 p& K% {# u' a. w* q5 b1 k if current = @.Destination -- else return
3 H# |" b6 i$ I- G then2 h; @2 O$ p, d0 }
@.Destination := void;
9 w2 t3 `% L$ |9 l3 ] G if @.occupied then1 L# |7 W3 {2 i7 ^
part := @.cont;$ p6 o8 ^4 s5 |" Q8 q7 l
@.transpOrder := void;$ |( d' |* H: Z( u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 ], @& z( m. d' z. N3 Z9 t @,root.eventcontroller.simTime);
0 ]/ h. k' ^' E: N4 j+ ] @.HasOrder := false;
7 d9 G% T; C9 a1 e8 _ @.DrivingHome := true;* J; W# g$ I" D3 T7 I( @
rgManager.tryToStartTransOrder;
. b$ A3 [7 Z4 y$ I4 \4 Z+ t8 I% G if @.Destination = void. J8 I' `5 c3 j( X4 J
then -- no transport order for vehicle @
& {. j, c( D: q8 J @.Destination :=8 M8 {6 |% l' g5 B4 l& z
rgManager.nearestFreeStation(@,track.~);
% I \' P# H2 ]& G2 r/ i) M7 ?1 O newDirection(@); 8 z5 K, L$ B( k
if @.Destination /= void then! D( i+ Q ]& s6 u' g
@.Destination.NumReservation :=
/ b2 a. p. o& A6 m& Q @.Destination.NumReservation + 1;. X% g! D# n3 h
end;
6 r9 ~' x% ^- T8 }- O @.CurrIcon := "drivingHome";" d* }6 b+ M# Z$ z
@.DrivingHome := true;, u6 a/ \. g4 h+ C! F
end;9 K" p- n2 X7 N8 E1 O, a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. i+ c2 n0 E! ] part := @.transpOrder;' z: k3 P5 _( G6 D, @
part.move(@);-- load part
2 H3 i% f$ F; B @.CurrIcon := "load";
+ f; \$ t' H+ ]; F9 w6 I$ p GlobalDistObj := part.globDestination;1 G7 G& ~3 n& n5 N \* L/ o
assignLObj := rgmanager.rgAssignL; o$ d7 S( `" \3 L5 w$ [( f
row := assignLObj.getRowNo(GlobalDistObj);
0 d' ]; t+ N9 m7 Z; C if Row = -1 then -- since 705 G$ Q0 T {$ o( U* z7 R( W
if lan=1 then6 w& w' e9 r z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 E8 K$ @1 y/ S% f
to_str("in der Andockstation: \"",?.~.name,"\""));. ^) t" D2 K |. l- p
else9 n6 Y7 _) p3 j6 m% Y y5 r- I1 ?5 r" R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ R- Y! p; G' y* U
to_str("in docking station: \"",?.~.name,"\""));
3 z5 J, F1 k6 e7 [( H$ t. l2 M end;
- Y! z4 W- F7 h0 @* X3 A; k2 ^0 l+ M else
- W0 G3 H4 g! D* L3 G) q* z% d$ x @.Destination := assignLObj[1,row];5 L: w* z4 e1 r% Z; ]
end; 8 s- D. P# a# x5 H0 m" f& W
newDirection(@);: `% B$ h5 u8 b2 _; p; R! k
@.HasOrder := true;' ]6 k& z4 o# v+ z
end;
' D1 r. h6 j" Y+ L3 u6 e4 k end;
4 s# Q3 m+ g6 `. X( x: Dend; -- of the method2 X" e" i+ b( f6 P
|