/* called by: entrance ctrl of the object 'track'
) M) H8 X; D, V# y6 E' r. Y*/4 Z# _; N, M7 m5 {% H2 Q r
is. j7 k; } I: U1 c# w, L' {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ k7 B' b! [( o2 H; `' U6 Bdo
# j2 z+ V. h- N6 ^: z/ E Lan := rootfolder.Internal.Tools.AOLlanguage;
9 V3 S2 K9 ^, H* T$ x$ t if current = @.Destination -- else return
* z2 j; X' O s: J ~5 j6 n then
' x, z) t' N1 G* N$ F& H& Z& h @.Destination := void;' \) x; K6 Z7 U# F y
if @.occupied then+ ]' S$ ~4 f. {+ K, G# e
part := @.cont;" D! h1 H$ e. a, g ^
@.transpOrder := void;' t1 W2 o0 I; E n' H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 x) j7 t5 v# k1 T
@,root.eventcontroller.simTime);, S; W9 m$ D/ a# O8 M& e
@.HasOrder := false;+ F( Y. c5 x3 C6 P. y
@.DrivingHome := true;: M9 K* Y1 F6 u3 P
rgManager.tryToStartTransOrder;
4 E- W$ A; v2 k7 x$ G8 F3 Q: c8 g, \ if @.Destination = void
! t" f1 d7 G1 i then -- no transport order for vehicle @8 N" Z* W' X* x# F
@.Destination :=
3 Q' H. l1 n* |8 g2 Y$ I- s; [* U rgManager.nearestFreeStation(@,track.~);
8 }+ ?: t8 O& K- S+ I# | newDirection(@);
- q5 E9 v+ w; Q if @.Destination /= void then( @- f9 `( v. @0 q9 `
@.Destination.NumReservation :=$ ?* S# ]; ]* _7 @- g e, U
@.Destination.NumReservation + 1;
( E5 }5 U' N0 i& Q% T4 m end;8 Z/ g/ z' `3 o+ m! i8 }+ R
@.CurrIcon := "drivingHome";
) K5 k a% h+ t. l, Y3 L @.DrivingHome := true;& M( ?9 s; p. y' q
end;
! u& I# L: p( N4 m else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ K! W0 J( A1 _
part := @.transpOrder;
& p8 o# v5 q3 X; m) \2 M part.move(@);-- load part, p+ ]9 ]/ p1 @
@.CurrIcon := "load";; F% ?+ u0 C* T3 i1 T
GlobalDistObj := part.globDestination;1 L5 R+ q4 M/ J0 b' @1 p
assignLObj := rgmanager.rgAssignL;
5 l$ a0 F3 u( T. m/ a row := assignLObj.getRowNo(GlobalDistObj);! O; {- [3 g, E* O& Q
if Row = -1 then -- since 70
+ b$ s7 z+ b2 a3 N: L if lan=1 then
4 f& H" I1 s$ L/ \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! ~: s& c- T. L$ ~5 x' p% Z! s& H' o
to_str("in der Andockstation: \"",?.~.name,"\""));; c6 V$ }) P9 V, G+ k( z
else3 ^- D |1 c# E1 x/ v2 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ E1 D% v$ U+ g0 Q3 o |. Y n
to_str("in docking station: \"",?.~.name,"\"")); , h. \% [' ^, B8 O1 ~
end;
2 i7 |! _. z0 O& X4 {3 p; |5 C else8 v- m; G, U }( ]3 s- X
@.Destination := assignLObj[1,row];
& I$ b% a$ a9 D1 a9 H- } end; " V6 a" y2 @! _* H; c3 f9 Y5 [9 }
newDirection(@);
z. v3 [% W! C0 i. f- N# H- l @.HasOrder := true;
; ^- d) d n: B end;3 y: L! S+ \( c1 {
end;% b% R/ k4 X. J; D+ d
end; -- of the method) G" p8 D9 x$ Y% C+ B
|