/* called by: entrance ctrl of the object 'track'
+ O p) L8 Z7 N' b' E*/1 z9 M2 L1 S3 H
is
6 `( K! T( t3 H2 ~6 [1 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 w7 M: \% }- N) ?$ j2 k
do, i/ M. v, Z% N P% p
Lan := rootfolder.Internal.Tools.AOLlanguage;$ c9 D9 }2 a' z ]% f
if current = @.Destination -- else return [3 O" x3 z' n8 u
then
8 @; M, ], O( l2 e @.Destination := void;
4 d: ~* [( d, J; |7 ^3 Z if @.occupied then
" j7 k3 ^0 y9 K+ t' ~* i% C- S part := @.cont;
* l/ d0 N. j6 Q+ D0 |3 } @.transpOrder := void;& h% h: h2 z+ ]. H* F. ~ a* [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- `1 F) e0 ]- g3 R2 P3 ~
@,root.eventcontroller.simTime);
' N) J0 m7 Q/ z @.HasOrder := false;
- C( z$ B# E7 J ]2 [/ S. F3 f5 Q; X# L. o @.DrivingHome := true;$ q6 R6 W& l8 v6 U
rgManager.tryToStartTransOrder;
9 c1 o* ?( n% z* K5 |1 z7 n if @.Destination = void
8 M& S; U7 \0 b. J" m then -- no transport order for vehicle @& t- C) K" e7 u& `7 B) }- _+ Y
@.Destination :=) m3 D! E' p% K' ^& Z5 J
rgManager.nearestFreeStation(@,track.~);. N9 W- X9 H+ T3 }
newDirection(@);
$ K$ Z3 u) {2 N" L if @.Destination /= void then# e5 S3 i+ D# R: B
@.Destination.NumReservation :=$ I; R( d3 b+ y
@.Destination.NumReservation + 1;9 c. c! Y/ f+ V5 k$ k7 f: q& x* H8 o
end;% F* B% K# h6 U. ^; ~6 m8 I2 ~
@.CurrIcon := "drivingHome";
& ~$ y6 _( I0 R5 R T/ y @.DrivingHome := true;
: K0 ~/ r. }. U N end;
; Z- P1 e7 ~# A$ a* i5 ~6 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
a% y- x$ M% n part := @.transpOrder;7 g" A/ W+ X# L: ~
part.move(@);-- load part# R% \# ? H+ X+ ]+ ?
@.CurrIcon := "load";
% ~2 J( @/ h0 {0 v- J7 r6 y GlobalDistObj := part.globDestination;) T0 ]0 r9 u& B: ~
assignLObj := rgmanager.rgAssignL;! u; h+ |' w5 t( _3 }( `; {/ w
row := assignLObj.getRowNo(GlobalDistObj);
& Y6 R1 e! X$ B. A1 B if Row = -1 then -- since 70
* @6 j7 u) T' t9 F. ^ if lan=1 then5 W; `2 t5 D+ Q. k) v! `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, h9 Y5 j# Z( _9 ?3 T5 |( h to_str("in der Andockstation: \"",?.~.name,"\""));
/ ^+ r: h0 A% \$ w else
% r" G3 o; C7 ^4 N7 m( F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ u0 B) O3 ^0 e% A- Z. D( q to_str("in docking station: \"",?.~.name,"\"")); , K `# k+ c0 o! N) Q( W" i+ R5 Q
end;
* I5 X" Q4 i' t- g9 F else2 V' D( v: C2 f( c
@.Destination := assignLObj[1,row];
) ]) M* F5 }! _8 c8 x8 E7 C end;
8 m% Z. t4 h* N' v8 a8 j( x3 O newDirection(@);% u' j$ X: R2 [, r
@.HasOrder := true;
# K; }6 e% J/ m- G+ h1 [" v end;
4 b, B) S0 m6 U' I/ U end;
& R B- t) i( u9 U* n) uend; -- of the method
' c. @7 s8 j: c$ D. V0 R* X/ K |