/* called by: entrance ctrl of the object 'track'# \0 b- ^% P, y/ Q2 i
*/
3 ?4 P6 Z3 J. nis
7 Q* H! F3 e% t! }& r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, Q4 A6 k3 p+ e1 P. ]: h, _do
, ` ^$ o& E; P2 V, s8 J Lan := rootfolder.Internal.Tools.AOLlanguage;
* n3 O: x/ h1 h1 u: u if current = @.Destination -- else return }5 X! J+ Q0 G! Y+ E# p. e
then5 R% g0 g3 F3 [6 I0 A
@.Destination := void;
& S1 P9 `% U2 t4 _# s9 K# D4 { if @.occupied then+ q/ F/ ~+ d5 _, c; E
part := @.cont;% v, i. \: q, _& x" F; n5 K
@.transpOrder := void;: O7 ^8 F: u' Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 I$ M- c/ F& N8 ]7 v+ v @,root.eventcontroller.simTime);) U1 ]: M% J) C8 s' T, e
@.HasOrder := false;
{4 O% P* ~; z h" o @.DrivingHome := true;5 h9 k H, y3 T
rgManager.tryToStartTransOrder;; z6 H: B% Z! h7 e
if @.Destination = void& j; t% Y/ n2 r2 o8 Y' Z h; f
then -- no transport order for vehicle @- W* b9 a6 ]# ]; J2 U
@.Destination :=
' p! ^% T' V- N: G rgManager.nearestFreeStation(@,track.~);* `2 H3 c: I7 r" W$ m
newDirection(@);
5 U. U$ a: V2 R, v( ~) q+ N if @.Destination /= void then
/ S' z8 m% j; o4 { @.Destination.NumReservation :=) v6 X5 F$ V, L+ Y& d7 s: k
@.Destination.NumReservation + 1;# _5 ?5 ]0 m2 x
end;
1 F: R% `4 I+ ]) n @.CurrIcon := "drivingHome";/ r# m# n$ g; l7 ~
@.DrivingHome := true;
, U' T- Y# p$ c1 P end;
5 q3 ?, u) S+ }9 V, \ S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: V3 J m2 c1 p: D0 J part := @.transpOrder;) V1 y6 z! w B) g9 i+ L
part.move(@);-- load part- F9 W0 I. C8 W# k
@.CurrIcon := "load";
4 }' K" W. m g; M, a7 l& a GlobalDistObj := part.globDestination;* P, {0 K6 m7 t; ^
assignLObj := rgmanager.rgAssignL;; @) f+ k9 s& G0 w5 p" g8 v
row := assignLObj.getRowNo(GlobalDistObj);& w# [4 Z/ q h* n! a$ H
if Row = -1 then -- since 70! h8 B0 [( G; H8 ?8 f
if lan=1 then
1 E% C# N+ q9 X& s, g4 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 \3 I& k* @% \6 p+ \+ M& n' L to_str("in der Andockstation: \"",?.~.name,"\""));" E7 `# G6 Z- ~: C4 [$ R
else
* j5 j* L2 v3 c* Q8 v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! Z/ ~' i w" J* O6 q4 Z to_str("in docking station: \"",?.~.name,"\"")); % j0 R- C. F- b$ d5 Q: ?
end;
3 f/ I4 n. T) a1 N else
5 Z" y ^4 Z3 x: M ?9 s4 ] @.Destination := assignLObj[1,row];
4 |# u& j6 z5 W4 V0 q end; - z6 Z2 ]3 V0 ~/ R% @0 Q- v
newDirection(@);
' h; s8 b' F1 z2 Q) f @.HasOrder := true;3 j$ ^4 C. X( y @9 {4 z$ }
end;0 K4 S- i4 S' |' p( j' Q$ M) Q
end; h& \8 i( _. q0 _/ q# y3 A' n; j
end; -- of the method' u: \& g; a/ m8 X- l+ |0 q
|