/* called by: entrance ctrl of the object 'track'
1 E5 a( Z4 M; _*/2 n% t+ ^% z, O" l
is
( _8 {: R7 d' M3 w- G4 U8 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( {& m) v' f# W+ pdo0 j% F; K& A! r$ u
Lan := rootfolder.Internal.Tools.AOLlanguage;7 v- L( C* U5 i8 z2 Z7 G+ j* F
if current = @.Destination -- else return1 B/ Q$ f( D& {; |6 x4 ^
then T7 I" l$ s: N" K
@.Destination := void;
# e3 U# ^" _ u if @.occupied then# c; @' p. [, n
part := @.cont;
9 x" q. }* b9 u( n4 T0 s! c# @ @.transpOrder := void;! T; ^! y9 l, ^' q, A& c+ p4 ] `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; P8 E; B- m6 F/ \, G- f! m" e2 a
@,root.eventcontroller.simTime);- O! J; x9 R) Z% f
@.HasOrder := false;
, S7 W- n$ G# s$ E, ?! k @.DrivingHome := true;* X9 C. E) N7 v# h
rgManager.tryToStartTransOrder;# k' j- d' W( a' k* E; k
if @.Destination = void- m' d, O# `$ b
then -- no transport order for vehicle @- F5 f4 d* L% Y, k& n& ]( w
@.Destination :=- d: \0 e% y8 V/ g" b# y1 Y& K! R: B
rgManager.nearestFreeStation(@,track.~);
M- P5 N3 i5 T newDirection(@); ! e3 [1 L+ H# } E/ N. u
if @.Destination /= void then1 X$ p, r! X X
@.Destination.NumReservation :=
; o+ C" H; m, r( _9 g S @.Destination.NumReservation + 1;$ f1 K: r( ^" p. u! m9 U1 H6 V
end;
! e; O. D6 S; V7 h# R @.CurrIcon := "drivingHome";
! D) ]3 w5 t# ]# _8 ?: D; q0 d/ N @.DrivingHome := true;
5 _3 E+ `. i% P8 z% g' J; O, ` end;
1 E! a. S3 h, ^& O/ ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ L q* c$ o9 P2 V part := @.transpOrder;
Z, ^6 w5 q, l9 i5 T part.move(@);-- load part
7 \0 }/ Q1 ^) ^0 {7 y: E. P @.CurrIcon := "load";
8 s+ i% o5 R. d- H; t6 O GlobalDistObj := part.globDestination;
* H9 g+ h3 a# Q9 S9 g$ L, B assignLObj := rgmanager.rgAssignL;
" H8 u4 }% O( l4 z1 Q9 r3 n row := assignLObj.getRowNo(GlobalDistObj);) {! Z9 ]. Q! B
if Row = -1 then -- since 708 H# k5 \ \& z2 C& X
if lan=1 then
( A" K6 ]7 T$ r9 [7 p) | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 J& I, c. }: U* k O8 ^: Z to_str("in der Andockstation: \"",?.~.name,"\""));5 i" ~+ ` n( y: A* B
else7 @! g2 F# ^1 Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 F% F6 K5 |3 D6 h
to_str("in docking station: \"",?.~.name,"\""));
$ J( B i( z- a, L end;+ v- N6 R; p: _
else/ m* M$ z6 |- Z: |- ]# o7 q
@.Destination := assignLObj[1,row]; q1 k5 M0 B. Z _
end; 3 z, @' |$ _$ _1 Y4 z* R2 p. N3 Y5 A
newDirection(@);1 y" w. U0 }6 U& k% t
@.HasOrder := true;
* p" O8 P3 ^, I8 ~+ K end;
% P* d* _# ?! W/ X3 ?+ {' d7 ~4 B end;
3 R' Y% U7 j& M8 J, T" Uend; -- of the method
% {. y- w: z. d0 j |