/* called by: entrance ctrl of the object 'track') a8 l1 v! f4 R! L5 E
*/$ \) P) S! @6 w
is" k7 [* z) ]# @) r- o% E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 I |8 D8 j, c: H
do5 ]5 F9 ~4 _) K& J( ^& j# V
Lan := rootfolder.Internal.Tools.AOLlanguage;- y" Q2 X- _0 ~5 \
if current = @.Destination -- else return& A" R1 y1 j. m: \4 G6 D
then7 E8 D# |" g" F0 C
@.Destination := void;
- `5 U- \9 j- |0 A- f, u+ Q if @.occupied then" U8 d: `8 K: r& j2 K, P- z/ G5 s, Q
part := @.cont;
5 \9 w8 u! N/ ?! E+ |6 X" D. V, O @.transpOrder := void;8 O( B3 t u9 s5 [0 v5 p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," m7 N# H- }/ H$ T) m7 n
@,root.eventcontroller.simTime);6 g. _/ r5 M5 r* R- T0 A
@.HasOrder := false;
2 d. O" }) Q, { @.DrivingHome := true;; m6 e! |9 S9 ^9 E* u
rgManager.tryToStartTransOrder;
4 h+ X/ m; h1 P5 C+ c if @.Destination = void; a" C. }' f, \8 s' M, d
then -- no transport order for vehicle @5 f2 N$ l/ w& V' c% S
@.Destination :=. ?3 \! c! L8 I0 t. ?
rgManager.nearestFreeStation(@,track.~);
9 n5 r- s1 a3 Z newDirection(@); . ~& B1 T, p D
if @.Destination /= void then2 r7 ^+ `3 u7 L. e3 U
@.Destination.NumReservation :=/ Y3 J, T6 \/ _5 A5 f4 Z
@.Destination.NumReservation + 1;
* x# s6 `, b _' _$ X6 L end;, ~# ]+ I) K* \6 S, z9 s5 N3 \. t
@.CurrIcon := "drivingHome";2 O, K6 n4 R+ q: D' O
@.DrivingHome := true;
, Y" R4 ]5 H8 [, \& v/ U, [ end;" l" K4 m' E6 m* ~4 t" p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 j( t w8 }% l! c4 I2 a% {0 ^2 H2 v part := @.transpOrder;
8 c, x8 N8 e; C( k: Y/ _0 K2 _ part.move(@);-- load part6 l6 q! L! T6 s* r1 U7 I
@.CurrIcon := "load";# O5 A$ F2 D5 d( e
GlobalDistObj := part.globDestination;* z7 Z1 V0 p" X+ W( b5 w& b
assignLObj := rgmanager.rgAssignL;! O2 c+ O9 m7 E0 j0 N& o2 M" o, o0 d% N
row := assignLObj.getRowNo(GlobalDistObj);, r' P9 S: c: O( s# X4 v3 i
if Row = -1 then -- since 704 A" S+ I6 }' i) {) n; b
if lan=1 then
5 X$ j3 j2 L: r, } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 c* Q1 e9 F5 F ~% S8 {, t to_str("in der Andockstation: \"",?.~.name,"\""));! D) p8 l# T9 ]. K3 K: X: j& v P# {% B
else
9 P$ W! L+ H7 b9 z8 ^0 S0 o+ H promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 S) [' N% ?" \7 j% _% Z: s0 t9 M& j to_str("in docking station: \"",?.~.name,"\"")); j( O7 j! X, F' ^; K4 E4 m
end;
5 g% J& s4 W4 o4 y. M else
8 ]& {# s9 o1 S3 z @.Destination := assignLObj[1,row];8 d4 {3 x" a* h7 s
end;
4 S% e& W s- t5 I* P/ z newDirection(@);; G0 [' a5 D3 t! F
@.HasOrder := true;
4 [* s! h$ F8 w! D1 U end;
4 D& S8 m) M3 |5 ^% H& N- z end;
4 ^% L: L- V8 D3 xend; -- of the method
" {7 X0 p2 a! ]. q+ K; e |