/* called by: entrance ctrl of the object 'track'
! ]/ }, ]) G2 K- w% r H+ u*/
' K4 i/ A: j. X# |$ c5 X. W* Dis
! r1 o y, L, B3 `/ j. g; x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Z# u) G$ m8 \, B! Ldo
5 x5 Q. F& w, ^7 n: `$ M6 \ Lan := rootfolder.Internal.Tools.AOLlanguage;
* i( _: d/ I1 O( x1 X, H if current = @.Destination -- else return
/ X4 Z2 N n# E/ w then# X2 }+ d/ N- }. o' q0 y
@.Destination := void;
" e+ E' F# Y" r8 r- ~ if @.occupied then: d; g! X7 E: M+ z. T3 m3 I
part := @.cont;
0 b& D! k1 O- }2 u) p9 X0 Q @.transpOrder := void;
# h; _' u& Q, a" ^; h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 I& F: O5 N0 C7 L @,root.eventcontroller.simTime);+ v, Z6 k8 Y1 f, l4 Z$ n5 ^0 z
@.HasOrder := false;+ o6 W: I w: ]% B
@.DrivingHome := true;
" S. y F! C" o! T rgManager.tryToStartTransOrder;5 N2 H; {( X2 B' f
if @.Destination = void+ f6 Z. u' w2 Y' g
then -- no transport order for vehicle @
5 h ?# J) ^( ?" B# ?, X' y5 ~ @.Destination :=, v: \- L) i. K
rgManager.nearestFreeStation(@,track.~);! S8 p/ q, d6 E% Z: ]$ |/ }+ Q2 w
newDirection(@);
: x$ I0 b- C& y$ V if @.Destination /= void then: z" _+ d" s2 Y$ q6 ?2 D; p( w
@.Destination.NumReservation :=! e7 k7 Z" ~+ W2 j; B: u
@.Destination.NumReservation + 1;3 K7 o v$ I0 m4 F7 O6 m
end;" ~- X+ |, e `. d
@.CurrIcon := "drivingHome";
4 b/ B4 J% h' Y @.DrivingHome := true;4 I0 ~/ e; b% _/ x
end;* C; e& G- [+ H: {/ [+ ^! \' v8 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ D- G8 p+ t9 m" I5 q/ ~
part := @.transpOrder;
! F; K- j" j+ x* Y- p part.move(@);-- load part
1 A! o' F8 ?$ N5 W3 V% A0 ] @.CurrIcon := "load";
6 q1 v5 X* s1 ~ GlobalDistObj := part.globDestination;
$ c* x3 u. z! ~* K3 G; Q assignLObj := rgmanager.rgAssignL;
) h# }# z4 |* W; S7 p4 z row := assignLObj.getRowNo(GlobalDistObj);
) ?4 `% V4 m6 T, a if Row = -1 then -- since 706 I& f* f; `: U f3 ^
if lan=1 then- z! M% A* g) H! k' ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 D; G( D/ t1 U9 c; C! t to_str("in der Andockstation: \"",?.~.name,"\""));9 Y8 O6 y1 l3 C. C4 b2 \0 r6 H. I
else4 [0 I8 O% @0 l" F" d* H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 e# p0 z% Y/ g5 ~+ ?" a
to_str("in docking station: \"",?.~.name,"\"")); 1 u" k$ r$ E, z' C: e) ]; y
end;" A, F( O6 H+ _! P6 q
else( S/ O7 _) w9 {
@.Destination := assignLObj[1,row];7 V8 o% h2 N5 H# ?) ~$ ?. b# W( g3 B
end; , ^' ?6 X. p4 c4 h
newDirection(@);
6 K- i+ V! E7 Z+ @/ a4 b" o/ { @.HasOrder := true;7 |5 o O7 M9 ]% `2 V# e3 a+ f; j
end;
+ m! u; o$ [' X' k. J0 m2 { end;" d) s u8 W( N+ v' W+ X3 X" z
end; -- of the method
7 B; {* H2 T+ g. ^8 G! a |