/* called by: entrance ctrl of the object 'track'
! O2 c2 G' K3 M% q' ^% O% K* d H*/
3 {, v7 H) y z' m3 Yis
( P$ r0 z. Y$ o" f% q( T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 i6 C* l+ T. r. V7 V! W: {" Ido a# X+ H6 R# f7 t8 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 B+ d2 M, N9 x7 I" J) d+ w7 L) }9 \ if current = @.Destination -- else return
& h! w/ X5 V& x5 I then5 I7 V8 \' d! F6 y0 m
@.Destination := void;
7 p5 G) a. q- K if @.occupied then; r" t$ R3 B9 K( [1 l% s
part := @.cont;# {1 p7 C- ]4 B& ^/ U0 ~
@.transpOrder := void;
~$ g% R% q- L& k4 v/ P2 N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, d3 u1 e: r: z" n' y1 s( _; }
@,root.eventcontroller.simTime);
9 T; R" \7 f, e* m9 I! B) C+ d7 E @.HasOrder := false;
4 ?# b0 ~( G" N! R @.DrivingHome := true;) ^, m) @9 u( u0 a' p2 ]8 w( o
rgManager.tryToStartTransOrder;
; `# F- f+ I, G) O3 [- [( q if @.Destination = void6 m+ u: m9 E3 T/ A; U6 I; \# O: Y
then -- no transport order for vehicle @
d! _' ?$ {, J0 u @.Destination :=
4 B/ b7 a, g E4 j: f rgManager.nearestFreeStation(@,track.~);
# P: C" ]* d' G newDirection(@); % v) M2 q1 | |
if @.Destination /= void then
( ^1 j, j3 K4 Z8 a* } @.Destination.NumReservation :=- i# z6 d5 f; G, c
@.Destination.NumReservation + 1;- w# s8 q+ j3 x$ V
end;; M, a6 J- ]! ]6 T. s N
@.CurrIcon := "drivingHome";
! l% K5 m8 [' z( j( k9 c- ?6 X @.DrivingHome := true;. f% D4 m7 Z8 ^
end;
4 _; \# D' \# I D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
h5 n" I$ O! j& A% k9 [$ V1 B part := @.transpOrder;
3 m7 X" N# T1 D! W6 ^4 z" p part.move(@);-- load part
$ ~* k/ m8 S( w4 @2 p @.CurrIcon := "load";7 X4 P+ |5 U6 M2 S! Q' C& [+ ]
GlobalDistObj := part.globDestination;: K8 Q: L: S% I( ~5 ^! e7 V$ R) D
assignLObj := rgmanager.rgAssignL;
* v E# S( ^5 } row := assignLObj.getRowNo(GlobalDistObj);
/ O3 o( O! |! t5 Q if Row = -1 then -- since 70
* ^! `' V. n9 |5 _ if lan=1 then" N" d) @. ~" t" ^$ m2 V4 b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( x* S( {4 x; e; f to_str("in der Andockstation: \"",?.~.name,"\""));
N$ C) h- v5 ^% U. N1 H else
3 ~9 d+ h1 _2 i: [6 b, Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 p& o! p% S- Z+ s' Q- a4 F
to_str("in docking station: \"",?.~.name,"\""));
0 \" @9 Y( d; ~$ Q( N end;
8 H) ^- r% h+ m' E6 o3 |' x else
7 Q7 e- g* }/ n. v @.Destination := assignLObj[1,row];0 z7 W" s" L# H9 P. t) m) L) C# s0 m* D
end; ! j/ |8 u9 }6 m8 A/ M
newDirection(@);
: w3 x z3 ^3 d( r0 }9 j @.HasOrder := true;
* f, i& Z7 C+ T; e7 t end;
4 i0 _6 m) d5 i end;
' Z7 x4 t1 L; R; p) wend; -- of the method
! A- t8 ?' t4 x# [ |