/* called by: entrance ctrl of the object 'track'
2 c/ c! o$ h, U3 D0 z; A& a: g*/
4 M) e8 H( a, `0 S% w7 dis
. U( }8 V' [3 ~4 G. r- B. M+ V part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ f+ `' [3 e; r" l3 D! U* o6 ^
do( s5 |" ?* {2 Z: Y* A
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 s* r) W( `6 k- u- _$ _+ ~0 \# g if current = @.Destination -- else return" y7 y6 o& f7 \. {
then4 G- J6 {1 B. @3 s
@.Destination := void;. p5 v( u' f# O0 }$ D" ]
if @.occupied then/ _3 t) M& n% S# r o% k' u( D
part := @.cont;
+ Y2 S. O8 x s5 ?" o @.transpOrder := void;
' m) ?! [! z; H6 s5 c/ d9 X" B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 X/ c' t- G1 v @,root.eventcontroller.simTime);0 @/ D* b5 f Q4 c$ @/ i
@.HasOrder := false;1 k" p8 K: Z. A; g
@.DrivingHome := true;
- d: \" q0 q% d6 y- J( c rgManager.tryToStartTransOrder;
* L0 q) J A, C2 H% y if @.Destination = void
% j2 h) d$ E8 |/ P C then -- no transport order for vehicle @# {5 k2 e* m9 M: r. H" a/ O
@.Destination :=
0 g' ^! c! _8 A( ?* R rgManager.nearestFreeStation(@,track.~);7 Q8 g% f. n& ~. T" S
newDirection(@);
2 D/ S; {6 S7 e' l1 V2 ^2 Q* O if @.Destination /= void then0 ^) n5 {1 Q8 C' Z0 i/ f
@.Destination.NumReservation :=* Y: |# N3 N- w: F
@.Destination.NumReservation + 1;
8 B# J) k2 y; w end;1 o7 C; v) K, D
@.CurrIcon := "drivingHome";% J' d7 l3 G: ^% ?" u% r) O
@.DrivingHome := true;
5 _" L% [. U4 S2 F- P end;+ D( u0 T4 _( c9 g6 T) Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ A- z2 w1 r6 ]$ c$ y part := @.transpOrder;
, s' L& c" G3 ]- J. {* { part.move(@);-- load part
3 @ b) U+ N ~ @.CurrIcon := "load";
& A; e7 l, F. S8 t! n GlobalDistObj := part.globDestination;& ?, ]) Q3 q; n# b; E3 ?
assignLObj := rgmanager.rgAssignL;% J: K) ~5 }0 \1 X; B
row := assignLObj.getRowNo(GlobalDistObj);
) @+ s+ J2 V- j( Z& { if Row = -1 then -- since 70
* U* t5 ^" x4 ^8 { if lan=1 then
. X$ d( t& z% J. b$ M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 S* r5 @2 p: @
to_str("in der Andockstation: \"",?.~.name,"\""));" Q' t9 E8 ]! i
else* N% s$ r. `' T$ S0 _+ n0 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! d3 M; k$ x: p r to_str("in docking station: \"",?.~.name,"\""));
/ {: a0 i% J- K4 C- o# [# Y$ Y end;) x: t$ |. q7 i- h7 d6 M
else
8 Q! b4 T" P/ P, b1 e- l4 T @.Destination := assignLObj[1,row];
0 u; |0 Z7 x8 N' K: D9 T! H end;
9 y9 Q0 Z" X/ W1 `/ C1 k newDirection(@);
3 a1 A4 G$ a' |; X& s @.HasOrder := true;* R( o4 Y, g$ i3 _
end;0 P; J# |& X. D' @, X
end;$ Q9 q) V" V$ k8 Q- W
end; -- of the method$ {% ~+ {; H0 v" g
|