/* called by: entrance ctrl of the object 'track'
- }* T" N( K+ X6 g/ N7 q: O# `) \/ _*/
8 _+ s/ j! p' ~' t3 w7 [is
- p+ ~: k, H+ `3 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ { ~7 G! ^, E/ e0 n/ Wdo6 ^* h+ K& u1 ]+ H2 @3 ^, k0 m% d
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 x9 r& a0 O ^ l D if current = @.Destination -- else return$ f. g( t; b1 M" I0 j! G& `2 G
then* S* L& W9 p3 t" D9 T4 K
@.Destination := void;
0 {3 K- X( A2 R# f if @.occupied then$ T. z% V+ K! {" X
part := @.cont;4 f' s" i: k, W* Y8 b. D
@.transpOrder := void;' [3 n- L* a5 p, I5 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 n) @1 I4 I) N t" \+ I. o
@,root.eventcontroller.simTime);
1 M% }' n" c1 T" p @.HasOrder := false;
3 ]+ l/ D L" y: Z4 d& c @.DrivingHome := true;1 z* D+ t7 G+ C& Q0 \
rgManager.tryToStartTransOrder;+ ?! _1 W3 z, z2 q; r& I7 v" `
if @.Destination = void
$ r& O+ y, C+ T. L9 I" C$ q; g then -- no transport order for vehicle @
7 l& A; A! n- L- n* A- K/ }9 X @.Destination :=
. Z; N7 [# F" y8 o$ P5 Z rgManager.nearestFreeStation(@,track.~);
7 }% [* R7 y* R+ C8 h newDirection(@); ' l* I. [- z; Y- D; R
if @.Destination /= void then
0 ~6 Z7 V. L0 ? @.Destination.NumReservation :=$ q$ c6 Z% f' e' [
@.Destination.NumReservation + 1;
5 Y( M) l9 c+ E9 T' b0 r: {) u+ [ end;& _! m0 K8 A6 l) {
@.CurrIcon := "drivingHome";" ~) G) `' R$ u
@.DrivingHome := true;
( G- T0 R( W4 Q0 ~8 k/ U3 W0 ] end;8 }# u9 w" \! R1 H! }/ q2 [1 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! W6 d6 E, H) h% H" ~: m- J; t part := @.transpOrder;3 f/ k9 D. u+ C* g1 T c
part.move(@);-- load part
9 ?; ?' }/ A) v |1 l7 T+ i3 n @.CurrIcon := "load";
; L* S$ J7 x& C GlobalDistObj := part.globDestination;3 w" `7 O- R8 H/ n" r
assignLObj := rgmanager.rgAssignL;
& f, h. L: {& |. O( c row := assignLObj.getRowNo(GlobalDistObj);
4 d+ }5 h8 ], f. m9 o v# L if Row = -1 then -- since 70- c: `% j! V$ X1 T( U
if lan=1 then+ {4 d0 K& Y+ T s" F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 r- E* r0 g) i0 Y! l2 I
to_str("in der Andockstation: \"",?.~.name,"\""));/ M2 p* C% v# w0 Y& ~
else M4 V q: G) l7 m( `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. U+ _' @+ d2 U0 }2 A% T3 \
to_str("in docking station: \"",?.~.name,"\"")); 9 w8 t6 L3 |% R# E
end;
8 z+ Q' t9 e( I( {4 O5 y% E else) t$ e Z1 S; C0 Q5 ~4 Y* i3 Y
@.Destination := assignLObj[1,row];# L. O3 b$ W: ?& A" D/ J
end;
" |- _ g. I. b7 U9 \. d. t' Z newDirection(@);
; Z$ E8 N$ R% \3 P7 Y5 g @.HasOrder := true;
5 v: L' O; F! n. W; U end;0 Z0 u5 P" k% r! ^' o" f8 S/ ~
end;1 _, m6 }- {$ ^* u* G) d! z5 w
end; -- of the method
/ p# w( P3 S N/ S2 w |