/* called by: entrance ctrl of the object 'track'
: R9 p8 w | Q- U*/
7 j* S3 Q( ?: J7 r Z" Q) n8 his# y) u$ F( Y; J* D3 Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 N( ] F9 M* D* A; y* ?do
2 t1 x8 m& v& z$ x1 z% Z" Q5 t8 G5 ] Lan := rootfolder.Internal.Tools.AOLlanguage;$ n- k9 E. ]$ k5 `( f4 t& S1 `
if current = @.Destination -- else return
4 G# _* x- h9 E" _ then) U6 H. ] K8 u7 } J" u
@.Destination := void;. _# u5 V' X2 _5 P
if @.occupied then" i- w( Q! h6 x5 G
part := @.cont;. }7 b4 M6 m+ m8 K' w- D: w
@.transpOrder := void;; C" H/ n, o7 v8 ~+ `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: ?- E) h- r' N% c" I @,root.eventcontroller.simTime);
$ |& U. F/ }" X8 b. H* {$ P @.HasOrder := false;2 ]( N1 x( Z% u0 ^* x6 U
@.DrivingHome := true;
7 ?" b. g" K/ U# } rgManager.tryToStartTransOrder;
. O& V8 E6 x5 t3 e7 | if @.Destination = void- h# v$ q" x* `) G3 ]- S
then -- no transport order for vehicle @' c) R$ B9 a2 C) F! ] v+ m
@.Destination :=# \2 j! W# L- @* {+ E
rgManager.nearestFreeStation(@,track.~);
! W1 Y* K+ H8 a newDirection(@);
5 B. w6 o% I5 Q7 m7 J4 O. h% F if @.Destination /= void then( H' Q; P5 i5 U, {' T
@.Destination.NumReservation :=& |0 ~: e! V, d7 ^( ]* O& N
@.Destination.NumReservation + 1;, f l+ x V& V6 N4 ?& `
end;( V! t! j, l; A6 r
@.CurrIcon := "drivingHome";
% G# t/ b$ ~; C, c) j( [ @.DrivingHome := true;8 Q. S( r, D! W X2 x' S+ v" n
end;' U( w2 D9 J1 j+ v2 e7 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, G# P# ^2 Y' @; o2 h9 N4 J
part := @.transpOrder;
% |$ w3 r6 r$ c& r/ v" c' ^ m, s part.move(@);-- load part$ m8 ?. \- M7 C" d+ @7 E; W* z
@.CurrIcon := "load";
$ i6 ]& w2 f2 Y% Z: X* J GlobalDistObj := part.globDestination; P/ S" O9 z6 h" ^4 t9 H
assignLObj := rgmanager.rgAssignL;
+ n \, \" n* j& Q row := assignLObj.getRowNo(GlobalDistObj);
$ A, k Q8 j1 V0 E1 D, A+ a if Row = -1 then -- since 709 \ l, e0 T# c. I
if lan=1 then1 v* d+ \, }2 ?( o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 J+ Z, `9 [3 [5 a- I# Y, B
to_str("in der Andockstation: \"",?.~.name,"\""));
- |* B' p+ O% w0 M' l else6 _# o7 G8 }' ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ l9 p; r: P* S# h- r
to_str("in docking station: \"",?.~.name,"\""));
, S0 S0 ?& ]+ i/ p% e end;
3 `2 |; w4 k$ O) S else6 w: G1 a4 K. d* `: n3 g7 q. B
@.Destination := assignLObj[1,row];) h8 P% w5 a; h5 }% ~/ O; O
end; q* b# K) u2 n n9 ]+ j! J
newDirection(@);5 s3 i- p z! \, H
@.HasOrder := true;1 V/ A4 R' b7 {; D
end;
6 @: D1 k1 b0 t5 X: x end;1 \$ Y) t8 R# T; A
end; -- of the method9 @$ G4 G) \6 N* M/ c
|