/* called by: entrance ctrl of the object 'track'
8 o/ o. L4 f( n: |+ o w*/ f3 ~- F8 m X8 {9 _5 t4 Z
is" U& E J" E5 g8 S; M- Y/ j3 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ i% M; a5 L1 z( @; h K
do. m/ M8 @$ H5 Y, `( b
Lan := rootfolder.Internal.Tools.AOLlanguage;1 A5 ?/ T" R s
if current = @.Destination -- else return
0 T; S3 u; V! j' Q# a then
+ T' `+ e" O; F; F0 U @.Destination := void;
" Z$ y( A0 }: s D5 r& [ if @.occupied then
. M9 l+ j+ E2 d) T$ } part := @.cont;
! s) W( D1 E! Y# e @.transpOrder := void;
: k" _# e# N8 |+ X6 N$ t) C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ A. `3 t: n; x1 B @,root.eventcontroller.simTime);$ t0 E g5 }! Z/ V) z) J
@.HasOrder := false;' S9 [3 j2 q4 L( B, M
@.DrivingHome := true;
. Q; z3 z; [: K! X rgManager.tryToStartTransOrder;
2 V/ E' p+ C( D4 a/ r0 l+ p( @- b if @.Destination = void! E5 w2 y" Z2 |* _
then -- no transport order for vehicle @( K2 c* b7 @! ~, `2 e, q
@.Destination :=
9 t6 p2 d7 m# n& ~ rgManager.nearestFreeStation(@,track.~);
. v. u0 R4 `+ d: d7 a8 c newDirection(@);
& _1 f: L3 H8 Q if @.Destination /= void then
) l& k1 d3 o* O- ^' I+ u5 v3 o- g @.Destination.NumReservation := Q# D: h6 K, S. o! S6 F9 S
@.Destination.NumReservation + 1;
: ^, }3 L4 w! h% J. V3 v( H* @ end;
# u5 W1 G5 {! N8 ~ @.CurrIcon := "drivingHome";
: q2 x8 n) F( z5 U6 Z! a @.DrivingHome := true;
# V" {9 G6 o6 E' B8 u$ | end;
- f: @) _5 H0 \4 B. U8 o else -- the vehicle @ is empty, both vehicle and part are in the same dock station: F$ \) q" |5 g* A/ G; [+ J" k$ Q' a
part := @.transpOrder;
5 i6 w9 |2 u+ P6 i a part.move(@);-- load part
' S" ~' [* I" y @.CurrIcon := "load";: D$ F( m$ z- q/ O0 Z
GlobalDistObj := part.globDestination;
7 K* e2 e" |5 A0 l5 N1 Z9 t assignLObj := rgmanager.rgAssignL;
8 ` T- g+ O* `( o$ g4 ~7 r row := assignLObj.getRowNo(GlobalDistObj);
$ _9 X2 r2 N9 }; p: _ o1 z if Row = -1 then -- since 70) Q& g' }$ j. a! W3 g
if lan=1 then5 z7 y J# D5 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% T2 n" B8 W$ Z" H& j# H% `( d to_str("in der Andockstation: \"",?.~.name,"\""));+ y f& h1 }' K1 v- ?
else7 ^7 I; [+ l! I& g5 X& s3 S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 y" c/ X1 _0 b& | to_str("in docking station: \"",?.~.name,"\"")); 8 q" M1 B6 E; R9 P
end;1 M5 u" Y3 G2 \1 r8 ~" r
else1 f4 L. ~: l n: C0 x
@.Destination := assignLObj[1,row];
) P; ~( M- h# m6 O end;
2 Z: F" Y: T' J9 h newDirection(@);+ m) E9 b* I. v" e9 {
@.HasOrder := true;
( P6 C9 R3 |0 L" j" \ end;* e: C/ Q8 h8 |4 y& G$ r. z
end;
% {8 q. o" L3 C: @8 Dend; -- of the method
- s' K# L) R0 |% O& R' \ |