/* called by: entrance ctrl of the object 'track'! x/ l! J/ ^/ }4 E7 m X/ `
*/! I0 \; E7 b/ J8 o
is6 X8 m4 s; Y$ }" z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ ] ~' u- ?9 p# zdo
) }# R; h: y& v$ m* H% X5 R Lan := rootfolder.Internal.Tools.AOLlanguage;/ m: |5 P9 \2 i5 a
if current = @.Destination -- else return# l# \) a9 i* H4 z4 o7 G, _" T, {0 c
then8 X& ?* Q. ^# G2 m
@.Destination := void;
0 \2 T2 f; D3 E {, T6 M4 R if @.occupied then3 M' e. A3 t% i) u/ V
part := @.cont;
* A" |4 f2 d3 M* ~6 u @.transpOrder := void;
. l. K1 `! R2 u& \* \1 G, P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
Z& P! {. M& y$ g2 p* [! s$ v @,root.eventcontroller.simTime);
5 n2 s% Y8 A7 ]5 Y: I. m @.HasOrder := false;
. Q( D% e: F D, J2 o; @- z# X @.DrivingHome := true;
5 x7 W; J3 ]/ R" e8 b/ Y rgManager.tryToStartTransOrder;5 k" G4 j1 C" Q% E
if @.Destination = void: \$ P6 @1 Z, ?: _; ?- }
then -- no transport order for vehicle @" H1 [: V7 }8 {; w& X7 I
@.Destination :=
. S7 P7 v, z% B: A rgManager.nearestFreeStation(@,track.~);
$ K( s0 m$ X( v; b# ]) X6 r newDirection(@); 3 T! ~0 i( P) y' r5 o
if @.Destination /= void then$ X" X1 h6 D9 `! t6 ~- _+ e
@.Destination.NumReservation :=
2 \& D- t0 h* O @.Destination.NumReservation + 1;
; A' ]. r4 }% g, o0 k end;1 B. e# W# w+ Q
@.CurrIcon := "drivingHome";4 {" f5 F+ P' \. A6 P
@.DrivingHome := true;
6 i9 p7 X# D( b" | end;
+ D5 `9 k/ f" \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 ^" j5 z6 G# m2 r2 W4 }* A' t part := @.transpOrder;& w: j' E2 U: _7 ~8 G
part.move(@);-- load part% @$ j& J% } p# w2 Q) F
@.CurrIcon := "load";
) D7 O. X* p# F+ c3 l GlobalDistObj := part.globDestination;7 ?7 O& w5 z' g5 Q+ g
assignLObj := rgmanager.rgAssignL;9 }; ]# s, P5 c9 v) z* H& w: D
row := assignLObj.getRowNo(GlobalDistObj);, ~" ^ ]) } U; X2 o- U
if Row = -1 then -- since 70
9 L4 G j( [" `6 b; j0 q: T& Z% X F5 r if lan=1 then
" y9 Q) r' t% B- F+ V: l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 m( u5 M- |) ]5 T: L" l: z$ s
to_str("in der Andockstation: \"",?.~.name,"\""));
; b1 ^. X3 m: C/ u, S else9 b/ d- C7 N" H' [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: T* X1 I* ^0 Y: X* D
to_str("in docking station: \"",?.~.name,"\"")); ( H1 \0 R2 l& v' k, W5 g
end; g R4 B: s% n6 o C" u
else
2 q0 H0 c. l- e2 v. O @.Destination := assignLObj[1,row];/ G* T2 |0 Z( i" `+ E
end; 6 g2 h, P+ @( P! m
newDirection(@);
6 s' o- L9 s9 }$ y- ]+ L @.HasOrder := true;9 B4 Y* E' P+ A
end;2 [3 b& Z4 ^1 |& ]- t4 N7 [0 z7 ~
end;& ]6 b5 l: ^! c% C
end; -- of the method
5 a9 N/ N9 I4 V! k3 T |