/* called by: entrance ctrl of the object 'track'# q6 j/ ?! R) J$ _5 E
*/
$ H( q: j8 `+ ^& B, c! zis
9 O q* h; I- x part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 I3 {# r) M) v% [, x
do
# Z3 v$ f7 R0 w H Lan := rootfolder.Internal.Tools.AOLlanguage;' @) d# Q( Y3 l6 {# c$ z
if current = @.Destination -- else return
# \: }: k) Q8 _' } then
2 O; i; W+ m1 }7 w& w6 n @.Destination := void;
8 y" \$ D) P/ H# a r5 m( @/ r, f if @.occupied then
: k: V( s+ {: V S7 { part := @.cont;& C! a2 A$ |3 L) ?
@.transpOrder := void;
' a# o0 J8 U$ o* A2 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 E0 f5 t- j/ Z, a
@,root.eventcontroller.simTime);
/ O( Z+ u% e/ J9 B8 ^( F& R# P @.HasOrder := false;# x; m$ L. v0 b2 K6 b- q; ~- \$ i/ w
@.DrivingHome := true;
' _! ^$ w z) C! r rgManager.tryToStartTransOrder;4 [2 l. @0 K+ P0 G2 {/ q
if @.Destination = void
1 ]( _, z; v% j1 a; Q& u$ O then -- no transport order for vehicle @: U9 a9 S: ?4 M% x5 M3 _) [
@.Destination :=
0 `/ A" H: P2 @( B5 ^, N3 e/ M rgManager.nearestFreeStation(@,track.~);: o1 L# ]4 t8 m1 v$ @& i( n
newDirection(@); ( S" M3 `0 \0 e8 {9 t# L8 _& W- F
if @.Destination /= void then2 ^9 K, e [: ~
@.Destination.NumReservation := q' k2 h# s2 j* }! X
@.Destination.NumReservation + 1;
7 f6 X; }8 V9 Z2 z0 Y/ D+ i. c N4 v end;
7 U' {4 {7 I' z. f @.CurrIcon := "drivingHome";
* \- K7 p' [" D y# g7 W+ k* y) [ @.DrivingHome := true;/ U9 ?" F4 t* E4 i: U0 U( P
end;) P9 s" ?- J1 v( \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, n1 @' e* r$ L part := @.transpOrder;* X! W* Q5 A i$ E8 b1 Y3 p% y* X9 o
part.move(@);-- load part
/ ?5 ~* d7 o, k2 J @.CurrIcon := "load";
+ s. m+ x) v; I GlobalDistObj := part.globDestination;4 V- }, h* U+ Q1 j5 S
assignLObj := rgmanager.rgAssignL;4 n& X+ n: w3 O2 q0 A
row := assignLObj.getRowNo(GlobalDistObj);
* Q/ \) e" _/ o) F9 _0 U if Row = -1 then -- since 70
" m! J4 c4 }* j if lan=1 then
* U+ U0 Y& {" |2 L9 m% P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, {# F: [: i6 B* p
to_str("in der Andockstation: \"",?.~.name,"\""));, S2 _* Q% g, q" S, `( E' H6 v
else
* Y5 r' o- ^. \9 u8 z/ n7 A* a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 R/ C4 k0 y# [3 }7 f. V2 v+ c to_str("in docking station: \"",?.~.name,"\""));
7 i9 P4 [1 J& ^( p4 K, ^# X5 K end;
, J6 J- j/ U; o' s4 t else4 N3 j9 N/ \ {, ?" L& r; G, _# G
@.Destination := assignLObj[1,row];
' Q2 {9 e' M! \5 e, a0 i end;
8 l. L6 j& {/ U& ? newDirection(@);4 J2 L- q, `; E
@.HasOrder := true;
3 w4 b# N1 k* P end;, c% {2 U9 |6 ^: u; G, q
end;# U* b* S& F& H- N: k
end; -- of the method
r r! P" m D1 K E. y! U, ^5 ? |