/* called by: entrance ctrl of the object 'track'& ]/ q1 g: c' A7 E% z6 K
*/
2 ^+ S( r' G, Qis0 G4 x9 F6 U. T/ C1 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! E x$ M. E% |' a6 F1 K
do
6 J0 U2 F- r9 U+ f Lan := rootfolder.Internal.Tools.AOLlanguage;+ x) q6 C' V2 U* z( j* X7 `
if current = @.Destination -- else return
4 H, {! c( d5 G7 _. K: h/ n then4 h" A. A3 s. T
@.Destination := void;% B* C' [4 m* ^7 G% N) G
if @.occupied then
" `/ x$ x. Y, ^& N, o part := @.cont;( g7 V4 H( y5 t
@.transpOrder := void;
7 w5 C$ w2 j# v' J/ _+ {' d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( A Q# |( A" F9 {; l- b @,root.eventcontroller.simTime);
' j3 _; d2 A" d, y6 O' A0 H @.HasOrder := false;3 ?; |1 J3 O; R* S2 x3 n
@.DrivingHome := true;
" P' }9 A; ^/ p; {; o& L" @ rgManager.tryToStartTransOrder;, m; K Z- P4 I
if @.Destination = void
d0 c' T5 S! Y& M; t then -- no transport order for vehicle @( r f2 q2 v& D8 F
@.Destination :=: j1 ^- X) D' r
rgManager.nearestFreeStation(@,track.~);
6 l8 N2 R. Y; \" o# ^7 A newDirection(@); / t8 J" C3 A5 \3 U6 ], P
if @.Destination /= void then
4 D: N6 Z, V* t7 f; J+ l @.Destination.NumReservation :=2 ^- r4 S T1 X* L5 U; L
@.Destination.NumReservation + 1;
4 e* T% L I) Q( l end;
$ E. d% K( @" ~7 Q @.CurrIcon := "drivingHome";2 _4 c3 b/ L4 c5 f
@.DrivingHome := true;
( L4 D/ t$ |' C d: m) E end;
: n* t+ X* `/ [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 o& Q# F4 p3 O: a
part := @.transpOrder;3 b2 h6 e) Y% d" `4 k
part.move(@);-- load part0 {( d" {" j: d6 T' c" w/ t
@.CurrIcon := "load";
! c" I" V h# R5 M GlobalDistObj := part.globDestination;
" K: u% a& `' o0 `2 I9 `& @% ~ assignLObj := rgmanager.rgAssignL;. G' Z- @4 S/ E! s4 H3 l4 Q
row := assignLObj.getRowNo(GlobalDistObj);
, d+ ?8 a' T6 q; o+ P! l if Row = -1 then -- since 707 n P' D: M% }; V4 P" v! G. e: A; n
if lan=1 then
; ?, r2 ?3 s( G3 p4 J7 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- d3 T5 A. H) ^) w to_str("in der Andockstation: \"",?.~.name,"\""));0 A# Z) s( q5 v: Y* G* j
else0 R K' n; k7 S" g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- h3 O8 u$ p- j# m
to_str("in docking station: \"",?.~.name,"\""));
8 e7 M' | @* ~ end;
/ A: d& r9 V- H# y: m1 U8 w( a) ? else L& I" e$ w2 S" O: q8 Q+ h
@.Destination := assignLObj[1,row];3 l" u i4 Q# X x2 O S
end; 4 y5 \1 {6 g6 v# Y$ J' R
newDirection(@);
6 r$ N/ G! {; _8 F @.HasOrder := true;( \; l# f& Z: D1 F& T
end;. i9 t9 {( \8 s- f) B) N( F
end;
8 X* e$ t7 u/ d, o. Q3 kend; -- of the method
! c8 k) M8 w' q7 _5 y |