/* called by: entrance ctrl of the object 'track'" y5 L5 C" ]1 }# i
*/
) V' L/ C! ^9 y" r* u, e" ois$ p7 S. H# {, A) j+ x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 U) w I. G- p& y6 h6 x% \
do9 w; P, ^. o+ W$ p3 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
) D. A( J0 w w7 r" @3 O if current = @.Destination -- else return( l) Y% l" K; R2 O1 U" g; _/ m& B9 u
then A! x8 U5 H: G3 N
@.Destination := void;; U. o. d( K2 M! J3 ~
if @.occupied then/ [, \ k I/ j4 W* G4 ^
part := @.cont;
) T3 d: D+ z) W @.transpOrder := void;
; d) n# T* r5 o! [, Q2 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. H( x8 U7 e* f( l9 l+ {1 K
@,root.eventcontroller.simTime);
8 M2 J1 v3 i3 Y2 ?3 m @.HasOrder := false;
+ e" ^& j7 B4 U% b3 Z j! a @.DrivingHome := true;
0 u- N/ m" f- d; C* \7 f% J ?* M- O" ^ rgManager.tryToStartTransOrder;
; C+ B3 I0 t# J( C! h if @.Destination = void: v& o4 B' l! t/ J
then -- no transport order for vehicle @7 ^1 d3 v! X6 V0 m; ]
@.Destination :=
9 L! h2 l5 _3 H( n6 s rgManager.nearestFreeStation(@,track.~);
! C6 C3 S/ V$ {8 W newDirection(@); $ [7 _; B9 k4 k. ~- k' Q6 I' J0 U1 z
if @.Destination /= void then
~+ Y! u2 k; O @.Destination.NumReservation :=- R; g) v6 D' Y1 g- O4 O4 p P
@.Destination.NumReservation + 1;8 X/ ?; {: W' M. j4 p4 A
end;; ]. j" L/ J- q# ~/ ~8 A) l
@.CurrIcon := "drivingHome";/ v9 h! s; i7 y* A
@.DrivingHome := true;: w/ Z2 ?2 U2 T
end;( G/ M# E% b' p7 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 d% v7 Q8 v) Z2 z# a x
part := @.transpOrder;
4 w6 @4 k3 e1 \ part.move(@);-- load part
- d4 ~* k, j' T" E @.CurrIcon := "load";
a4 t0 u! G1 o/ P- ~" p/ V GlobalDistObj := part.globDestination;
8 O7 c; R: H( j3 v9 l& ^+ K, Q assignLObj := rgmanager.rgAssignL;% [7 ]' }: b7 E( p, w! |$ v3 I4 s8 v
row := assignLObj.getRowNo(GlobalDistObj);2 J7 G$ `0 V- D. {) }; _( j. `
if Row = -1 then -- since 70
' N6 D6 B c7 s# u% R U if lan=1 then
7 h* e, ?% e2 z/ s/ b$ X( B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 n% V. e. L5 g% ~3 U2 s to_str("in der Andockstation: \"",?.~.name,"\""));# q# K$ j- a/ p& l) b. S
else5 I+ y/ g. u; ?* h; o5 b6 i4 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 \2 j& E3 }+ `
to_str("in docking station: \"",?.~.name,"\""));
9 P! P* @5 p1 g end;) d7 T: ]6 H) Q! ~& q/ S" C" s
else
! B. C+ A8 z& k @.Destination := assignLObj[1,row];
1 m' J4 I5 v" U8 r. ^3 q4 D, [ end;
/ W+ O: u- `$ Z1 j1 T newDirection(@);
" I( k. v2 H a9 N" [- L5 { @.HasOrder := true;
0 C2 t* k9 X; S/ e6 ?) a end;
" H. X7 i" d" Y$ e$ \+ E4 _: I end;
* o" i: Y5 K0 m+ P5 [end; -- of the method
! E3 u1 |' _ ]: C9 Q% d |