/* called by: entrance ctrl of the object 'track'+ m/ S! V) l t% r* v1 A
*/
& v! S9 V @4 d8 J# {is
* t& f) @- S) r( Q6 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% m0 ~7 n8 u8 p+ Z4 i% |do7 E% A1 ^7 d0 y% u0 U
Lan := rootfolder.Internal.Tools.AOLlanguage;' z C' x- H6 h4 A% w, e
if current = @.Destination -- else return
& I4 {3 H6 }+ L" t then
! Y6 X" H' v" h8 i/ T @.Destination := void;
: H. s! D( k6 X, r. x if @.occupied then
- ]5 t; S9 A' }. C' v part := @.cont;- Y( y; L$ @) x8 \, B5 ]& i: O# X
@.transpOrder := void;
. O9 f* R6 v. |4 E0 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 \2 Q8 ~, r. G2 G. t/ W
@,root.eventcontroller.simTime);' ]% m/ L2 V+ p l! h8 H' u- ?. N
@.HasOrder := false;
( S; S* p. T! A- v" L+ D @.DrivingHome := true;% S6 ~5 c: Q9 ?8 F
rgManager.tryToStartTransOrder;
/ m0 m! ~: g1 y! g if @.Destination = void0 Q1 O9 B4 e/ U$ f& f( S
then -- no transport order for vehicle @* K7 A# K* f& b1 j$ x& V1 r6 j
@.Destination :=: w; g+ K$ l; C
rgManager.nearestFreeStation(@,track.~);- n% I5 z; q+ j* r1 [+ G8 t) s2 \. V
newDirection(@); $ M" v# a+ H! E4 l j( r+ D
if @.Destination /= void then
. X/ A8 \& D& E @1 W# V5 A @.Destination.NumReservation :=
/ R% B y$ i3 C+ B+ L" e3 m% f @.Destination.NumReservation + 1;! g4 [' o; J- ^: ]) U6 H/ ?( x
end;6 f" ~1 {- w/ P, O+ i, K
@.CurrIcon := "drivingHome";6 D6 {1 A) ?7 I2 u9 }- _
@.DrivingHome := true;
$ n8 T2 Q0 g( l6 b' b$ c. B end;
- C# f8 S S! j/ r else -- the vehicle @ is empty, both vehicle and part are in the same dock station) S3 \$ K. }6 Z; ?
part := @.transpOrder;8 N, B C D% h9 |% h6 E
part.move(@);-- load part
/ W7 e0 I( \6 }1 G7 v @.CurrIcon := "load";+ [4 g& x( ?$ C# r$ u# z
GlobalDistObj := part.globDestination;
% {! [, P9 y \1 B) ~ assignLObj := rgmanager.rgAssignL;' E; ~) h8 a1 V" @! u" ^ u- ?
row := assignLObj.getRowNo(GlobalDistObj);
* J3 j: z1 A( ?5 d5 T' i if Row = -1 then -- since 70( X& B+ M- X" i, i# o
if lan=1 then
7 m0 ?7 N5 A. z/ p0 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ ^( X9 K$ b7 P
to_str("in der Andockstation: \"",?.~.name,"\""));: y" ^, _* L8 N' _
else
. S* [; V, o7 s |2 v" M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* E( X4 V1 I- ^$ @5 p% S
to_str("in docking station: \"",?.~.name,"\""));
3 g7 ^) `" ]: d$ W" V# C& K5 i- z end;
P3 Q7 L# e3 w. h else- t% V: V }0 ~ A
@.Destination := assignLObj[1,row];' A* p! X8 h* j/ j1 A/ l
end; 1 G5 d- x5 S# C& ^* u
newDirection(@);
. N. M2 @8 L7 y" h' y9 S @.HasOrder := true;2 [9 m9 z" T/ l- }: @) E0 X% A
end;
/ t; ^, G4 B9 P! F/ g+ l* \7 P end;
" ~" R% r {/ P) d, K0 Dend; -- of the method
( O- N- R! S) [7 j |