/* called by: entrance ctrl of the object 'track'
% N# c3 G1 @4 [$ z' r*/
7 R7 O& c* s6 Vis9 |- o$ Y1 x2 D; _0 T# w( ?0 K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 }: Q. X4 b; x; jdo
y6 u1 ?, T1 f' N0 { \ Lan := rootfolder.Internal.Tools.AOLlanguage;
/ _$ U! r6 M Z) N w$ x3 B0 \ if current = @.Destination -- else return
& k: f# }" ^5 a" f/ s: L then
8 H8 t k" I" y( R" P9 V. Q& N @.Destination := void;( ?7 Q' P5 a/ p. B) f0 A2 e2 F
if @.occupied then
& D9 A" O# Z: [7 @1 j% @/ d7 T: c part := @.cont;
! o5 i: O8 P6 R5 B1 K9 E0 \ @.transpOrder := void;' M5 j) i- H/ C$ b; n8 c n/ k; Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 }7 _) ]5 g9 [/ k% {
@,root.eventcontroller.simTime);
2 H- @! n; {( p: F @.HasOrder := false;6 e/ X4 v6 x( `+ Z% B3 S8 j
@.DrivingHome := true;
0 o1 I# p* e+ M5 A2 T, v6 b rgManager.tryToStartTransOrder;# j$ j: e& S7 K4 D6 s
if @.Destination = void
\) x+ r2 i6 _ then -- no transport order for vehicle @
( R( _; H6 ]+ B$ l% L3 P @.Destination :=' S) p: e Y% x J2 w
rgManager.nearestFreeStation(@,track.~);: M! s. ]. p- Q
newDirection(@);
( I2 Z, p) l2 b ?+ Y0 A6 u if @.Destination /= void then+ a% ~: t2 |; k4 A, ~* r
@.Destination.NumReservation :=# T: N! I7 i; _2 {" m9 b; m
@.Destination.NumReservation + 1;
: E! k" r7 T" H. [, z end;) M' {! ~& s# J: u: t, K& u
@.CurrIcon := "drivingHome";
2 \' h- J) R, _6 S+ _) M# b5 f @.DrivingHome := true;
4 w; ^7 Y3 I7 N2 w2 b8 t end;
+ |' ?+ N, `% U9 ?1 E# [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! y% O- N, h" ~$ F% [; q part := @.transpOrder;6 U4 {2 ?5 F4 f* V3 }* @* i
part.move(@);-- load part
0 l. C' E! F0 o# D2 ] @.CurrIcon := "load";4 n) X9 n$ n/ u; h" Z/ X
GlobalDistObj := part.globDestination;
) |- `; {3 c, z- X2 f assignLObj := rgmanager.rgAssignL;
( G" q. [* m1 O: x6 S. y row := assignLObj.getRowNo(GlobalDistObj);
* a( f$ A% k0 m6 |6 d$ m if Row = -1 then -- since 70
) u4 |; ^' R" u' Z if lan=1 then
+ T$ Z3 L, G& f4 V+ D) I- g$ ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& T: }: b2 |9 I
to_str("in der Andockstation: \"",?.~.name,"\""));' f4 v" F7 @+ A4 @! K- t
else9 L! a& O* u3 S* n8 \+ {: Q0 ?4 {( d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# V. i8 B) l2 ^ to_str("in docking station: \"",?.~.name,"\""));
8 f* f* w1 s1 q B7 K6 j7 _ end;
% _: b) L9 `9 ^% `2 e* e; z9 r else
8 r% u8 D2 a' i3 l: m# k @.Destination := assignLObj[1,row];6 w. ^0 V; P# S: w, c% A' |
end; ; l5 ~7 a# S$ ^ ?1 d
newDirection(@);0 o! W% A, F2 ?4 d
@.HasOrder := true;. c2 X1 j _1 c, L5 {( {/ P7 a0 `% X
end;1 X% t3 z3 d; }' Q% j
end;
9 x8 |1 K, f7 ^' Aend; -- of the method
0 X" x0 E1 U! }. Y# e7 a9 g |