/* called by: entrance ctrl of the object 'track'$ l' h2 X. f7 ?2 Y7 j) C
*/
4 z) [+ [+ }9 G7 H% [( ?, wis
0 D3 g+ X; w J1 f% s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, C% j1 k1 K+ k, |do
z9 g) [& b- o. n Lan := rootfolder.Internal.Tools.AOLlanguage;. g8 N& J* L( g
if current = @.Destination -- else return
% ^( T$ B5 F3 s then
8 b: Q0 g8 s& F- c T @.Destination := void;
+ S- T, i# N3 `1 K. I# T! ? if @.occupied then
6 u9 b1 T1 b4 }# D3 Q part := @.cont;
7 ^. m6 S6 R, p) q @.transpOrder := void;
: z8 V' n; n' T9 a$ E/ k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 M; h% H, u; b& {6 P
@,root.eventcontroller.simTime);) |' G( H$ i0 q. X/ }
@.HasOrder := false;
- Z9 a Y( y: K N+ B: O @.DrivingHome := true;* b8 I4 q$ r. g( v
rgManager.tryToStartTransOrder;
2 }" \% L8 }; @6 d$ s- ?( W if @.Destination = void' y; ~+ G# H% s6 \5 R
then -- no transport order for vehicle @
, y9 D q% ~# C/ m+ W0 P' j @.Destination :=3 ? F7 f+ H2 L; s
rgManager.nearestFreeStation(@,track.~);. y3 U; Y8 F0 o8 z! Z B+ K
newDirection(@);
9 |3 M7 B) a, y% j, a4 U, d- y if @.Destination /= void then
' Z& j" b- U2 L) b$ j( V+ W/ y0 J @.Destination.NumReservation :=, C, N- f$ X9 a( j: ]) {/ P
@.Destination.NumReservation + 1;) h, ]3 o) z {1 [* m
end;
# F5 G2 n, J6 r. U @.CurrIcon := "drivingHome";
" q7 F* N2 X* j5 S$ `/ M. k+ G, k @.DrivingHome := true;
; { @, M) `2 G0 k8 d& c4 r$ K end;
s) P, J6 ]/ @& \+ U else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 i( h9 J' A* c6 Q( u5 ]9 X) C6 `2 _
part := @.transpOrder;$ T0 f9 `0 C0 g0 N' x- D3 ^
part.move(@);-- load part. j' o3 _ A3 {; Q2 |! f
@.CurrIcon := "load";0 M1 H6 S+ f8 K; w5 G$ s$ F+ Q
GlobalDistObj := part.globDestination;
4 K; ^# ?/ T3 N) G assignLObj := rgmanager.rgAssignL;8 N* |' B P' \0 K" Z* ^, y# `9 S
row := assignLObj.getRowNo(GlobalDistObj);* e- O5 E4 C; T3 B
if Row = -1 then -- since 708 o1 |& t, l" U; T
if lan=1 then2 N- ?; M) W, F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. \3 l/ r# \% s- R$ h4 a+ a to_str("in der Andockstation: \"",?.~.name,"\""));- \4 N# B) G( M. F m4 I
else
* M, P0 _ _6 g( f! m5 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! _3 G+ u7 G8 Y
to_str("in docking station: \"",?.~.name,"\"")); , d0 l! X# Z4 t& N' K
end;
+ X- k5 h8 f7 T* o" R# h. T8 v else
; @6 R7 o/ G3 S3 O& c @.Destination := assignLObj[1,row];' S- u: \& D% i! `" q5 f6 y$ y! i' D8 n
end;
) Q2 o; M6 R# g5 ? newDirection(@);* t1 {! i3 G4 G0 s6 E
@.HasOrder := true;/ W7 E6 V+ V Q. n( a5 i& P
end;2 z q& B- j/ m8 v& _
end;, P; l9 A, i8 [! n9 }, ~1 t
end; -- of the method9 ?% k! Z( g5 ?+ Z. H5 r4 q# H- G
|