/* called by: entrance ctrl of the object 'track'& p% R3 d5 L/ E' P$ g
*/
. _9 @2 ?9 c% qis
4 u. g3 _8 P4 D7 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, ]! _' j5 y! R- T6 ?: z# xdo
8 _5 y' c# s: U6 Z( q9 _$ i$ m* O Lan := rootfolder.Internal.Tools.AOLlanguage;0 {# i/ a0 O7 v4 B* `3 w
if current = @.Destination -- else return
- |1 ~# Q' V# S( W1 F0 t then* ^+ }: l! I+ j: R; Q. k
@.Destination := void;# F5 H7 k$ x) Y6 C. q' K
if @.occupied then( m2 E+ ~1 [* t0 H" [/ a
part := @.cont;
9 z$ A1 n F, c) @; q% c3 o: g @.transpOrder := void; D( ]; p. _: X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) ^% t2 _- ~4 E4 j! ^. T @,root.eventcontroller.simTime);
- q. g9 M7 O# [1 `3 ~' V% O @.HasOrder := false;
$ A! y* X6 I/ a, K @.DrivingHome := true;
0 Y# ?; E- k2 i" w* G2 T rgManager.tryToStartTransOrder;( v& h3 z) i( c3 r5 u
if @.Destination = void
. D% y J9 j; O) r& J# N then -- no transport order for vehicle @
5 e% T9 n8 |" i. L7 L2 h9 O+ o @.Destination :=& C* D: Z/ n% \/ }- `3 U* @* C. o
rgManager.nearestFreeStation(@,track.~);
+ D1 f+ F; c4 U. {7 r' a newDirection(@); . f8 W, T7 L @' f+ Y2 k F$ m
if @.Destination /= void then4 Q7 g- T+ Y- j
@.Destination.NumReservation :=' t. H* ]# g8 \5 r' j) I
@.Destination.NumReservation + 1;
0 O2 F$ y) U4 t1 O8 e( z+ x1 @* N end;4 Z1 ^6 z O- A) `# n
@.CurrIcon := "drivingHome";
3 o5 Y+ l2 ~- J* r& O* r, l @.DrivingHome := true;
% m {. O3 _% N% u" y end;
; P8 r m' X1 |2 E' b' J4 P# m else -- the vehicle @ is empty, both vehicle and part are in the same dock station: m" R; `# z$ v4 H6 Q
part := @.transpOrder;
$ J; y5 w" R- ~1 Z6 h7 F3 ]( {% y" Q part.move(@);-- load part
- I" p6 g" I, ~2 f' l5 B @.CurrIcon := "load";
+ S% C: W, b! Z, L& c7 _ GlobalDistObj := part.globDestination;2 b7 x. _$ d9 ^8 K
assignLObj := rgmanager.rgAssignL;
6 h6 y0 \2 { Y row := assignLObj.getRowNo(GlobalDistObj);
3 Z$ Y* V( s5 n" t/ J4 h2 a+ f if Row = -1 then -- since 70/ G% d/ j8 Z* ]
if lan=1 then
1 q$ [# G0 w e2 _' h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. m X9 {7 ?& `0 w" q' a
to_str("in der Andockstation: \"",?.~.name,"\""));: F6 _( P) k2 q/ D9 A' R* i4 k1 |
else6 [5 Z! D# i/ J8 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ y1 M- {. H' g
to_str("in docking station: \"",?.~.name,"\""));
* [! V, B/ S" ^; d* o$ l# l end;
6 F: g& y- W0 ~' U5 ? C* | else9 `( |0 Z- t- ?4 e6 u0 ]
@.Destination := assignLObj[1,row];
; U" R% c5 r. e! N% o end;
2 @0 N, A1 w H7 \6 w newDirection(@);
# _, Q7 P: y, D6 P/ m+ M0 \! o @.HasOrder := true;, i' A, s2 [ H7 A/ h. c
end;
$ Q* ~2 f1 a# E/ Q end;# f) x1 I* N2 l$ }* @
end; -- of the method- x! _: B, e9 C8 [
|