/* called by: entrance ctrl of the object 'track'6 v& T/ r; w' P2 a; b. P
*/
# U, t' U- \& ~5 f8 Ois
1 q* P8 h, O9 f7 F, Y3 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# Q, T( S! r: Y e+ Cdo
' ^* x! _: z5 ?6 ] Lan := rootfolder.Internal.Tools.AOLlanguage;
3 `7 R3 J Q& ~% G; M4 H if current = @.Destination -- else return; ]. \! r( k2 M1 C. M4 M- b1 N
then
, Z5 v, j$ @6 l c @.Destination := void;# z! [$ Y$ S" O q( Y
if @.occupied then
$ F+ q* Y) o+ ^7 i D part := @.cont;
Z. H& V5 v& B1 }& C) | J @.transpOrder := void;
+ ?0 i) Q+ w4 J$ Y' c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, B9 K, U+ t! g. E. y5 H
@,root.eventcontroller.simTime);9 l: W8 F6 x4 l( p! N
@.HasOrder := false;
; R$ r3 H) W5 v* f; X7 `' _# } @.DrivingHome := true;
. B$ {3 A* ]! |' {( V. P8 m1 @ rgManager.tryToStartTransOrder;
z; \7 v* O) h! O! ?& r if @.Destination = void' D3 a" J- D" x) E& Q8 T
then -- no transport order for vehicle @* o4 Z: y% u T# v/ D) q% N
@.Destination :=+ Y' B( M( l4 n6 q
rgManager.nearestFreeStation(@,track.~);$ r0 p$ Q' L7 z! J t# G
newDirection(@); 8 \: m6 b2 U9 {0 C
if @.Destination /= void then
4 R& ]8 O' F& @& o- f @.Destination.NumReservation :=
% u# p4 i" l) w' x9 }7 v) n @.Destination.NumReservation + 1;6 b( G" j V- [6 v# K1 s
end;- G6 d9 H! K# y- `3 x& Y
@.CurrIcon := "drivingHome";
. x1 ^8 p6 y0 @4 l) @ @.DrivingHome := true;
: a- b$ `/ c- G5 z1 ^8 R4 e end;
1 O, `' O; D- b5 O8 ]1 l" O* g else -- the vehicle @ is empty, both vehicle and part are in the same dock station, @/ d7 o1 Y$ E
part := @.transpOrder;0 Y" s: |) B2 E
part.move(@);-- load part
0 x) a5 I' b2 g' h1 e+ ?: ^ @.CurrIcon := "load";
f5 K8 s; l0 k GlobalDistObj := part.globDestination;+ n2 {- j- }! ]0 p, k$ H
assignLObj := rgmanager.rgAssignL;
3 a) h: X1 s, h, P! I row := assignLObj.getRowNo(GlobalDistObj);6 C7 t, O9 u& s0 H5 f% s* T
if Row = -1 then -- since 70
& E( k s1 V9 K$ }0 }" `, Z. k if lan=1 then1 r/ G% H d6 L4 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, w6 g- k W6 `% E$ d to_str("in der Andockstation: \"",?.~.name,"\""));# {. \! f X5 Z8 l
else/ X% G+ V1 F E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Q& h+ d/ A% a9 ^, e" { to_str("in docking station: \"",?.~.name,"\"")); 6 u, a/ V; @7 [ S" E
end; u" m) y7 _$ i" a7 [/ l2 w
else% I: K$ ^: p: l9 u U
@.Destination := assignLObj[1,row];
# W* u* m: x z% ?) }( v7 } end; + _9 e. l8 ]2 y8 E' O5 P
newDirection(@);1 m7 W) D2 g# G) f ]; w9 C% q
@.HasOrder := true;
3 G2 q: S2 f0 r! C( Y: e h6 ^ end;' R+ @& |6 q% B+ `: U
end;
) M! B' U2 W( ?1 u/ I1 mend; -- of the method5 X5 X6 N7 c" T' K3 d6 o
|