/* called by: entrance ctrl of the object 'track'3 l1 }# W0 A- a' q
*/( U: g3 r, x3 \* t0 U% `' D
is7 j; P9 _/ b" D/ v% _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- N0 W4 S6 }) N# ^: _2 x2 H7 Wdo
7 j0 s. a8 Q7 {' L0 [ Lan := rootfolder.Internal.Tools.AOLlanguage;
; [ b" S3 |" i2 c& g# a if current = @.Destination -- else return) K* E8 K7 E0 I" o! s4 b( I: u
then
5 s; d* Q$ y% l0 ?' } W @.Destination := void;
" H2 K) g# j0 Z8 c" \0 o7 z- } if @.occupied then m2 y W7 z& c
part := @.cont;3 L7 m( i6 A+ O! Y( U9 `+ p
@.transpOrder := void;4 q# c. s, I7 j/ T" p* |; z0 Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) F4 I6 b4 t" K' s% x @,root.eventcontroller.simTime);) j0 Y3 f4 Z+ G/ A
@.HasOrder := false;
$ {) x$ G9 G4 t: ]% B3 ]2 r+ g @.DrivingHome := true;
) V. L! c. v9 d rgManager.tryToStartTransOrder;
7 `' a! S/ a+ J% W+ N* R) V- M if @.Destination = void
7 W- T7 l; ?1 ?! U. u then -- no transport order for vehicle @3 T+ H, }1 r. J. |$ K. ~
@.Destination :=
9 c$ v6 G$ w6 P, { rgManager.nearestFreeStation(@,track.~);2 r% d! A3 S O L5 Q/ J U2 V
newDirection(@);
' e" U3 D0 q4 g) e2 Z if @.Destination /= void then
/ G; S# z/ z1 ]. r$ w" e' C @.Destination.NumReservation :=& e% q6 Q8 X4 R( I9 d9 k
@.Destination.NumReservation + 1;
4 E3 p: ^7 o$ a9 R4 d: L6 r. w end;7 m& f* s% Z3 H0 g
@.CurrIcon := "drivingHome";
( k3 r. |# n6 V8 ^( \ @.DrivingHome := true;
4 Q/ F% g/ p* d. \4 r) ~ end;) B u$ ?0 e. F( D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" Y3 A8 L6 { m# I) \ part := @.transpOrder;6 g; m( X. U+ J& a# t0 Z% A
part.move(@);-- load part/ J& s! |) c+ Q% Q
@.CurrIcon := "load";5 t* `0 s& \0 |6 E+ f( b3 b
GlobalDistObj := part.globDestination;% y/ O H1 H# b1 M" Q, }6 I
assignLObj := rgmanager.rgAssignL;' ?- n1 ^" f- y4 _: H2 h
row := assignLObj.getRowNo(GlobalDistObj);
' @' C' V, B1 A# k! A if Row = -1 then -- since 70( I. D( I3 G& y3 f/ j1 }6 l
if lan=1 then/ c+ f* p1 s# }, N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 m( @/ `1 g! f5 P* K+ m, z$ o
to_str("in der Andockstation: \"",?.~.name,"\""));
1 E2 {3 J8 S' Z else! }. w' j2 i/ e( }; P9 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: n1 v# v& [! O0 j' _ to_str("in docking station: \"",?.~.name,"\"")); C3 [3 K z& M& A- R6 Y, Z
end;# t1 |1 d. T: ]: B
else
8 K( j/ j3 w1 O, \( k) @ @.Destination := assignLObj[1,row];
+ \( B( y% b- u7 k/ ^ end;
8 x5 F( i+ v! X8 h- D0 ~ newDirection(@);
0 \! g P: r8 ]' W+ j @.HasOrder := true;0 P+ J6 ]/ z, `7 s& s2 q X" a! W
end;. Y3 K4 @- z! H/ U
end;
: _) g( T$ _% z" Hend; -- of the method
+ |( A% w3 a! \5 V: W5 W# o1 ~& i |