/* called by: entrance ctrl of the object 'track'2 g4 b; h+ N, \) X y0 ?
*/
7 Z6 f/ V2 `% c+ }is( a6 |" G. H! L! c2 R- ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. I( B0 ]5 A3 j4 H# ^/ |7 R D
do( {6 f) U: D1 J' c& N
Lan := rootfolder.Internal.Tools.AOLlanguage;
' y( y: X: H- m! l( a0 ~) T Y if current = @.Destination -- else return+ n9 `; _" p. V2 n% {
then
. i b: E2 R' B- N, Q @.Destination := void;* u# a x! Y$ x+ w* U
if @.occupied then
0 \7 w% Y n* T6 B4 m5 c. D& n9 K part := @.cont;8 p7 p9 i5 T/ x) J: ^6 {
@.transpOrder := void;
& Z) o$ n/ q" l+ L, B T6 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 b q$ u7 k4 _; r$ x @,root.eventcontroller.simTime);4 J% E2 m/ e. ^& P
@.HasOrder := false;
$ f! K" S/ Y0 d: ~2 d# i7 p9 b- t* W; r @.DrivingHome := true;! ]" B* `. y3 N
rgManager.tryToStartTransOrder;
/ R+ w0 |, x- z: ^" t+ t if @.Destination = void
# Q. R; g7 ?' ^# } then -- no transport order for vehicle @ T3 D& a; n! c% S+ ?2 U% l( E! q
@.Destination :=, r8 z' k3 u# F( I, |5 B
rgManager.nearestFreeStation(@,track.~);
* ?8 O9 A% L3 X+ a: r9 V newDirection(@); : y$ }& h9 \9 c1 e5 D. ~3 L$ _
if @.Destination /= void then4 k$ O7 z! x. x; M; D
@.Destination.NumReservation :=. m! Q, |, }/ }9 Y, p* D+ {/ Q
@.Destination.NumReservation + 1;
' V- U0 v1 S8 R5 B/ [/ M end;
; D- i; o5 f1 U3 O; U @.CurrIcon := "drivingHome";
& D A5 v5 L5 N3 y @.DrivingHome := true;7 T8 D' A$ C( M# |; N, d
end;
1 N8 a! u- Y; ]8 B/ f else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 U4 T4 Z, t& p- w* ]
part := @.transpOrder;/ ]; T+ B* o" u1 j" x+ M8 ?* f* l
part.move(@);-- load part
, n% ^! Y# v" V) N @.CurrIcon := "load";& K+ r! r. [( h- i0 n1 B
GlobalDistObj := part.globDestination;
% ]/ c1 X7 I4 Z( \ assignLObj := rgmanager.rgAssignL;
* [2 d: K, r$ K- W+ y row := assignLObj.getRowNo(GlobalDistObj);
) z# ~, I! v2 r0 Y5 ~: u if Row = -1 then -- since 705 i5 `- x# n- B! x
if lan=1 then* h: P8 z7 V7 R4 k& a/ j6 ^/ o( A! Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; Q6 M! G: `: X ]! y+ m5 c
to_str("in der Andockstation: \"",?.~.name,"\""));
7 f5 p* |% L# _ x8 U else6 T9 o) n( w9 t$ H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 P, I) Q5 K7 F/ ^- u
to_str("in docking station: \"",?.~.name,"\"")); % m% \' r# i" s. {' ^1 k
end;( }, P) V7 V) T# y6 c Y8 H+ P3 _
else, z+ R. f0 p+ g8 ~
@.Destination := assignLObj[1,row];
% ~& x E- [5 U. h3 }; t: a end; o+ r* k5 H- w7 l( d
newDirection(@);$ N0 V. X" L# I( I. k9 G$ n
@.HasOrder := true;6 w6 y6 A) Z$ Z/ [1 I
end;9 J1 r, T6 ]/ P: _ u
end;
1 p$ L+ e1 }2 L* \7 ^+ p" a! gend; -- of the method
* w% e( _! ?' c |