/* called by: entrance ctrl of the object 'track'
G, f2 O; {: `+ }*/! j" D' r% T& J- _
is
+ }4 f+ k* q8 q o part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 P$ [% s. c4 Q; T T
do# |7 E. a p% L: I9 H( U% X7 @5 A7 w! @
Lan := rootfolder.Internal.Tools.AOLlanguage;3 Y( W7 N: u& E+ L }" ?& Y, S( B
if current = @.Destination -- else return! T; Q6 i0 D! R% r
then- N* D* Z9 ~2 |$ S8 f% Z
@.Destination := void;
4 y3 R& R2 J$ N4 G9 X+ I( N3 l' h if @.occupied then/ n# P/ B* F( [0 I) W
part := @.cont;8 H; U: ~) S+ d0 y
@.transpOrder := void;
P& k% A2 `9 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 j9 \9 U8 i( [9 p$ A' v& M) ~1 n- ~
@,root.eventcontroller.simTime);- h" g3 W3 l5 n1 Q( s7 W
@.HasOrder := false;/ r5 @. q) P$ P) Z5 j, j% _
@.DrivingHome := true;: K/ w% D+ h/ G- C; o
rgManager.tryToStartTransOrder;7 D6 S0 H* o0 ~
if @.Destination = void
- P( o# `/ L( z7 Z4 A$ B% K# f then -- no transport order for vehicle @" t1 \% [, o2 J
@.Destination :=* l4 |, Q+ `+ |1 U$ U
rgManager.nearestFreeStation(@,track.~);, l4 y6 f; w; ~, V
newDirection(@);
4 [, U5 x9 {! Y6 q9 ], r3 [2 n if @.Destination /= void then: B0 p- p: N6 s0 S
@.Destination.NumReservation :=3 a. r9 P8 r" H5 R* M& F# @! J
@.Destination.NumReservation + 1;+ \/ h( c& G2 P0 X+ l4 v& b: T
end;9 S8 h+ o6 T: p; I/ _
@.CurrIcon := "drivingHome";! ^" ~1 g' y6 Q2 o6 ^
@.DrivingHome := true;
D! `8 y5 ^4 a4 L# w2 ` ^. Z: z end;, h' u( c; ]8 |/ Z3 Z3 `; q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 n$ M+ l3 y3 A4 x# x; W _, E part := @.transpOrder;
: E+ f6 p+ ~5 p3 g% N part.move(@);-- load part0 f5 w: d1 E. y8 X1 f
@.CurrIcon := "load";! C" s3 w( Q) f1 ^
GlobalDistObj := part.globDestination;
' a8 n# T- ~! u% c- ^# _1 t+ i/ Q' T% B assignLObj := rgmanager.rgAssignL;* b9 p* L: f/ b6 X. \& x; _
row := assignLObj.getRowNo(GlobalDistObj);
8 Z5 M+ h4 Y- M- P$ X if Row = -1 then -- since 70 H3 @, h# o$ _! T+ O% G1 N7 g4 m
if lan=1 then
/ F8 ]" X) N+ l. ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# Q2 g2 p+ ?, _* C8 \. f
to_str("in der Andockstation: \"",?.~.name,"\""));
8 I- H2 H+ \! o else$ [) q2 G* u) X6 j2 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ x W. q1 u {' N. {, [
to_str("in docking station: \"",?.~.name,"\""));
1 @& l& A% S3 a) c7 t+ u end;4 R1 c) ]& @( t+ U! X) y( R# Y3 a
else5 i) a I9 \6 s+ S; x/ \
@.Destination := assignLObj[1,row];( d O6 \- p" W* L4 c* Q% h) H: O
end; # h% @" y N; i6 B! H7 k/ @& Y& }
newDirection(@);
m' l% A- _' L* ?+ x @.HasOrder := true;4 x+ K( A( z" S
end;8 M2 { f$ _! A, R* L
end;
9 i1 T( F/ d) E4 S' i( Wend; -- of the method
/ J. @ i2 x) Y% t' ?2 P) f |