/* called by: entrance ctrl of the object 'track'3 S' X1 @# Z4 x3 [9 z% Z
*/( B v. V% m& p) X# H. a
is
# K' ^9 C; U4 ~/ T/ x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, b8 k, k* V7 g" Y: W' j, `do0 Q- A- W& ?. g
Lan := rootfolder.Internal.Tools.AOLlanguage;! c2 [( `6 T% M: g
if current = @.Destination -- else return
" e* O" V: k- g5 @ then0 F% b9 c5 l$ B; ~ z
@.Destination := void;/ [! b8 A0 u) @( _% E
if @.occupied then5 W# o" Y' u1 a) ~# }9 V# K
part := @.cont;
( E9 Y3 v. q+ P; ?$ T" M @.transpOrder := void;2 M0 }! c( |) @! u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! E- a( r8 Y: V @,root.eventcontroller.simTime);
- X/ Z1 l% H* }; ?# r @.HasOrder := false;
; @( [8 ?) j" c. p+ p @.DrivingHome := true;: `+ y1 B; |2 E9 m7 a C
rgManager.tryToStartTransOrder;3 o$ Q g! j {& A& n
if @.Destination = void8 X) v5 o! P% R- Y$ I
then -- no transport order for vehicle @% b, l, r/ d/ R6 ^4 d$ Z
@.Destination :=5 P) r* Y+ q* T+ _$ k
rgManager.nearestFreeStation(@,track.~);! p. X; @ H* q7 \5 X6 }1 Y" x
newDirection(@);
- s/ e" h( P/ s6 {6 |' o5 ]# e4 [1 u if @.Destination /= void then7 z7 c5 V2 v$ P" B' p8 Y) P& A
@.Destination.NumReservation :=8 w6 H g7 t/ ]$ S$ p0 r" o
@.Destination.NumReservation + 1;& g8 `* E* e" ~8 I
end;5 f& W+ I* K- ]; M# l6 i1 X
@.CurrIcon := "drivingHome";
7 A1 i. j' q# H4 e1 {) A4 H @.DrivingHome := true;5 P0 Q3 `! P# {5 k$ \' r3 D; r
end;
8 e% s) `: }: E3 Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 j0 i3 _1 Q1 a0 R part := @.transpOrder;
1 A% Q+ v: u" z part.move(@);-- load part6 ?1 M# d* @5 A @4 E0 T
@.CurrIcon := "load";. }* h2 N6 _/ E6 x
GlobalDistObj := part.globDestination;1 Q" U4 V! A9 d. j$ O J K# i
assignLObj := rgmanager.rgAssignL;% h( j: S |* l/ {3 A
row := assignLObj.getRowNo(GlobalDistObj);2 a; ?2 l& p! ^
if Row = -1 then -- since 70+ |7 d& {5 R6 g: v
if lan=1 then/ r, R* U! F; ^2 y: {( A$ ?7 i9 N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- p, c1 v$ P* X: m! F' X g- C% E
to_str("in der Andockstation: \"",?.~.name,"\""));- A' Q$ L0 p5 N; m) K# H ]
else5 i1 o" _: n8 F5 x! d/ @( `( x- P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! s- G7 } N& z+ k0 s8 l1 { to_str("in docking station: \"",?.~.name,"\""));
: [, ]5 R3 z9 w4 U end;
4 w. C; F7 b. E6 l3 ^- B else3 L5 r: o# w" r
@.Destination := assignLObj[1,row];8 ], ~% P5 p2 H! `1 _; n: B6 v
end;
5 j# {2 {8 R) E9 \& G4 } H2 l K newDirection(@);
1 M- C7 j& d) Z- }- ?- c9 R @.HasOrder := true;5 \0 }8 j2 b+ _, m! m2 z8 A* f% s
end;7 o( l* P( H) P/ d+ @
end;
! D' N, s7 z8 z u" k: Uend; -- of the method
' N: I+ i4 G) N$ t& b |