/* called by: entrance ctrl of the object 'track'
& u0 C- h8 c. V) S5 j*/3 v/ t: D2 j0 i0 ? {7 k
is
$ w0 J( J- w2 F% h Q; c) |; l# x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 P X% G2 s0 [( p7 F4 I( j* @do
' h9 ?8 j* e1 Q( V Lan := rootfolder.Internal.Tools.AOLlanguage;5 }9 V- S/ {' H0 W5 g, ] l, |; J
if current = @.Destination -- else return4 e% i1 W# e/ x( L( E: J
then& q$ \$ A+ w8 X) n" X0 p
@.Destination := void;& H7 M1 C; |. O. ^) K3 ?
if @.occupied then
7 a5 H7 s/ `. ~( m& M part := @.cont; O( }/ p" g [
@.transpOrder := void;/ c1 L, Y' K' D4 [, _/ l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! B4 J) K- q0 z* j( B# o. S" p8 i( u @,root.eventcontroller.simTime);
, C$ _. S! d/ A {' J, H @.HasOrder := false;
5 `9 r7 h2 a2 T- @# P @.DrivingHome := true;
! r: O/ z# H# L: O# i7 R rgManager.tryToStartTransOrder;+ |; A. V/ v9 }
if @.Destination = void& f- F9 Q7 ^) `% p% k
then -- no transport order for vehicle @1 y, D: m6 d. ^, B, K( d
@.Destination :=
. q; N) [8 f5 N- z rgManager.nearestFreeStation(@,track.~);
( b# q/ M* }% |7 y3 K% O% w+ y& L+ J newDirection(@);
6 c9 c* W' r4 b. i if @.Destination /= void then
8 m4 r5 Y$ ~. A; M @.Destination.NumReservation :=
) c1 h$ k8 _0 G+ n2 t! S, }6 f @.Destination.NumReservation + 1;
! a, O, s* [. K% H/ f3 n4 ] end;
# ~/ G! m# ^2 d; M: x" Q" k @.CurrIcon := "drivingHome";
* ]0 j' E c5 q: S# h5 L- g6 `3 D @.DrivingHome := true;9 _) J- ?' n& ?/ |" t4 w, T _8 L
end;
% u% h7 s s8 ]' p7 f9 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 X, B" I [( P( X: d) W+ p7 r
part := @.transpOrder;( q* ^$ k+ I. H
part.move(@);-- load part
- q2 h0 F9 L c$ g" I& A$ E @.CurrIcon := "load";6 ^# N0 d2 H t% ^- C- S2 S8 d& l# n+ z
GlobalDistObj := part.globDestination;
$ R) e$ P! g3 q; S+ c3 z0 r assignLObj := rgmanager.rgAssignL;& N0 L% V( s/ h9 {' q# L
row := assignLObj.getRowNo(GlobalDistObj);
3 q( X# e6 Q8 t3 D# h1 Y" P$ p if Row = -1 then -- since 70
. e& V8 |& k7 P if lan=1 then( i& D6 N6 ~6 x9 t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) }& |- Q( g) E; v% r* w to_str("in der Andockstation: \"",?.~.name,"\""));8 [$ |0 m9 U1 c0 C
else
8 x" K* A; Z; h3 ^, | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' W' T V: F8 e8 y K to_str("in docking station: \"",?.~.name,"\""));
3 ]. S% q2 p* J o9 { end;
% c3 e5 i# J, G& g# G+ ~+ v else
: C, H$ H0 _/ L1 p @.Destination := assignLObj[1,row];
2 a j) g3 a2 K$ n5 ]0 _* I end; 5 _' T0 z/ @: b% K, t2 O# L }5 V* k
newDirection(@);# P7 O! z T2 \ C$ k4 m7 B
@.HasOrder := true;
; [1 o8 ?# g1 Z& x) S end;
1 h. N9 Y3 L, B% u end;
0 d- O, [( \0 Wend; -- of the method; X7 o* t, T; ~7 X
|