/* called by: entrance ctrl of the object 'track'. c; Q2 e# d0 P/ e
*/* v/ @! D4 t" m: w: \3 ?
is
' e1 L) p3 n$ b( W9 T! ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 I( T/ n/ [, ^5 Q/ u. [! X2 Xdo
2 ], Z6 @6 W& V) L1 R& h+ d, q Lan := rootfolder.Internal.Tools.AOLlanguage;$ e7 j6 r4 |# L. s' w
if current = @.Destination -- else return; g3 s) t0 C6 D* [+ A: ?
then' q6 x- a9 K) ~
@.Destination := void;$ l/ Q/ D" ~+ @: x% G9 q
if @.occupied then
, I% \! G) k; u/ E9 N% l part := @.cont;' k% f* M: n- j
@.transpOrder := void;3 ^( G0 b* Q2 u4 a: Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: T5 u3 P5 M! e* H" _ @,root.eventcontroller.simTime);( N9 K+ b1 ~5 k' O9 x; J
@.HasOrder := false;0 ]; p5 _8 U$ t4 [! F' Y; D% S
@.DrivingHome := true;7 ?( n& Q! c; i5 C, N
rgManager.tryToStartTransOrder;
6 m. `; ]! p0 p if @.Destination = void( B' B% P" g# e0 L! X
then -- no transport order for vehicle @" u5 F6 E, C% w3 N$ S
@.Destination :=
# P. A) w' n* G: q9 f rgManager.nearestFreeStation(@,track.~);* U( d$ D& g4 `% G2 u5 t
newDirection(@);
5 V4 K8 @9 P& ^. _7 H6 T4 X5 p1 E if @.Destination /= void then$ j4 B( Q( M2 c9 D* Z1 B
@.Destination.NumReservation :=0 u7 L8 U$ D" Y7 {; c, U! ~0 s
@.Destination.NumReservation + 1;# w1 w" n5 d7 u! z- E$ T; B1 r
end;
6 Z0 k* W* ?) U" a5 g0 v @.CurrIcon := "drivingHome";
0 X/ q2 o1 H( q4 W! z7 G @.DrivingHome := true;6 |9 r! R) v& J% K, f* l! ]
end;
- h& e4 C$ ?9 y; L5 |; G0 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 T2 o: m% X" C3 R part := @.transpOrder;
% C, L' o7 z( P0 H1 g3 {% ] part.move(@);-- load part+ K |2 s: ?; s4 B% Q& O
@.CurrIcon := "load";' s5 A7 h3 m' x' s+ N
GlobalDistObj := part.globDestination;
. a1 u/ {* A1 [7 w9 Y assignLObj := rgmanager.rgAssignL;4 C+ T5 P+ j* V+ l: o
row := assignLObj.getRowNo(GlobalDistObj);: ]) ]5 Q) M0 u3 D- e+ p
if Row = -1 then -- since 70( p- u. Y& G* J
if lan=1 then
5 d: ]) o$ ]) } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( m! g+ p* Q2 V to_str("in der Andockstation: \"",?.~.name,"\""));% }/ [: W/ D5 w7 f- B& }5 C
else
$ a) d* p. ?% @4 ?+ B; Z. K4 h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# Q5 ]. ?' _' S% e' a to_str("in docking station: \"",?.~.name,"\""));
9 @$ H; B& c( h' B' w# s) h end;
6 h: P6 q/ t: c else
' L4 o+ X, ?7 ? @.Destination := assignLObj[1,row];; ?! `' V& [) A; l( h5 j$ D% F% [
end;
! Y0 m# d7 m- m; G) f newDirection(@);
& i6 G3 }0 ]4 C c" V, J @.HasOrder := true;
. c$ n+ U$ o# Y* p% X/ } end;. r1 B) ^# m, B$ G! A2 d6 T: M
end;4 [2 D' W( ?2 {3 c
end; -- of the method8 L9 \4 T9 J, o9 z8 Z& v1 ~
|