/* called by: entrance ctrl of the object 'track'
g5 w3 s5 K$ A/ L" `+ G3 c*/0 f& @1 j" ~* g/ B3 y5 e
is( r. f; v# c/ K/ a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; \ m4 q+ |+ @do
' z, R5 R. o+ ^ T/ j Lan := rootfolder.Internal.Tools.AOLlanguage;
( e! t2 v" r r if current = @.Destination -- else return% a y8 q" I0 u: L7 |! e; i
then1 t0 s1 O- |/ ]( Q! ?% i0 C
@.Destination := void;
* J/ f* j8 v4 i+ |. H, r! {% {/ X if @.occupied then) x( u, h2 T/ K/ |) J: M3 p
part := @.cont;
* G. C$ [5 z4 f+ N* Z b5 K" T9 K @.transpOrder := void;$ Y7 u; S3 r" o: E- U# S. M, z( o3 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: P7 A6 w! f+ [$ m @,root.eventcontroller.simTime);4 D: t+ A+ e8 \" g$ F! P; s: o
@.HasOrder := false;
& t& D/ N- K! O; ?, | @.DrivingHome := true;
% B: ]1 K' g+ T7 [ rgManager.tryToStartTransOrder;
# y& C, f1 @( J0 M; U3 k( M8 t' ` v if @.Destination = void
. ?- H$ C- i( b8 c) e; A Q$ z then -- no transport order for vehicle @
1 v; [3 i( ?7 o, D/ Z0 e- ^3 ^ @.Destination :=3 o8 Z; o/ D. R1 T6 k
rgManager.nearestFreeStation(@,track.~);
3 ]: a8 P! U: P% H# H+ [7 G newDirection(@); 2 o, r$ k1 J0 }: {" C
if @.Destination /= void then
& P" i, ]+ c; c( o @.Destination.NumReservation :=
! M* B+ \! u f2 f$ z @.Destination.NumReservation + 1;( L$ w. V' W* B: a% j* m! V1 j
end;
$ n% z" B6 T ]2 Y( A6 l. h0 H* W) g @.CurrIcon := "drivingHome";4 [0 I# `1 R/ B
@.DrivingHome := true;( n, z! C5 G! q' t9 L( u1 K
end;; A( S1 R& b% l: x% }4 A$ e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) G; P/ _% r! l, z part := @.transpOrder;6 e/ i* O3 u" P: O% h* B; f2 D
part.move(@);-- load part
1 x) z5 v# S$ A; \* ` @.CurrIcon := "load";
- N6 o4 M3 B+ M6 q T6 p! P9 @ GlobalDistObj := part.globDestination;: Q' I3 j7 X2 B) n9 @) T
assignLObj := rgmanager.rgAssignL;
+ `1 l. N% c) t/ C row := assignLObj.getRowNo(GlobalDistObj);2 n/ W2 F6 o$ |* H6 Z$ `* V' e( B
if Row = -1 then -- since 70) {6 O5 n0 C( M$ _# d
if lan=1 then3 P9 k7 V6 H; z# u* k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), C3 p9 Q3 v8 m/ f ]- Q
to_str("in der Andockstation: \"",?.~.name,"\""));
" s! \& g, }% X' i else4 {. \1 ~2 r {& x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# V4 j3 F% J/ f/ o- |2 v
to_str("in docking station: \"",?.~.name,"\"")); ; n1 L( D2 b& N* ]" U
end;
5 E2 H$ a, Q" h8 b8 B3 ` else2 L- _8 B. s3 b2 U% e
@.Destination := assignLObj[1,row];1 w: Y- f5 E2 a) E( _$ I1 E
end;
2 A* g; }7 |' Z# ~1 J: x3 X0 Z newDirection(@);) \, V* V6 h1 a4 U
@.HasOrder := true;' |. K& W; y" D( I( j, |
end;
- p1 w: L/ W& G3 c/ z' y end;
* Q1 h* K+ D8 P' {3 [; Z- xend; -- of the method/ q+ T" y* z$ R7 J( j* j
|