/* called by: entrance ctrl of the object 'track'+ k* X& W3 O1 ^
*/
1 Z4 w; X9 I' q2 J4 I3 w' W, _' ]$ {. his
* n5 z. A) A' S8 E' D$ e; R7 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ p9 g" R& z; e8 U9 b4 }# mdo
. u9 w! {& {' B$ T- z' } Lan := rootfolder.Internal.Tools.AOLlanguage;
" N; r [ z }" O/ r if current = @.Destination -- else return
! ?6 E# q9 |9 J6 Y then+ g3 f! `+ F7 t/ B2 v
@.Destination := void;
, n0 H# m; r# B3 Q0 C if @.occupied then4 @7 q2 V$ ? T% e8 p6 \- F. B
part := @.cont;
) _# L1 {. X$ V @.transpOrder := void;5 U; R; @1 ?# z- |* B- P4 T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; c( \9 y5 e9 I1 j1 Y+ P
@,root.eventcontroller.simTime);
4 S( u8 g, M, K @.HasOrder := false;
& B' y/ R, p' m9 ]" ?: U ?! X @.DrivingHome := true;
: [; `' Q. {6 V" m& f4 F+ o: G rgManager.tryToStartTransOrder;1 q. v1 X1 m( @# W2 j# `
if @.Destination = void
! S$ u9 T) R: a. N! G; p1 D; o then -- no transport order for vehicle @) x3 R& K6 |) T4 ~! D
@.Destination :=
7 y/ b5 }( d" r, N# p$ Z rgManager.nearestFreeStation(@,track.~);
& f _$ F1 @% d! x newDirection(@);
6 n5 h3 Z) s! v" `' B if @.Destination /= void then
1 }! [) X; v4 h- j% C8 X @.Destination.NumReservation :=
$ E' N9 v, N* ?! u+ X { @.Destination.NumReservation + 1;
# r. o" a, o' F- W7 v end;
+ j( H r/ P9 y. m" c% G @.CurrIcon := "drivingHome";; r. x3 H' |, I8 C( r$ {: x+ x# e1 q
@.DrivingHome := true;
3 [( F2 \$ C$ Y; a1 ? end;0 a* d% r q% l: K# {+ n) t) p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; K% w- w; A7 s1 l3 P
part := @.transpOrder;
9 M2 j: H' \5 S8 Q t7 @ part.move(@);-- load part
: f5 \3 N( V h8 I( J2 L$ w @.CurrIcon := "load";
% d, _7 S- j; l# I4 p& K GlobalDistObj := part.globDestination;$ V" x) X8 ?; @( ^$ B& c7 t4 p
assignLObj := rgmanager.rgAssignL;' v3 O- K' g2 H' ~ d( j$ K) p
row := assignLObj.getRowNo(GlobalDistObj);' U; Q6 H m8 j& z$ z
if Row = -1 then -- since 706 E S; t' V9 }: M2 \; c% s8 C
if lan=1 then& k2 X% s. q1 B3 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ x/ q% F3 j# x+ I- J$ L+ I to_str("in der Andockstation: \"",?.~.name,"\""));
/ a; O" D. a4 x2 H% o else
# z4 q/ {4 ^9 w6 z! @; S4 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. C/ m7 \2 a* }0 z& @9 |4 z to_str("in docking station: \"",?.~.name,"\""));
- V: I6 n" E! |: F7 J7 Y end;
& w/ |) i( u, w0 n1 F else1 N- E+ d. ?7 r1 @5 p. ]) a
@.Destination := assignLObj[1,row];/ C; o6 r8 w% J2 [ k f
end; $ i& f; {1 z6 ]9 F- i
newDirection(@);$ d( C& n5 `/ n* Z& Y: n
@.HasOrder := true;0 H1 d; `' o! ^- L
end;/ X2 G" W S, L* s$ \- k1 g0 n
end;) g2 b& j- X- J9 c2 t( ], q2 t
end; -- of the method4 F9 M* U X& }5 H( u
|