/* called by: entrance ctrl of the object 'track') g0 n# T2 V! }; y6 J0 I
*/
6 e" t0 |6 g' _7 xis
1 c$ w5 q& f# ]/ F4 t. K ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: `) q2 l7 Y6 O; o) U$ |+ N4 rdo) I" n. L- M, U, z4 S5 z3 y4 O
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 V/ e' O3 C: m, P: C if current = @.Destination -- else return
; i& h) [$ |8 q( V! q* ? then3 W0 }2 F) |3 w- g
@.Destination := void;- a, R" {8 m. m7 u5 M: S
if @.occupied then
5 I. V( [. A6 f+ W% d+ i part := @.cont;
2 W" \# ?9 q$ o q @.transpOrder := void;' x- ~. |; K1 H. }/ ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 H" m5 c, I( H7 h3 R @,root.eventcontroller.simTime);
3 h9 b3 Q0 t0 B k0 G( C8 \ @.HasOrder := false;
% J5 i/ ~: Z( ` z8 l$ k- C @.DrivingHome := true;
$ m% H) P# x% P( ~+ S& s# g rgManager.tryToStartTransOrder;
9 \# E- N) y) w: _$ S if @.Destination = void
; @ l; j7 P$ {, q then -- no transport order for vehicle @% M! r( B: E5 i. t# k: @ }
@.Destination :=- X$ P! t4 }% c8 I" W1 {* H
rgManager.nearestFreeStation(@,track.~);1 a/ K8 v1 X9 [* C; G8 M
newDirection(@);
$ u' @+ p8 p" F7 M if @.Destination /= void then
/ x& ?/ b1 ~: ]% [ @.Destination.NumReservation :=" F& W. E6 F# a6 N+ ~) w
@.Destination.NumReservation + 1;
9 i/ R% `8 `* d: y% K end;
: c" R8 Q# h: R# I V; K @.CurrIcon := "drivingHome";
h6 S$ P& q( P. u; a' _ @.DrivingHome := true; B) r4 r! L* t3 O7 N
end;
" R) C$ S' E: s7 S Z6 C7 u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. y" a" C% u" j+ z part := @.transpOrder;
4 T4 o. x* h5 ~$ _4 F' M part.move(@);-- load part% i! C4 p( X# ^5 G2 b [( V
@.CurrIcon := "load";. }5 P! e7 ^' f: ~ I1 e3 Z4 S* p6 Y
GlobalDistObj := part.globDestination;
, b/ ^! a, a1 n$ g% T1 e assignLObj := rgmanager.rgAssignL;2 L+ h* E6 \$ S2 L2 D( K
row := assignLObj.getRowNo(GlobalDistObj);1 Y5 A0 x% N0 k+ o
if Row = -1 then -- since 70: z7 e7 Z: d8 q5 W
if lan=1 then
0 X. X1 b$ f1 b, A0 F3 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* w/ Y2 B4 A( W" ] to_str("in der Andockstation: \"",?.~.name,"\"")); N) \, H6 i& ]: T! ^4 P
else
& V& q% O3 r( V# A" X( B# {7 c+ E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 A( ?3 w9 }/ N( V to_str("in docking station: \"",?.~.name,"\"")); 6 q( p1 X( F$ J* ]
end;
5 u$ W( i0 v7 w5 ^; P( Q# E else
1 U) R7 t4 Q! B' z2 d. \ @.Destination := assignLObj[1,row];9 d* y6 U3 g9 ^$ p7 L0 A2 r2 \
end; a+ b) B1 ]( A! Z2 B8 I& [
newDirection(@);' r v: v& K5 h1 N9 @0 H2 A
@.HasOrder := true;
6 K7 P$ T5 V0 K3 c" K' ? end;5 Y' S" N- _+ ~- T* j4 o
end;
' }5 P$ E1 o& P% i9 tend; -- of the method
5 U+ \" Z. e: D1 b$ J3 D |