/* called by: entrance ctrl of the object 'track'
' t4 A- J) a; ~( A*/* V" c+ u( z. u/ }" F( c5 t
is& H) o0 |- y8 P* s- i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) o- b' o) d! V5 Q" X7 J* w7 sdo' p* u" K: A, Q( |. a
Lan := rootfolder.Internal.Tools.AOLlanguage;/ C# u8 a+ x$ h5 d* c/ R D
if current = @.Destination -- else return& B2 h1 Z/ U" d4 q6 R8 p! k$ |: O! D3 e
then5 z- A9 k0 u( h) f3 r
@.Destination := void;! R+ J! c2 [7 t8 t. W3 q' z
if @.occupied then
' u; M7 z# [; V8 D part := @.cont;( ?3 `& D$ R; h0 s
@.transpOrder := void;
2 `. t+ T% j2 T0 Y" {( i0 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. R) K3 e$ B: i0 ^ @,root.eventcontroller.simTime);
, {9 I+ ?! r h) X! B' C/ r, { @.HasOrder := false;0 S$ T( `4 ]% Z5 W% A; G' p
@.DrivingHome := true;
+ H9 ~" C- K p; V- A# X! G+ X rgManager.tryToStartTransOrder;$ F9 ^4 M) e$ D+ b6 ?" [$ Z
if @.Destination = void/ ?+ q, O! c3 l$ H6 j9 {+ A; s
then -- no transport order for vehicle @
1 j! G( d2 p3 X5 _: h1 d @.Destination :=& }1 @) X% q6 Q" u( h7 v, I
rgManager.nearestFreeStation(@,track.~);( y" o$ Q6 W1 Z V7 u5 ?' L2 D
newDirection(@); . d& R6 u: ]/ R
if @.Destination /= void then
+ T. u' n$ k& r, ?1 g @.Destination.NumReservation :=
7 i5 J/ H9 t, e @.Destination.NumReservation + 1;
5 S8 I7 q Z, ~# F# o9 r9 w4 Z4 _ end;2 N: u) x S6 y1 q# K
@.CurrIcon := "drivingHome";* z: B1 h! Z7 ?/ F' q& V) @! y
@.DrivingHome := true;2 ]4 X U) S- c+ |. \" F
end;
% s8 ^' t% I5 F7 Y2 o* d, m9 D/ D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- L9 ? ?3 p6 Z part := @.transpOrder;
% \; \# N7 T7 i) S# M part.move(@);-- load part
7 O# B: w3 R; w- S @.CurrIcon := "load";5 T' d1 ]' e0 O1 L
GlobalDistObj := part.globDestination;
9 ?0 j! t8 D; S0 d% T assignLObj := rgmanager.rgAssignL;
/ p. y& [/ W I) o1 A row := assignLObj.getRowNo(GlobalDistObj);$ T: D. C( ]& d+ ]* x
if Row = -1 then -- since 70
+ c8 J6 I1 B- w0 A& S if lan=1 then
9 {+ C/ E) Y5 S2 L+ Q& ]- x" V7 T: [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 ?! s6 Y; V& L% J6 o
to_str("in der Andockstation: \"",?.~.name,"\""));
9 u( B4 _, `) c9 }8 F7 r* X4 Z else. }, O, K: r; b: ]* f, _' d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 u5 Q) a) f8 Q1 s) e+ R
to_str("in docking station: \"",?.~.name,"\""));
- |4 l* t5 N$ r! ]4 x; _! N$ L end;# H8 R b+ p5 q& ?
else6 _ ~( G1 V" e6 D
@.Destination := assignLObj[1,row];
6 `1 Q0 s0 v W% Q8 }7 D" `$ Q7 ` end; # O' G) y! ~+ R" u8 E
newDirection(@);
; o5 z8 y" r2 r; J {* f. `3 j @.HasOrder := true;5 K2 o& H( _: O+ G
end;
" [& F; j* O3 B7 l f; I- I" z end;6 s; A7 y, [3 S8 P* }1 E: s1 K
end; -- of the method
& U, Q' G( W# b1 } g6 n |