/* called by: entrance ctrl of the object 'track') O# V4 {% x! b
*/9 O1 J; `; A9 L& t
is
7 R' z/ O* k( U. q! d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" Q1 W2 W/ i2 W) m* x4 Ldo
' e- a5 c& z# K Lan := rootfolder.Internal.Tools.AOLlanguage;. U5 E9 K9 ?. m, B
if current = @.Destination -- else return
: K: q% p6 A6 n! O3 `. F8 T8 [ then
7 V' X( p' n0 l @.Destination := void;' a- B6 u) W( l& i
if @.occupied then# l8 ~& h/ A4 o+ s
part := @.cont;
. Q' ^" j q8 z. I$ P: p% `1 d' F @.transpOrder := void;3 c: P. {; i1 c! Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; \! i% f8 k f* j5 a7 |6 s @,root.eventcontroller.simTime);
% J% p# C+ Q5 Z0 t( j" `0 J; }0 F @.HasOrder := false;. T, e+ }8 Q0 m/ P+ r. z- j+ J2 K
@.DrivingHome := true;8 X9 q# o+ {3 d- C% Y
rgManager.tryToStartTransOrder;
& H* }% h4 h4 ? if @.Destination = void! s. D3 E: @) {7 s
then -- no transport order for vehicle @
: u0 z1 k* S- P% T3 v; T @.Destination :=
' s$ R% G, V- M* y& _0 c rgManager.nearestFreeStation(@,track.~);0 m3 m5 B2 Y9 Z+ h$ y! Q3 M6 N
newDirection(@);
# u7 _& D M: e6 s4 q2 K. B if @.Destination /= void then# w) ~/ r8 ?# C$ {5 {9 A2 z# V
@.Destination.NumReservation :=
( |2 O* h& M) e: B @.Destination.NumReservation + 1;& X% A+ J7 }+ Z: ^) }7 }
end;
d, K9 `! z; u5 z @.CurrIcon := "drivingHome";
1 |% S- z- h# @2 g- q @.DrivingHome := true;
0 Z+ N; H9 X/ V5 e$ V end;( K1 s/ \, `( p' Q" _1 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ V2 X$ W3 r/ X4 L/ o# |. R S
part := @.transpOrder;
! s( m7 A6 t, n! i4 J9 H part.move(@);-- load part
d: `3 G, b/ T( V) {0 v H# T @.CurrIcon := "load";2 k0 w6 r" [* C& ]9 ]) C% n R
GlobalDistObj := part.globDestination;4 W) Z, @: _5 N# e/ _: A
assignLObj := rgmanager.rgAssignL;! [+ W2 u y9 D6 [ }
row := assignLObj.getRowNo(GlobalDistObj);, x) b: c' t. e' [4 u6 E
if Row = -1 then -- since 707 L5 f& \$ ]' y8 S' a
if lan=1 then% u$ x6 ~% }7 C8 ?2 _9 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 L* Z) x+ l6 I2 V
to_str("in der Andockstation: \"",?.~.name,"\""));" S2 L% U! F+ }* N4 ]8 @
else2 T5 k3 {. y/ e- t1 v t: H# j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 @4 Z% J" k/ P& W4 E. U1 B; K- q7 i to_str("in docking station: \"",?.~.name,"\"")); " q; }4 o# x: }( u4 L0 v
end;! @4 w2 `+ @" `+ i- R$ h6 R6 {$ z
else
% t% P0 c D9 [: P7 ~$ I5 e) V @.Destination := assignLObj[1,row];% U9 \4 m, `6 b( l$ v& h
end; i6 C9 t8 F& U4 H( z
newDirection(@);
* S4 A" ~0 R- v4 P) c @.HasOrder := true;# N% K( W9 o# x! ?0 `+ B/ l
end;$ D) }' m1 T7 b% |4 H# z( P
end;0 g7 c- c% u% n
end; -- of the method
; l0 y- l, u' V: C { |