/* called by: entrance ctrl of the object 'track'- |4 L7 C- j5 g; g+ l4 N8 w; ~
*/
$ V! \9 S& p8 L8 O$ e! V7 bis) t6 N9 e& E# z! [6 F& q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 M4 r, I1 n/ U( d
do! L: B0 v6 R4 o4 h2 _) [" C8 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;) z+ d% q" {2 f# L( X0 D
if current = @.Destination -- else return7 j) l# {) w% n! Q+ E4 P
then
" v- c b, }' c( _( N2 m @.Destination := void;( l4 d% V& x+ ] R7 M! a8 W
if @.occupied then$ V. S y. A8 m
part := @.cont;
5 P: F+ t0 V0 M @.transpOrder := void;0 Z6 L9 r4 \" o: u$ U2 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) T# F- X: {8 N2 c0 [: { @,root.eventcontroller.simTime);
: w& e, D& p2 x; @; f2 j! r& m @.HasOrder := false;
# ^! b7 \- q- Y% Y& H" | @.DrivingHome := true;
- F3 j0 a- X R( f+ C rgManager.tryToStartTransOrder;* {$ | i. X. m( t a7 C6 z! L
if @.Destination = void3 M6 m% }$ i% j( `
then -- no transport order for vehicle @
4 m* m1 D1 X8 }: Y) m5 k5 F2 n @.Destination :=
+ g" ?1 @1 [( Q$ P8 |1 E j rgManager.nearestFreeStation(@,track.~);) d7 q1 Q B& T/ I( Y
newDirection(@);
6 v$ m& a3 n/ g1 Q& h7 I' b. E) s- m' l if @.Destination /= void then2 m; i' {4 E$ e: t6 ^
@.Destination.NumReservation :=8 [" V4 L, [+ g# ~1 u! [
@.Destination.NumReservation + 1;) L: ^) i# T9 w
end;4 h5 i% U: J: S6 t. \
@.CurrIcon := "drivingHome";
8 k' D6 P9 E+ v7 @ a2 R$ w7 s7 z @.DrivingHome := true;
4 j1 c+ z" n, T3 U& u F5 W end;
. t7 ^+ T( T# N+ Z! o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 I( f5 } x% E \3 p part := @.transpOrder;# u, A+ q" I2 ?+ |; ?1 d
part.move(@);-- load part
" V9 S4 | H* l6 D" G; @ @.CurrIcon := "load";: v8 k# F, l: \# v, i L
GlobalDistObj := part.globDestination;7 T Q: E: u/ A( Y! D: L
assignLObj := rgmanager.rgAssignL;
% ~& x# V( ^4 W Q6 I4 Q row := assignLObj.getRowNo(GlobalDistObj);, Z" I3 T4 p4 O m( U4 L
if Row = -1 then -- since 70' g, b, r# z9 B4 O
if lan=1 then
0 G2 t" q+ l! j% o6 Y7 _) t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ u& H4 u. m- |; V
to_str("in der Andockstation: \"",?.~.name,"\""));
6 m z- G( b+ M else
$ o7 H4 ~8 D! o; k2 K8 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- m% I% e7 p0 f! z) M to_str("in docking station: \"",?.~.name,"\""));
8 P R* L. e# y# p- Y4 e& V4 V end;
, @- |! n7 X0 ]8 d5 G# l7 b else! B. y3 u6 z. R- ?3 d. ?7 E; L& R
@.Destination := assignLObj[1,row];
# _% N: M' X( k9 ?' \( Y end; # S- E7 Y5 L8 x; P* s$ W4 Y
newDirection(@);
0 F9 F& s3 ?+ x& X! c3 Z @.HasOrder := true;
- P+ A! q8 E, \, T, ?: U6 T end;) C0 A' C4 M' g. I& M( S% P
end;
% h6 _% U e5 M) h; m" Vend; -- of the method
3 V& B( T: w( U+ W$ `" |1 D* d |